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);
創作者介紹
創作者 Conan 0101 的部落格 的頭像
Conan

Conan 0101 的部落格

Conan 發表在 痞客邦 留言(0) 人氣( 8 )