In the main function, i modified the some code:
LONG _style = GetWindowLong(hWnd, GWL_STYLE);
LONG _exStyle = GetWindowLong(hWnd, GWL_EXSTYLE);
// remove window frame and window caption
_style &= ~(WS_CAPTION | WS_THICKFRAME);
_exStyle |= WS_EX_TOOLWINDOW;
// To remove taskbar item (Very important)
ShowWindow(hWnd, SW_HIDE);
SetWindowLong(hWnd, GWL_STYLE, _style);
SetWindowLong(hWnd, GWL_EXSTYLE, _exStyle);
//auto adjust to screen size
SetWindowPos(hWnd, NULL, 0, 0, GetSystemMetrics(SM_CXSCREEN),
GetSystemMetrics(SM_CYSCREEN), 0);
ShowWindow(hWnd, SW_SHOW);
請先 登入 以發表留言。