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!

HIding the task bar button

Status
Not open for further replies.

SmileeTiger

Programmer
Mar 13, 2000
200
US
I have just created a task bar icon (one over by the system clock) using the call OnSysCommand so that once a user presses the minimize button a message box pops up however when this happens I want the task bar button to vanish since I have already created a task bar icon and we don't need both a button and an icon to click on. How would I go about grabbing the task bar button so I can make it vanish?

Below is my sample code.

void CWhateverDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if (nID == SC_MINIMIZE) // Decide if minimize state changed
{
this->ShowWindow( SW_HIDE ); //Should hide the task bar icon here...
MessageBox("Min");
CDialog::OnSysCommand(nID, lParam);//Take careof the normal params
}
else if (nID == SC_RESTORE) {
//Should show the task bar button here...
MessageBox("Restore");
CDialog::OnSysCommand(nID, lParam);//Take careof the normal params
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}


SmileeTiger
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top