D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2035 - D makes GUI dirty
Summary: D makes GUI dirty
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 minor
Assignee: Walter Bright
URL:
Keywords:
: 21655 (view as issue list)
Depends on:
Blocks:
 
Reported: 2008-04-25 12:33 UTC by anonymous4
Modified: 2021-03-03 12:15 UTC (History)
1 user (show)

See Also:


Attachments
sources and compiled executables (50.46 KB, application/zip)
2008-04-25 12:36 UTC, anonymous4
Details
screenshot of win2da.exe (9.21 KB, image/png)
2008-04-25 12:39 UTC, anonymous4
Details

Note You need to log in before you can comment on or make changes to this issue.
Description anonymous4 2008-04-25 12:33:38 UTC
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.
Comment 1 anonymous4 2008-04-25 12:36:28 UTC
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
Comment 2 anonymous4 2008-04-25 12:39:50 UTC
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.
Comment 3 Frank Benoit 2008-04-25 13:58:32 UTC
There is this line and some of the controls have white background?

use this linker options
-L/SUBSYSTEM:windows:5



Comment 4 anonymous4 2008-04-25 15:05:44 UTC
Thanks, that works! Is there some way to configure it in configuration files or in .def file?
Comment 5 anonymous4 2008-04-25 15:12:41 UTC
http://www.digitalmars.com/ctg/ctgDefFiles.html#subsystem
The SUBSYSTEM directive should be
SUBSYSTEM WINDOWS 4.0
Comment 6 anonymous4 2008-04-28 02:07:26 UTC
I think problem is actually in winsamp sample, I took .def file there.
Comment 7 Walter Bright 2008-05-14 19:16:18 UTC
See: http://www.digitalmars.com/faq.html#subsystem
Comment 8 anonymous4 2021-03-03 12:15:27 UTC
*** Issue 21655 has been marked as a duplicate of this issue. ***