Changeset 3145 for trunk/src/comctl32/pager.cpp
- Timestamp:
- Mar 17, 2000, 6:13:26 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/pager.cpp
r2875 r3145 1 /* $Id: pager.cpp,v 1. 1 2000-02-23 17:09:45cbratschi Exp $ */1 /* $Id: pager.cpp,v 1.2 2000-03-17 17:13:23 cbratschi Exp $ */ 2 2 /* 3 3 * Pager control … … 18 18 #include "winbase.h" 19 19 #include "commctrl.h" 20 #include "ccbase.h" 20 21 #include "pager.h" 21 22 22 23 #define PAGER_GetInfoPtr(hwnd) ((PAGER_INFO *)GetWindowLongA(hwnd, 0)) 24 23 #define PAGER_GetInfoPtr(hwnd) ((PAGER_INFO*)getInfoPtr(hwnd)) 25 24 26 25 static LRESULT … … 94 93 if (infoPtr->hwndChild) { 95 94 ZeroMemory (&nmpgcs, sizeof (NMPGCALCSIZE)); 96 nmpgcs.hdr.hwndFrom = hwnd;97 nmpgcs.hdr.idFrom = GetWindowLongA (hwnd, GWL_ID);98 nmpgcs.hdr.code = PGN_CALCSIZE;99 95 nmpgcs.dwFlag = (dwStyle & PGS_HORZ) ? PGF_CALCWIDTH : PGF_CALCHEIGHT; 100 SendMessageA (GetParent (hwnd), WM_NOTIFY, 101 (WPARAM)nmpgcs.hdr.idFrom, (LPARAM)&nmpgcs); 96 sendNotify(hwnd,PGN_CALCSIZE,&nmpgcs.hdr); 102 97 103 98 infoPtr->nChildSize = (dwStyle & PGS_HORZ) ? nmpgcs.iWidth : nmpgcs.iHeight; … … 205 200 206 201 /* allocate memory for info structure */ 207 infoPtr = (PAGER_INFO *)COMCTL32_Alloc (sizeof(PAGER_INFO));202 infoPtr = (PAGER_INFO*)initControl(hwnd,sizeof(PAGER_INFO)); 208 203 SetWindowLongA (hwnd, 0, (DWORD)infoPtr); 209 204 … … 225 220 PAGER_INFO *infoPtr = PAGER_GetInfoPtr (hwnd); 226 221 227 228 229 230 222 /* free pager info data */ 231 COMCTL32_Free (infoPtr);223 doneControl(hwnd); 232 224 233 225 return 0; … … 356 348 // ERR (pager, "unknown msg %04x wp=%08x lp=%08lx\n", 357 349 // uMsg, wParam, lParam); 358 return DefWindowProcA (hwnd, uMsg, wParam, lParam);350 return defComCtl32ProcA (hwnd, uMsg, wParam, lParam); 359 351 } 360 352 return 0; … … 366 358 { 367 359 WNDCLASSA wndClass; 368 369 //SvL: Don't check this now370 // if (GlobalFindAtomA (WC_PAGESCROLLERA)) return;371 360 372 361 ZeroMemory (&wndClass, sizeof(WNDCLASSA)); … … 386 375 PAGER_Unregister (VOID) 387 376 { 388 if (GlobalFindAtomA (WC_PAGESCROLLERA)) 389 UnregisterClassA (WC_PAGESCROLLERA, (HINSTANCE)NULL); 390 } 391 377 UnregisterClassA (WC_PAGESCROLLERA, (HINSTANCE)NULL); 378 } 379
Note:
See TracChangeset
for help on using the changeset viewer.