Changeset 496 for trunk/src/comctl32/pager.c
- Timestamp:
- Aug 14, 1999, 6:13:16 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/pager.c
r94 r496 1 /* $Id: pager.c,v 1. 3 1999-06-10 16:22:01 achimhaExp $ */1 /* $Id: pager.c,v 1.4 1999-08-14 16:13:12 cbratschi Exp $ */ 2 2 /* 3 3 * Pager control … … 93 93 94 94 if (infoPtr->hwndChild) { 95 96 97 98 99 100 101 102 103 95 ZeroMemory (&nmpgcs, sizeof (NMPGCALCSIZE)); 96 nmpgcs.hdr.hwndFrom = hwnd; 97 nmpgcs.hdr.idFrom = GetWindowLongA (hwnd, GWL_ID); 98 nmpgcs.hdr.code = PGN_CALCSIZE; 99 nmpgcs.dwFlag = (dwStyle & PGS_HORZ) ? PGF_CALCWIDTH : PGF_CALCHEIGHT; 100 SendMessageA (GetParent (hwnd), WM_NOTIFY, 101 (WPARAM)nmpgcs.hdr.idFrom, (LPARAM)&nmpgcs); 102 103 infoPtr->nChildSize = (dwStyle & PGS_HORZ) ? nmpgcs.iWidth : nmpgcs.iHeight; 104 104 105 105 … … 168 168 /* FIXME: redraw */ 169 169 if (infoPtr->hwndChild) { 170 SetParent (infoPtr->hwndChild, hwnd); 171 SetWindowPos (infoPtr->hwndChild, HWND_TOP, 172 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE); 170 RECT rect; 171 172 GetClientRect(hwnd,&rect); 173 SetParent (infoPtr->hwndChild, hwnd); 174 SetWindowPos (infoPtr->hwndChild, HWND_TOP, 175 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE); 176 177 MoveWindow (infoPtr->hwndChild, 0, 0, rect.right, rect.bottom, TRUE); 173 178 } 174 179 … … 188 193 /* FIXME: redraw */ 189 194 SetWindowPos (infoPtr->hwndChild, HWND_TOP, 190 195 0, 0, 0, 0, SWP_SHOWWINDOW | SWP_NOSIZE); 191 196 192 197 return 0; … … 268 273 GetClientRect (hwnd, &rect); 269 274 if (infoPtr->hwndChild) { 270 271 272 273 /* MoveWindow32(infoPtr->hwndChild, 1, 1, rect.right - 2, rect.bottom-2, TRUE); */274 /* UpdateWindow32(infoPtr->hwndChild); */275 SetWindowPos (infoPtr->hwndChild, HWND_TOP, rect.left, rect.top, 276 rect.right - rect.left, rect.bottom - rect.top, 277 SWP_SHOWWINDOW); 278 /* MoveWindow (infoPtr->hwndChild, 1, 1, rect.right - 2, rect.bottom-2, TRUE); */ 279 /* UpdateWindow (infoPtr->hwndChild); */ 275 280 276 281 } 277 /* FillRect 32 ((HDC32)wParam, &rect, hBrush); */278 /* DeleteObject 32(hBrush); */282 /* FillRect ((HDC)wParam, &rect, hBrush); */ 283 /* DeleteObject (hBrush); */ 279 284 return TRUE; 280 285 } … … 282 287 283 288 284 LRESULT WINAPI289 static LRESULT WINAPI 285 290 PAGER_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 286 291 { 287 292 switch (uMsg) 288 293 { 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 /* 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 /* 344 /* 345 346 347 348 349 350 // 351 // 352 // 353 294 case PGM_FORWARDMOUSE: 295 return PAGER_ForwardMouse (hwnd, wParam); 296 297 case PGM_GETBKCOLOR: 298 return PAGER_GetBkColor (hwnd, wParam, lParam); 299 300 case PGM_GETBORDER: 301 return PAGER_GetBorder (hwnd, wParam, lParam); 302 303 case PGM_GETBUTTONSIZE: 304 return PAGER_GetButtonSize (hwnd, wParam, lParam); 305 306 case PGM_GETBUTTONSTATE: 307 return PAGER_GetButtonState (hwnd, wParam, lParam); 308 309 /* case PGM_GETDROPTARGET: */ 310 311 case PGM_GETPOS: 312 return PAGER_SetPos (hwnd, wParam, lParam); 313 314 case PGM_RECALCSIZE: 315 return PAGER_RecalcSize (hwnd, wParam, lParam); 316 317 case PGM_SETBKCOLOR: 318 return PAGER_SetBkColor (hwnd, wParam, lParam); 319 320 case PGM_SETBORDER: 321 return PAGER_SetBorder (hwnd, wParam, lParam); 322 323 case PGM_SETBUTTONSIZE: 324 return PAGER_SetButtonSize (hwnd, wParam, lParam); 325 326 case PGM_SETCHILD: 327 return PAGER_SetChild (hwnd, wParam, lParam); 328 329 case PGM_SETPOS: 330 return PAGER_SetPos (hwnd, wParam, lParam); 331 332 case WM_CREATE: 333 return PAGER_Create (hwnd, wParam, lParam); 334 335 case WM_DESTROY: 336 return PAGER_Destroy (hwnd, wParam, lParam); 337 338 case WM_ERASEBKGND: 339 return PAGER_EraseBackground (hwnd, wParam, lParam); 340 341 case WM_MOUSEMOVE: 342 return PAGER_MouseMove (hwnd, wParam, lParam); 343 344 case WM_NOTIFY: 345 case WM_COMMAND: 346 return SendMessageA (GetParent (hwnd), uMsg, wParam, lParam); 347 348 /* case WM_PAINT: */ 349 /* return PAGER_Paint (hwnd, wParam); */ 350 351 case WM_SIZE: 352 return PAGER_Size (hwnd, wParam, lParam); 353 354 default: 355 // if (uMsg >= WM_USER) 356 // ERR (pager, "unknown msg %04x wp=%08x lp=%08lx\n", 357 // uMsg, wParam, lParam); 358 return DefWindowProcA (hwnd, uMsg, wParam, lParam); 354 359 } 355 360 return 0; … … 372 377 wndClass.hbrBackground = 0; 373 378 wndClass.lpszClassName = WC_PAGESCROLLERA; 374 379 375 380 RegisterClassA (&wndClass); 376 381 } … … 381 386 { 382 387 if (GlobalFindAtomA (WC_PAGESCROLLERA)) 383 384 } 385 388 UnregisterClassA (WC_PAGESCROLLERA, (HINSTANCE)NULL); 389 } 390
Note:
See TracChangeset
for help on using the changeset viewer.