diff options
author | Colin Harrison <colin.harrison@virgin.net> | 2009-07-26 20:48:19 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2009-07-29 17:05:17 +0100 |
commit | de2ae521abde445daaf025a07aa01563ca5ddd41 (patch) | |
tree | 9015d88d4d7067fd0173818e12f2ec5bd27ea6c0 | |
parent | 764ce6ee683db342264bbca4df6379eb6093fb85 (diff) |
Xming: Use RegisterClassEx() instead of superseded RegisterClass()
RegisterClass is supserseded by RegisterClassEx, so change to using that everywhere
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r-- | hw/xwin/winclipboardinit.c | 6 | ||||
-rw-r--r-- | hw/xwin/wincreatewnd.c | 20 |
2 files changed, 18 insertions, 8 deletions
diff --git a/hw/xwin/winclipboardinit.c b/hw/xwin/winclipboardinit.c index 3e73bc610..bec63ac8e 100644 --- a/hw/xwin/winclipboardinit.c +++ b/hw/xwin/winclipboardinit.c @@ -92,10 +92,11 @@ winInitClipboard (void) HWND winClipboardCreateMessagingWindow (void) { - WNDCLASS wc; + WNDCLASSEX wc; HWND hwnd; /* Setup our window class */ + wc.cbSize=sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winClipboardWindowProc; wc.cbClsExtra = 0; @@ -106,7 +107,8 @@ winClipboardCreateMessagingWindow (void) wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = WIN_CLIPBOARD_WINDOW_CLASS; - RegisterClass (&wc); + wc.hIconSm = 0; + RegisterClassEx (&wc); /* Create the window */ hwnd = CreateWindowExA (0, /* Extended styles */ diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c index 85b6cf8a9..0c342e1ae 100644 --- a/hw/xwin/wincreatewnd.c +++ b/hw/xwin/wincreatewnd.c @@ -63,7 +63,7 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen) int iWidth = pScreenInfo->dwWidth; int iHeight = pScreenInfo->dwHeight; HWND *phwnd = &pScreenPriv->hwndScreen; - WNDCLASS wc; + WNDCLASSEX wc; char szTitle[256]; #if CYGDEBUG @@ -71,17 +71,21 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen) #endif /* Setup our window class */ + wc.cbSize=sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = g_hInstance; - wc.hIcon = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN)); + wc.hIcon = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0); wc.hCursor = 0; wc.hbrBackground = 0; wc.lpszMenuName = NULL; wc.lpszClassName = WINDOW_CLASS; - RegisterClass (&wc); + wc.hIconSm = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE); + RegisterClassEx (&wc); /* Set display and screen-specific tooltip text */ if (g_pszQueryHost != NULL) @@ -152,7 +156,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen) int iPosX; int iPosY; HWND *phwnd = &pScreenPriv->hwndScreen; - WNDCLASS wc; + WNDCLASSEX wc; RECT rcClient, rcWorkArea; DWORD dwWindowStyle; BOOL fForceShowWindow = FALSE; @@ -195,17 +199,21 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen) dwWindowStyle |= WS_POPUP; /* Setup our window class */ + wc.cbSize=sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = g_hInstance; - wc.hIcon = LoadIcon (g_hInstance, MAKEINTRESOURCE(IDI_XWIN)); + wc.hIcon = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0); wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = WINDOW_CLASS; - RegisterClass (&wc); + wc.hIconSm = (HICON)LoadImage (g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, + GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE); + RegisterClassEx (&wc); /* Get size of work area */ winGetWorkArea (&rcWorkArea, pScreenInfo); |