I'm also interested in knowing whether BoundsChecker complains about a similar
call to GetWindowLong in bool wxMDIChildFrame::HandleWindowPosChanging(void
*pos). If not, why?
Regards,
Marco
On Monday, January 29, 2001 7:04 PM, George Tasker
[SMTP:gta...@fastpicsystems.com] wrote:
> Hi Marco,
>
> I'm not sure if this is you problem or not, but while running a BoundsChecker
> session today, I came across what appears to be a bug in src/msw/mdi.cpp in
> function wxMDIChildFrame::ResetWindowStyle():
>
> DWORD dwStyle = ::GetWindowLong(GetWinHwnd(pFrameWnd->GetClientWindow
> ()),
> GWL_EXSTYLE);
> DWORD dwThisStyle = ::GetWindowLong(GetHwnd(), GWL_STYLE);
> DWORD dwNewStyle = dwStyle;
>
> The dwThisStyle variable is not being set correctly, as the first parameter
> to
> ::GetWindowsLong() is invalid. Whether it is the correct fix or not, I am
not
> ::sure
> yet, but I changed it to:
>
> DWORD dwThisStyle =
> ::GetWindowLong(GetWinHwnd(pFrameWnd->GetClientWindow()), GWL_STYLE);
>
> and now BoundsChecker says all is ok.
>
> The values returned with my version of the call to ::GetWindowLong() results
> in
> something that looks much more like a style setting.
>
> Try this change locally, and see if it helps your problem. Post a reply so
we
> can
> know if this should be changed.
> > Hi All,
> >
> > Has anyone noticed that the style parameter for wxMDIChildFrame has no
> > effect
> > at all. I wanted to create a child frame with no min/max boxes and a
> > non-resisable border but all my attempts failed. The system will always use
> > the
> > wxDEFAULT_FRAME_STYLE no matter what I pass.
> >
> > To check this problem out, pass diferent style flags to the mdi sample in
> > OnNewWindow event handler and find out if it makes any difference. For me,
> > there is none, defaults are always used.
> >
> > Has anyone come accros this before? Any suggested workarounds?
> >
> > Marco
> >
> > _______________________________________________
> > wxWindows-users mailing list
> > wxWindo...@lists.sourceforge.net
> > http://lists.sourceforge.net/lists/listinfo/wxwindows-users
>
>
> _______________________________________________
> wxWindows-users mailing list
> wxWindo...@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/wxwindows-users
_______________________________________________
wxWindows-users mailing list
wxWindo...@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxwindows-users
On Monday, January 29, 2001 8:27 PM, George Tasker
[SMTP:gta...@fastpicsystems.com] wrote:
> George Tasker wrote:
>
> > Hi Marco,
> >
> > I'm not sure if this is you problem or not, but while running a
> > BoundsChecker
> > session today, I came across what appears to be a bug in src/msw/mdi.cpp in
>
> Ok, so I didn't give up :-)
THANKS A LOT :-))) THE PROBLEM IS NOW FIXED!!
Regards,
> I made the changes as suggested, rebuilt the library and relinked my
> application but the problem remains.
>
??? I don't see how it can. I did exactly as you suggested, using the sample/mdi
(before applying my change) to see the current behavior. I changed the style being
passed to be wxSYSTEM_MENU instead of wxDEFAULT_FRAME_STYLE, recompiled the
example, and no style change. I then applied my change to src/msw/mdi.com in
function wxMDIClientWindow::CreateClient(), changing the style line to:
DWORD msStyle = MDIS_ALLCHILDSTYLES | WS_VISIBLE | WS_CHILD | WS_CLIPCHILDREN;
did a cleanall on wxWindows and rebuilt all of wxWindows. Then rebuilt the sample,
and then the style was passed through and was shown correctly.
Can you double check again on your system? Which compiler are you using (I'm using
VC6 sp3). According to the Windows docs though, this should work since Win3.1, so
I would think all compilers would support it.
>
> I'm also interested in knowing whether BoundsChecker complains about a similar
> call to GetWindowLong in bool wxMDIChildFrame::HandleWindowPosChanging(void
> *pos). If not, why?
No it does not. I wondered why too, but I tried it many times, and it never
complained.
g
> > > I'm not sure if this is you problem or not, but while running a
> > > BoundsChecker
> > > session today, I came across what appears to be a bug in src/msw/mdi.cpp in
> >
> > Ok, so I didn't give up :-)
>
> THANKS A LOT :-))) THE PROBLEM IS NOW FIXED!!
Ah, ok. I sent my reply to the other message before seeing this one. I will check
in the fix to the main branch of CVS then for 2.3.0.
g
Marco,
There seems to be another bug in the mdi code, and it has only appeared since I
made this change, and it is not a reproducable bug :-(
About 1 in 5 times, when pop up a new child window in the wxWorkshop client window,
the program will crash. There seems to be no reason. If I back out this style
change (adding the MDIS_ALLCHILDSTYLES flag to the client window style flags), then
I no longer crash.
Have you had any unexpected crashes since implementing this change? It may be a
wxWorkshop bug, but I'm still not sure.
Vadim, I think I have now eliminated the changes you checked in from being the
culprit. My guess is it is something that now behaves differently elsewhere in the
code with child styles being allowed now.
g
On Tuesday, January 30, 2001 8:46 PM, George Tasker
[SMTP:gta...@fastpicsystems.com] wrote:
> >
> > THANKS A LOT :-))) THE PROBLEM IS NOW FIXED!!
>
> Marco,
>
> There seems to be another bug in the mdi code, and it has only appeared since
> I
> made this change, and it is not a reproducable bug :-(
>
> About 1 in 5 times, when pop up a new child window in the wxWorkshop client
> window,
> the program will crash. There seems to be no reason. If I back out this
> style
> change (adding the MDIS_ALLCHILDSTYLES flag to the client window style
flags),
> then
> I no longer crash.
>
> Have you had any unexpected crashes since implementing this change? It may
be
> a
> wxWorkshop bug, but I'm still not sure.
I have used the my app a lot with BOTH changes but have not had any problems
(yet)! Have you tried backing out the change to GetWindowLong while leaving
MDIS_ALLCHILDSTYLES alone?
If I start experiencing unexpected crashes, I will let you know.
Regards,
Marco
>
> I have used the my app a lot with BOTH changes but have not had any problems
> (yet)! Have you tried backing out the change to GetWindowLong while leaving
> MDIS_ALLCHILDSTYLES alone?
>
Yes. I went back to version 1.58 (pre any changes) of mdi.cpp, added just the
MDIS_ALLCHILDSTYLES change, and then it crashes too (though again, not in an always
reproducable manner). In fact, I have a trail of steps that I can execute now that
never even calls the other changed function before I can get the crash.
Eventually I'll find the reason, be it wxWorkshop or wxWindows that is the cause
:-)
g