Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I minimize application ?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi,
can anyone help me out with this one, I'd really appreciate it. I want to minimize my application when I click on the cancel button on my propery sheet. The code below works ok in that the application is minimized. However I can't get it maximized again by clicking on it in the task bar, or right clicking it.

Thanks for yout help

Martin.

BOOL VehicleSheet::OnCommand(WPARAM wParam, LPARAM lParam)
{
if (LOWORD(wParam) == IDCANCEL)
{
CWinApp* pTheApp = AfxGetApp( );
CWnd* pMainWindow = pTheApp->GetMainWnd();
pMainWindow->ShowWindow(SW_MINIMIZE);
return true;
}
 
If U were using U would have used the OnActivateApp(). Please look into the MSDN and lok for how U can use it in UR code. Hope it may help U
bye
jitu
 
Thanks for your help but I had a look into OnActivateApp() and I'm not sure how it will help me in this instance.

Thanks

Martin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top