26 |
|
|
27 |
#define snprintf _snprintf |
#define snprintf _snprintf |
28 |
|
|
29 |
HHOOK hCbtProc = 0; |
HHOOK hCbtProc = 0; |
30 |
HHOOK hShellProc = 0; |
HHOOK hShellProc = 0; |
31 |
HHOOK hWndProc = 0; |
HHOOK hWndProc = 0; |
32 |
HINSTANCE hInst = 0; |
HINSTANCE hInst = 0; |
90 |
CREATESTRUCT *cs = ( CREATESTRUCT * ) details->lParam; |
CREATESTRUCT *cs = ( CREATESTRUCT * ) details->lParam; |
91 |
LONG dwStyle = GetWindowLong( details->hwnd, GWL_STYLE ); |
LONG dwStyle = GetWindowLong( details->hwnd, GWL_STYLE ); |
92 |
WINDOWPOS *wp = ( WINDOWPOS * ) details->lParam; |
WINDOWPOS *wp = ( WINDOWPOS * ) details->lParam; |
93 |
RECT *rect = ( RECT * ) details->lParam; |
RECT rect; |
94 |
|
|
95 |
switch ( details->message ) { |
switch ( details->message ) { |
96 |
|
|
97 |
case WM_SIZING: |
case WM_WINDOWPOSCHANGED: |
98 |
case WM_MOVING: |
if ( !( dwStyle & WS_DLGFRAME ) ) |
|
if ( !( dwStyle & WS_VISIBLE ) ) |
|
99 |
break; |
break; |
100 |
|
|
101 |
if ( !( dwStyle & WS_DLGFRAME ) ) |
if ( wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE ) |
102 |
break; |
break; |
103 |
|
|
104 |
|
if ( !GetWindowRect( details->hwnd, &rect ) ) { |
105 |
|
SendDebug( "GetWindowRect failed!\n" ); |
106 |
|
break; |
107 |
|
} |
108 |
|
|
109 |
snprintf( result, sizeof( result ), |
snprintf( result, sizeof( result ), |
110 |
"POSITION1,0x%p,%d,%d,%d,%d,0x%x", |
"POSITION1,0x%p,%d,%d,%d,%d,0x%x\n", |
111 |
details->hwnd, |
details->hwnd, |
112 |
rect->left, rect->top, |
rect.left, rect.top, |
113 |
rect->right - rect->left, |
rect.right - rect.left, |
114 |
rect->bottom - rect->top, |
rect.bottom - rect.top, |
115 |
0 ); |
0 ); |
116 |
result[ sizeof( result ) - 1 ] = '\0'; |
result[ sizeof( result ) - 1 ] = '\0'; |
117 |
WriteToChannel( result ); |
WriteToChannel( result ); |
118 |
|
|
119 |
break; |
break; |
120 |
|
|
121 |
|
|
128 |
WM_WINDOWPOSCHANGING event is sent which looks just like |
WM_WINDOWPOSCHANGING event is sent which looks just like |
129 |
the event that was sent when the About dialog was opened... */ |
the event that was sent when the About dialog was opened... */ |
130 |
case WM_WINDOWPOSCHANGING: |
case WM_WINDOWPOSCHANGING: |
|
|
|
|
if ( !( dwStyle & WS_VISIBLE ) ) |
|
|
break; |
|
|
|
|
131 |
if ( !( dwStyle & WS_DLGFRAME ) ) |
if ( !( dwStyle & WS_DLGFRAME ) ) |
132 |
break; |
break; |
133 |
|
|
146 |
case WM_CREATE: |
case WM_CREATE: |
147 |
if ( cs->style & WS_DLGFRAME ) { |
if ( cs->style & WS_DLGFRAME ) { |
148 |
|
|
149 |
|
if ( cs->cx < 0 || cs->cy < 0 ) |
150 |
|
break; |
151 |
|
|
152 |
snprintf( result, sizeof( result ), |
snprintf( result, sizeof( result ), |
153 |
"CREATE1,0x%p,0x%x\n", |
"CREATE1,0x%p,0x%x\n", |
154 |
details->hwnd, 0 ); |
details->hwnd, 0 ); |
159 |
"SETSTATE1,0x%p,%s,0x%x,0x%x\n", |
"SETSTATE1,0x%p,%s,0x%x,0x%x\n", |
160 |
details->hwnd, |
details->hwnd, |
161 |
cs->lpszName, |
cs->lpszName, |
162 |
1, // FIXME: Check for WS_MAXIMIZE/WS_MINIMIZE |
1, // FIXME: Check for WS_MAXIMIZE/WS_MINIMIZE |
163 |
0 ); |
0 ); |
164 |
result[ sizeof( result ) - 1 ] = '\0'; |
result[ sizeof( result ) - 1 ] = '\0'; |
165 |
WriteToChannel( result ); |
WriteToChannel( result ); |
166 |
|
|
167 |
snprintf( result, sizeof( result ), |
snprintf( result, sizeof( result ), |
168 |
"POSITION1,0x%p,%d,%d,%d,%d,0x%x", |
"POSITION1,0x%p,%d,%d,%d,%d,0x%x\n", |
169 |
details->hwnd, |
details->hwnd, |
170 |
cs->x, |
cs->x, |
171 |
cs->y, |
cs->y, |