导读:
想做一个屏保程序,在网上找了好半天,试了n种方法,终于发现下面这个办法行得通,搜集一下。
CRect m_rcMain;
GetWindowRect(&m_rcMain);//restore the src screen's size;
//delete the showing window's caption
LONG style = GetWindowLong(m_hWnd,GWL_STYLE);
style &=~WS_CAPTION;
//set the window's show sytle
SetWindowLong(m_hWnd,GWL_STYLE,style);
//get the screen's pixel
int screenX = GetSystemMetrics(SM_CXSCREEN);
int screenY = GetSystemMetrics(SM_CYSCREEN);
//show window
SetWindowPos(NULL,0,0,screenX,screenY,SWP_NOZORDER);
隐藏鼠标图标
ShowCursor(FALSE);
本文转自
http://hi.baidu.com/neuwjyou/blog/item/ee8ea07746ec5e1ab151b960.html
想做一个屏保程序,在网上找了好半天,试了n种方法,终于发现下面这个办法行得通,搜集一下。
CRect m_rcMain;
GetWindowRect(&m_rcMain);//restore the src screen's size;
//delete the showing window's caption
LONG style = GetWindowLong(m_hWnd,GWL_STYLE);
style &=~WS_CAPTION;
//set the window's show sytle
SetWindowLong(m_hWnd,GWL_STYLE,style);
//get the screen's pixel
int screenX = GetSystemMetrics(SM_CXSCREEN);
int screenY = GetSystemMetrics(SM_CYSCREEN);
//show window
SetWindowPos(NULL,0,0,screenX,screenY,SWP_NOZORDER);
隐藏鼠标图标
ShowCursor(FALSE);
本文转自
http://hi.baidu.com/neuwjyou/blog/item/ee8ea07746ec5e1ab151b960.html