News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

AutoHide Toolbar

Started by TimoVJL, September 20, 2015, 11:50:28 AM

Previous topic - Next topic

TimoVJL

Is this enoughtvoid OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags)
{
if (y <= 2 && !IsWindowVisible(hToolbar))
ShowWindow(hToolbar, SW_SHOW);
if (y > 20 && IsWindowVisible(hToolbar))
ShowWindow(hToolbar, SW_HIDE);
}
any known problems with it?

With timervoid OnMouseMove(HWND hwnd, int x, int y, UINT keyFlags)
{
if (y <= 2 && !IsWindowVisible(hToolbar))
ShowWindow(hToolbar, SW_SHOW);
else if (y > 20 && IsWindowVisible(hToolbar))
SetTimer(hwnd, 100, 1000, 0);
}
void OnTimer(HWND hwnd, UINT id)
{
ShowWindow(hToolbar, SW_HIDE);
KillTimer(hwnd, 100);
InvalidateRect(hwnd, NULL, FALSE);
}
May the source be with you