When I tried to build a "Hello world" Windows GUI application, main window's menu painted dirty: thin 1-pixel width line appeared under menu bar, and this line was not updating. Nothing helped. I tried various window styles, classes, I loaded menu from resources, created it manually, created dialog boxes with menu. Nothing changed, non-updating line appeared everywhere. But test dialog box in resource editor rendered just perfectly. I started to suspect dmd. I created two source codes that do the same things - one in D and one in C. I compiled C source with gcc and window rendered perfectly, D application'w window rendered dirty. I'm not shure what causes the problem.
Created attachment 250 [details] sources and compiled executables compilation commands are gcc -Wall -pipe -mwindows win2.c -o win2gcc.exe dmd win2.d win2.def win2da.exe
Created attachment 251 [details] screenshot of win2da.exe Dirty line under menu is easily visible and it doesn't update when another window moves above this window.
There is this line and some of the controls have white background? use this linker options -L/SUBSYSTEM:windows:5
Thanks, that works! Is there some way to configure it in configuration files or in .def file?
http://www.digitalmars.com/ctg/ctgDefFiles.html#subsystem The SUBSYSTEM directive should be SUBSYSTEM WINDOWS 4.0
I think problem is actually in winsamp sample, I took .def file there.
See: http://www.digitalmars.com/faq.html#subsystem
*** Issue 21655 has been marked as a duplicate of this issue. ***