*/
public LRESULT callback(HWND hwnd, int uMsg, WPARAM wParam, LPARAM lParam) {
switch (uMsg) {
case WinUser.WM_CREATE: {
onCreate(wParam, lParam);
return new LRESULT(0);
}
case WinUser.WM_DESTROY: {
User32.INSTANCE.PostQuitMessage(0);
return new LRESULT(0);
}
case WinUser.WM_SESSION_CHANGE: {
this.onSessionChange(wParam, lParam);
return new LRESULT(0);
}
case WinUser.WM_DEVICECHANGE: {
LRESULT lResult = this.onDeviceChange(wParam, lParam);
return lResult != null ? lResult :
User32.INSTANCE.DefWindowProc(hwnd, uMsg, wParam, lParam);
}
default:
return User32.INSTANCE.DefWindowProc(hwnd, uMsg, wParam, lParam);