Advertisement

Blank button on taskbar

Started by April 25, 2000 01:08 PM
41 comments, last by mkoday 24 years, 7 months ago
This may have been posted before, but after my program exits, there is a button on the taskbar. Sometimes it is blank, and other times it has the window caption. After clicking on it, it disappears. Has anybody else experienced this before? email: chickawow@netzero.net
annex software: http://annexsoftware.cjb.net
i''ve noticed this even in "professional" games, so it MUST be ok
this problem has been inconsistent in my code as well. i can''t seem to figure out what makes it appear and disappear. i think it may have something to do with how the WM_DESTROY message is handled, but i don''t really know.

crazy166
some people think i'm crazy, some people know it
Advertisement
What I am doing on WM_DESTROY is calling a function that releases DD surfaces and such, then doing PostQuitMessage(0);. Is that the best way to do it?

email: chickawow@netzero.net

annex software: http://annexsoftware.cjb.net
This may seem a bit hackish, but I do a ShowWindow(hWnd, SW_HIDE). I think I''ve got that in my WM_DESTROY case, but I can''t remember. Never had any problems from it.
quote: This may seem a bit hackish , but I do...


OOOOH, I like that word "hackish"! I think im gonna steal it . (Or use it if he didn''t make it up )
That ShowWindow(hWnd, SW_HIDE); didnt work. Does anybody else have any ideas? Maybe somebody that has had this problem before and fixed it?

email: chickawow@netzero.net

annex software: http://annexsoftware.cjb.net
Advertisement
The ShowWindow() definitely fixed it for me. If there still aren''t any answers by tonight, I''ll check through my code and find out exactly where I call it.
In addition the the blank button, sometimes the desktop''s icons get put into an imaginary square. I am setting the display mode to 640x480, and this may have something to do with the desktop thing. The icons are in the upper-left hand corner and nowhere else.

email: chickawow@netzero.net

annex software: http://annexsoftware.cjb.net
Unfortunately, the call was right where I thought it was, at the end of my WM_DESTROY handler. So I guess if that didn''t work for you I don''t have any other suggestions to offer. It clearly is the solution in my code. I can comment it out and immediately start getting blank buttons.

As for moving desktop icons, is the desktop ever being shown while in 640x480? Do you change the resolution after creating your window, and change it back before your window is destroyed (or minimized, or hidden, etc)?
I use to experience the blank buttons when I try to force quit the application in fullscreen mode when an error occurs..

It has to do something with the wrong deallocation order of Directdraw, DirectInput, page flipping, application focus, Messageboxes and DestroyWindows(..).


I cannot remember the exact solution as my code is totally in a mess, but I did manage to solve the problem. (I was working with the above when I experienced the problem, but I ''m not sure which part of the code that actually fixes it)

I do not think it is "OK", even it happens in professional games.

This topic is closed to new replies.

Advertisement