|  
 
 
vc如何实现桌面工作区域设定 
无意看到一个桌面工作区域设定工具,WorkAreaLimiter 请这个是如何实现的?还请了解的帮忙分析一下。 我在想,应该是通过钩子来实现,比如收到某个窗口的最大化的消息,则更改掉屏幕的起始点或者,结束点等等,但具体是怎么弄的不太清楚。  
#include <iostream> #include <conio.h> #include <Windows.h>   using namespace std;   int main(int, char **, char **) {     RECT rtWorkArea;     SystemParametersInfo(SPI_GETWORKAREA, 0, &rtWorkArea, 0);     RECT rtWorkAreaTmp;     rtWorkAreaTmp.left = rtWorkArea.left + 20;     rtWorkAreaTmp.top = rtWorkArea.top + 20;     rtWorkAreaTmp.right = rtWorkArea.right - 20;     rtWorkAreaTmp.bottom = rtWorkArea.bottom - 20;     SystemParametersInfo(SPI_SETWORKAREA, 0, &rtWorkAreaTmp, 0);     cout << "Open notepad.exe and maximize the window, then press any key...";     getch();     SystemParametersInfo(SPI_SETWORKAREA, 0, &rtWorkArea, 0);       return 0; }  
不用HOOK,使用SystemParametersInfo,uiAction传SPI_GETWORKAREA或SPI_SETWORKAREA。  
 |