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>
This commit is contained in:
Colin Harrison 2009-07-26 20:48:19 +01:00 committed by Jon TURNEY
parent 764ce6ee68
commit de2ae521ab
2 changed files with 18 additions and 8 deletions

View File

@ -92,10 +92,11 @@ winInitClipboard (void)
HWND HWND
winClipboardCreateMessagingWindow (void) winClipboardCreateMessagingWindow (void)
{ {
WNDCLASS wc; WNDCLASSEX wc;
HWND hwnd; HWND hwnd;
/* Setup our window class */ /* Setup our window class */
wc.cbSize=sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW; wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = winClipboardWindowProc; wc.lpfnWndProc = winClipboardWindowProc;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;
@ -106,7 +107,8 @@ winClipboardCreateMessagingWindow (void)
wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.lpszClassName = WIN_CLIPBOARD_WINDOW_CLASS; wc.lpszClassName = WIN_CLIPBOARD_WINDOW_CLASS;
RegisterClass (&wc); wc.hIconSm = 0;
RegisterClassEx (&wc);
/* Create the window */ /* Create the window */
hwnd = CreateWindowExA (0, /* Extended styles */ hwnd = CreateWindowExA (0, /* Extended styles */

View File

@ -63,7 +63,7 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen)
int iWidth = pScreenInfo->dwWidth; int iWidth = pScreenInfo->dwWidth;
int iHeight = pScreenInfo->dwHeight; int iHeight = pScreenInfo->dwHeight;
HWND *phwnd = &pScreenPriv->hwndScreen; HWND *phwnd = &pScreenPriv->hwndScreen;
WNDCLASS wc; WNDCLASSEX wc;
char szTitle[256]; char szTitle[256];
#if CYGDEBUG #if CYGDEBUG
@ -71,17 +71,21 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen)
#endif #endif
/* Setup our window class */ /* Setup our window class */
wc.cbSize=sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW; wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = winWindowProc; wc.lpfnWndProc = winWindowProc;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
wc.hInstance = g_hInstance; 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.hCursor = 0;
wc.hbrBackground = 0; wc.hbrBackground = 0;
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.lpszClassName = WINDOW_CLASS; 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 */ /* Set display and screen-specific tooltip text */
if (g_pszQueryHost != NULL) if (g_pszQueryHost != NULL)
@ -152,7 +156,7 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
int iPosX; int iPosX;
int iPosY; int iPosY;
HWND *phwnd = &pScreenPriv->hwndScreen; HWND *phwnd = &pScreenPriv->hwndScreen;
WNDCLASS wc; WNDCLASSEX wc;
RECT rcClient, rcWorkArea; RECT rcClient, rcWorkArea;
DWORD dwWindowStyle; DWORD dwWindowStyle;
BOOL fForceShowWindow = FALSE; BOOL fForceShowWindow = FALSE;
@ -195,17 +199,21 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen)
dwWindowStyle |= WS_POPUP; dwWindowStyle |= WS_POPUP;
/* Setup our window class */ /* Setup our window class */
wc.cbSize=sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW; wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = winWindowProc; wc.lpfnWndProc = winWindowProc;
wc.cbClsExtra = 0; wc.cbClsExtra = 0;
wc.cbWndExtra = 0; wc.cbWndExtra = 0;
wc.hInstance = g_hInstance; 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.hCursor = 0;
wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wc.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
wc.lpszMenuName = NULL; wc.lpszMenuName = NULL;
wc.lpszClassName = WINDOW_CLASS; 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 */ /* Get size of work area */
winGetWorkArea (&rcWorkArea, pScreenInfo); winGetWorkArea (&rcWorkArea, pScreenInfo);