回复 40楼 有容就大
其实这个程序还影射了另一种程序的原理:实现切屏程序。呵呵,想想这个短小的示例程序价值,不得不佩服一下罗云彬先生。
我们都在路上。。。。。
BOOL Create(HINSTANCE hInst, int nCmdShow) { hInstance = hInst; // Connect with the global instance HWND hWnd = CreateWindowEx(0, szAppName, szAppName, WS_OVERLAPPEDWINDOW, 60, 60, 100, 100, NULL, NULL, hInst, NULL); ------
void yrjd_OnSize(HWND hWnd, UINT state, int cxClient, int cyClient) { MoveWindow(hWnd, 20, 20, cxClient/2 , cyClient/2 , TRUE); ; }
// Set the circle window and set the "top most" HRGN hRgn = CreateEllipticRgn(0, 0, CLOCK_SIZE + 1, CLOCK_SIZE + 1); SetWindowRgn(hWndMain, hRgn, TRUE); DeleteObject(hRgn); SetWindowPos(hWndMain, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);发现上面这个代码把SetWindowPos注释掉对程序没影响啊