SmileeTiger
Programmer
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
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