从系统级取消:
#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);
只在拖动窗口时设置,可以先save再restore:
#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