> I am using MingW v2.95.3-6. I created a simple application that has a
> tab control. The tab pages and main dialog are created with Wedit
> Resource Editor which belongs to lcc-win32. The application running
> completely beautiful if compiler is lcc-win32 too but if I compile with
> MingW then the executable is buggy. If I move the simple application to
> another place, the child dialog which is really the tab control's page,
> sitting in place. Strange!
It looks like you're experimenting with windres "child dialog bug".
(windres is the resource compiler)
This is how you can workaround it:
// "NOT WS_POPUP" is a workaround for windres prior version 2.11.92.
// LCC's weditres doesn't recognize this flag.
IDD_MY_SUPER_DIALOG DIALOG 0, 0, 259, 148
STYLE DS_CONTROL | WS_CHILD
STYLE DS_CONTROL | WS_CHILD | NOT WS_POPUP
FONT 8, "MS Sans Serif"
// dialog stuff goes here.
Note that Wedit will overwrite that preprocessor directive.
Then, you will need to have two copies of your file, and
do some copy paste.
Here is the solution. Simply download latest binutils
package from MinGW project.
This bug is now fixed. No more troubles with child dialogs.
PS: One trillion thanks to Mumit Khan who provided the
NOT WS_POPUP trick. And to Eric Kohl who fixed the
Visual-MinGW, An Open Source IDE for MinGW compiler.
Sources from CVS repository: