これは私のコードです:
internal enum WindowsMessagesFlags {
WM_EXITSIZEMOVE = 0x00000232,
WM_DISPLAYCHANGE = 0x0000007e,
WM_MOVING = 0x00000216,
}
protected override void WndProc(ref Message m) {
switch(m.Msg) {
case (int)WindowsMessagesFlags.WM_DISPLAYCHANGE:
FixWindowSnapping();
break;
case (int)WindowsMessagesFlags.WM_EXITSIZEMOVE:
SaveWindowProperties();
break;
case (int)WindowsMessagesFlags.WM_MOVING:
KeepProperLocation(ref m);
break;
}
}
とにかくキャストを防ぐ方法はありますか?