Skip to main content
GameDev.net gamedev.net
🔒 Locked

Enable/Disable a Message :: MFC

Started by kuphryn Apr 16, 2002 at 9:22 PM 1 replies 350+ views
Original Post
kuphryn
kuphryn
Hi. Is it possible to enable/disable a message from the message for a time interval? For example, let say I have a program that plays AVI files. For the first ten seconds, I want to disable the open button. I can disable a button. However, I found that if the user clicks on it while it is disabled, the framework keeps the message and class the message handler after I enable the button. Is it possible to disable a button *completely*, or even better, ignore/unignore a specific message? Thanks, Kuphryn
Stoffel
Stoffel
It shouldn''t do that. How are you disabling the button? If it''s on a toolbar, it should be through the updateUi thingy.
kuphryn
kuphryn
I think I know the problem. The problem is before Windows draw the dialog box and the disabled button, there is another process that draws and update a progress bar. If the user clicks the button before the progress bar is done, Windows ignores the fact that the button is disabled. Windows then sends the message about the click button after the progress bar is done.

I ultimately need to multithread that portion of the program.

Kuphryn

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.