55. FAQ o Win API |
Q> How dynamic to hide/show the button on таскбаре?
A>
Sequence of actions:
a) we Create additional invisible ws_popup a window.
m_hWnd=CreateWindowEx (NULL, TEXT ("static"), TEXT (""),
WS_POPUP,
0,0,1600,1200, NULL, NULL,
NULL, NULL);
b) the window Necessary to us it is done childом at this window. For example
hMain=CreateWindowEx (NULL, TEXT ("static"), TEXT ("Main window"),
WS_POPUP | WS_VISIBLE,
40,50,200,300, m_hWnd, NULL,
NULL, NULL);
c) to Hide the button -
{
ShowWindow (hMain, SW_HIDE);
SetWindowLong (hMain, GWL_EXSTYLE, WS_EX_APPWINDOW);
ShowWindow (hMain, SW_SHOW);
}
d) to Show -
{
ShowWindow (hMain, SW_HIDE);
SetWindowLong (hMain, GWL_EXSTYLE, NULL);
ShowWindow (hMain, SW_SHOW);
}
|
2000 (c) DM