diff options
author | jenglish <jenglish@flightlab.com> | 2007-04-10 18:05:48 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2007-04-10 18:05:48 (GMT) |
commit | 3176b2f07414a59ba25f79a33186cd04f4e86b8a (patch) | |
tree | 43117ad0fdaaff30acbd77d3176ce968b66f2356 /win/ttkWinMonitor.c | |
parent | f479296307f674dc9267c506a41d3a0d7f4b92ef (diff) | |
download | tk-3176b2f07414a59ba25f79a33186cd04f4e86b8a.zip tk-3176b2f07414a59ba25f79a33186cd04f4e86b8a.tar.gz tk-3176b2f07414a59ba25f79a33186cd04f4e86b8a.tar.bz2 |
Re-sync with Tile codebase so patches can flow back and forth.
Diffstat (limited to 'win/ttkWinMonitor.c')
-rw-r--r-- | win/ttkWinMonitor.c | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c index 2f28e71..3dc2cad 100644 --- a/win/ttkWinMonitor.c +++ b/win/ttkWinMonitor.c @@ -1,4 +1,4 @@ -/* $Id: ttkWinMonitor.c,v 1.8 2007/02/22 13:56:35 dkf Exp $ +/* $Id: ttkWinMonitor.c,v 1.9 2007/04/10 18:05:48 jenglish Exp $ */ #ifdef _MSC_VER @@ -74,15 +74,13 @@ static void RegisterSystemColors(Tcl_Interp *interp) } static HWND -CreateThemeMonitorWindow( - HINSTANCE hinst, - Tcl_Interp *interp) +CreateThemeMonitorWindow(HINSTANCE hinst, Tcl_Interp *interp) { WNDCLASSEX wc; - HWND hwnd = NULL; - CHAR title[32] = "TtkMonitorWindow"; - CHAR name[32] = "TtkMonitorClass"; - + HWND hwnd = NULL; + CHAR title[32] = "TtkMonitorWindow"; + CHAR name[32] = "TtkMonitorClass"; + wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; @@ -95,11 +93,11 @@ CreateThemeMonitorWindow( wc.hbrBackground = (HBRUSH)COLOR_WINDOW; wc.lpszMenuName = name; wc.lpszClassName = name; - + if (RegisterClassEx(&wc)) { - hwnd = CreateWindow(name, title, WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, - NULL, NULL, hinst, NULL ); + hwnd = CreateWindow( name, title, WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + NULL, NULL, hinst, NULL ); #ifdef _WIN64 SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG)interp); #else @@ -111,20 +109,15 @@ CreateThemeMonitorWindow( return hwnd; } -static void -DestroyThemeMonitorWindow( - void *clientData) +static void +DestroyThemeMonitorWindow(void *clientData) { HWND hwnd = (HWND)clientData; DestroyWindow(hwnd); } static LRESULT WINAPI -WndProc( - HWND hwnd, - UINT msg, - WPARAM wp, - LPARAM lp) +WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) { #ifdef _WIN64 Tcl_Interp *interp = (Tcl_Interp *)GetWindowLongPtr(hwnd, GWLP_USERDATA); @@ -164,12 +157,10 @@ WndProc( MODULE_SCOPE int TtkWinTheme_Init(Tcl_Interp *, HWND hwnd); MODULE_SCOPE int TtkXPTheme_Init(Tcl_Interp *, HWND hwnd); -MODULE_SCOPE int -Ttk_WinPlatformInit( - Tcl_Interp *interp) +MODULE_SCOPE int Ttk_WinPlatformInit(Tcl_Interp *interp) { HWND hwnd; - + hwnd = CreateThemeMonitorWindow(Tk_GetHINSTANCE(), interp); Ttk_RegisterCleanup(interp, (ClientData)hwnd, DestroyThemeMonitorWindow); @@ -178,3 +169,4 @@ Ttk_WinPlatformInit( return TCL_OK; } + |