return wtk.getWinEventQueue().windowProc(hwnd, msg, wParam, lParam);
}
public static void registerWindowClass(String className, long windowProc) {
Int16Pointer namePtr = WinEventQueue.bridge.createInt16Pointer(
className, false);
Win32.WNDCLASSEXW wndCls = win32.createWNDCLASSEXW(false);
wndCls.set_cbSize(wndCls.size());
wndCls.set_style(WindowsDefs.CS_OWNDC);
wndCls.set_lpfnWndProc(windowProc);
wndCls.set_hCursor(0);
wndCls.set_lpszClassName(namePtr);
short classAtom = win32.RegisterClassExW(wndCls);
int winError = win32.GetLastError();
namePtr.unlock();
if (classAtom == 0) {
throw new InternalError("Failed to register window class "
+ className + " GetLastError returned " + winError);
}