15,981
社区成员




#ifndef SPI_GETWINARRANGING
#define SPI_GETWINARRANGING 0x0082
#endif
#ifndef SPI_SETWINARRANGING
#define SPI_SETWINARRANGING 0x0083
#endif
#ifndef SPI_GETSNAPSIZING
#define SPI_GETSNAPSIZING 0x008E
#endif
#ifndef SPI_SETSNAPSIZING
#define SPI_SETSNAPSIZING 0x008F
#endif
// 拖拽前
BOOL fWinArrange;
BOOL fSnapSizing;
SystemParametersInfo(SPI_GETWINARRANGING, 0, (LPVOID)&fWinArrange, 0);
SystemParametersInfo(SPI_GETSNAPSIZING, 0, (LPVOID)&fSnapSizing, 0);
SystemParametersInfo(SPI_SETWINARRANGING, 0, (LPVOID)TRUE, 0);
SystemParametersInfo(SPI_SETSNAPSIZING, 0, (LPVOID)FALSE, 0);
// 拖拽后
SystemParametersInfo(SPI_SETWINARRANGING, 0, (LPVOID)fWinArrange, 0);
SystemParametersInfo(SPI_SETSNAPSIZING, 0, (LPVOID)fSnapSizing, 0);
#ifndef SPI_GETWINARRANGING
#define SPI_GETWINARRANGING 0x0082
#endif
#ifndef SPI_SETWINARRANGING
#define SPI_SETWINARRANGING 0x0083
#endif
#ifndef SPI_GETSNAPSIZING
#define SPI_GETSNAPSIZING 0x008E
#endif
#ifndef SPI_SETSNAPSIZING
#define SPI_SETSNAPSIZING 0x008F
#endif
// 此项必须开启,下一项设置为关闭才有效。
SystemParametersInfo(SPI_SETWINARRANGING, 0, (LPVOID)TRUE, 0);
SystemParametersInfo(SPI_SETSNAPSIZING, 0, (LPVOID)FALSE, 0);
如果你只是想在