How to prevent MDI applications from showing a template dialog at startup?

Many times we don’t want the MDI template dialog to be shown during startup of an MDI application. Well the million dollar question is how can we prevent it from popping up. Well this is how we do it… πŸ™‚ Goto your applicationname.cpp file and edit the InitInstance method at the specified place as shown […]
Continue reading…

 

How to disable close button on window caption bar?

This is how we do it: [sourcecode language=’cpp’]CMenu *pMenu = GetSystemMenu(FALSE); pMenu->RemoveMenu(SC_CLOSE, MF_BYCOMMAND);[/sourcecode] Yup done!
Continue reading…

 

Creating an unmovable dialog!

Just try this from OnInitDialog, this trick will make any window unmovable. [sourcecode language=’cpp’]CMenu* pSysMenu = GetSystemMenu(FALSE); pSysMenu->RemoveMenu(SC_MOVE, MF_BYCOMMAND);[/sourcecode] Lol lol now it’s not moving. Ah no!!! Now tell me how can I make it movable again? Lol the funniest question of the century…ROTFL. πŸ™‚
Continue reading…