Hello all
I need to customize some visual things in the main app window, like system menu and related.
If i call GetSystemMenu(GetHWND(),0) on constructor it returns null. But if i call it on a button handler it works.
It seems that system menu is not available yet during constructor.
My question is: Is there any handle/method like CDialog::OnInitDialog (VC++/MFC) where it is guaranteed that all visual controls are ready to be customized?
No.
I guess the simple approach is just to call whatever equivalent of OnInitDialog after you open the window.
If this seems too ugly (e.g. you are creating some library), you can get as close as possible to MFC by overriding WindowProc method (Win32 specific, but so is your problem). Eventually, there is even "NcCreate" virtual method that can be overriden.
Just do not forget to call "original" WindowProc / NcCreate at the end of your init code...