I know there is a lot of discussion on global variables and that they are EVIL!
I have been using global boolean variables to keep track of which menu options are enabled or disabled (grayed).
Is there a better method, and if so what is it?
This is a discussion on General global bool variables? within the Windows Programming forums, part of the Platform Specific Boards category; I know there is a lot of discussion on global variables and that they are EVIL! I have been using ...
I know there is a lot of discussion on global variables and that they are EVIL!
I have been using global boolean variables to keep track of which menu options are enabled or disabled (grayed).
Is there a better method, and if so what is it?
"A government big enough to give you everything you want, is big enough to take away everything you have." - Thomas Jefferson
MSVS 2008 Pro / DevPartner / CB NightlyBuilds / MinGW / Cygwin
One solution is to declare the variables in one of the classes such as the document class.
Kuphryn
Couldn't you use the API IsWindowEnabled() ?
Code:BOOL IsWindowEnabled( HWND hWnd // handle to window );
"...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers
Thanks for the info. I'll look into your suggestions.
"A government big enough to give you everything you want, is big enough to take away everything you have." - Thomas Jefferson
MSVS 2008 Pro / DevPartner / CB NightlyBuilds / MinGW / Cygwin