struct FocusRectInfo
{public:
void Open()
{
nOldInfox = nOldInfoy = 0;
nHasXValue = SystemParametersInfo(SPI_GETFOCUSBORDERWIDTH ,0,&nOldInfox,0);
nHasYValue = SystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT,0,&nOldInfoy,0); if( !nHasXValue || !nHasYValue)
return; BOOL B;
int *nInfo = NULL;
B = SystemParametersInfo(SPI_SETFOCUSBORDERWIDTH ,0,nInfo,SPIF_SENDWININICHANGE);
B = SystemParametersInfo(SPI_SETFOCUSBORDERHEIGHT,0,nInfo,SPIF_SENDWININICHANGE); nHasXValue = SystemParametersInfo(SPI_GETFOCUSBORDERWIDTH ,0,&nOldInfox,0);
nHasYValue = SystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT,0,&nOldInfoy,0); }
void Close()
{
if( !nHasXValue || !nHasYValue)
return;// SystemParametersInfo(SPI_SETFOCUSBORDERWIDTH, 0,&nOldInfox,SPIF_SENDCHANGE);
// SystemParametersInfo(SPI_SETFOCUSBORDERHEIGHT,0,&nOldInfoy,SPIF_SENDCHANGE);
}private:
BOOL nHasXValue,nHasYValue;
int nOldInfox,nOldInfoy;
};
{public:
void Open()
{
nOldInfox = nOldInfoy = 0;
nHasXValue = SystemParametersInfo(SPI_GETFOCUSBORDERWIDTH ,0,&nOldInfox,0);
nHasYValue = SystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT,0,&nOldInfoy,0); if( !nHasXValue || !nHasYValue)
return; BOOL B;
int *nInfo = NULL;
B = SystemParametersInfo(SPI_SETFOCUSBORDERWIDTH ,0,nInfo,SPIF_SENDWININICHANGE);
B = SystemParametersInfo(SPI_SETFOCUSBORDERHEIGHT,0,nInfo,SPIF_SENDWININICHANGE); nHasXValue = SystemParametersInfo(SPI_GETFOCUSBORDERWIDTH ,0,&nOldInfox,0);
nHasYValue = SystemParametersInfo(SPI_GETFOCUSBORDERHEIGHT,0,&nOldInfoy,0); }
void Close()
{
if( !nHasXValue || !nHasYValue)
return;// SystemParametersInfo(SPI_SETFOCUSBORDERWIDTH, 0,&nOldInfox,SPIF_SENDCHANGE);
// SystemParametersInfo(SPI_SETFOCUSBORDERHEIGHT,0,&nOldInfoy,SPIF_SENDCHANGE);
}private:
BOOL nHasXValue,nHasYValue;
int nOldInfox,nOldInfoy;
};
解决方案 »
- 本机程序之间用Socket 还是sendmessage比较好,另外发消息需要句柄吗???
- 请问为什么软件打开后看不到窗口,但任务管理器中却有进程?
- 使用WSADuplicateSocket的例子,大家看看
- 请教关于ATL的问题
- 请教如何获得硬件名称
- 为什么一个编译没有任何问题的程序在运行时会出来IE错误报告?
- 急!!!!!!!有哪位好心的高高手肯帮帮我解决一道有关VC++进程的题目?!!!!!!(转)
- 有谁知道Windows TTF字体文件的结构,如何遍历。如何从中取出有用的信息生成一个子字体文件。
- 如何显示gif之类的动画图片
- 一不小心,整出一个病毒!120分---!!!
- AssertValid在Release版中出现会报错吗?
- cpp文件损坏,能修复吗?
#ifndef SPI_GETFOCUSBORDERWIDTH
#define SPI_GETFOCUSBORDERWIDTH 0x200E
#endif#ifndef SPI_SETFOCUSBORDERWIDTH
#define SPI_SETFOCUSBORDERWIDTH 0x200F
#endif#ifndef SPI_GETFOCUSBORDERHEIGHT
#define SPI_GETFOCUSBORDERHEIGHT 0x2010
#endif#ifndef SPI_SETFOCUSBORDERHEIGHT
#define SPI_SETFOCUSBORDERHEIGHT 0x2011
#endif