"vOLKi" wrote:
> 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
#ifdef __LCC__
STYLE DS_CONTROL | WS_CHILD
#else
STYLE DS_CONTROL | WS_CHILD | NOT WS_POPUP
#endif
FONT 8, "MS Sans Serif"
BEGIN
// dialog stuff goes here.
END
Note that Wedit will overwrite that preprocessor directive.
Then, you will need to have two copies of your file, and
do some copy paste.
Forget that.
Here is the solution. Simply download latest binutils
package from MinGW project.
http://sourceforge.net/project/showfiles.php?group_id=2435
This bug is now fixed. No more troubles with child dialogs.
Manu.
PS: One trillion thanks to Mumit Khan who provided the
NOT WS_POPUP trick. And to Eric Kohl who fixed the
bug.
----
Visual-MinGW, An Open Source IDE for MinGW compiler.
Home page:
http://visual-mingw.sourceforge.net/
Project home:
http://sourceforge.net/projects/visual-mingw/
Sources from CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/visual-mingw/visual-mingw/
|