Changeset 3145 for trunk/src/comctl32/CCBase.cpp
- Timestamp:
- Mar 17, 2000, 6:13:26 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/CCBase.cpp
r2895 r3145 1 /* $Id: CCBase.cpp,v 1. 2 2000-02-25 17:00:15cbratschi Exp $ */1 /* $Id: CCBase.cpp,v 1.3 2000-03-17 17:13:22 cbratschi Exp $ */ 2 2 /* 3 3 * COMCTL32 Base Functions and Macros for all Controls … … 35 35 infoPtr->fUnicode = IsWindowUnicode(hwnd); 36 36 infoPtr->uNotifyFormat = sendNotifyFormat(GetParent(hwnd),hwnd,NF_QUERY); 37 infoPtr->hwndNotify = GetParent(hwnd); 37 38 38 39 return infoPtr; … … 109 110 break; 110 111 } 112 113 case CCM_SETNOTIFYWINDOW: 114 { 115 infoPtr = getInfoPtr(hwnd); 116 117 if (!infoPtr) break; 118 119 infoPtr->hwndNotify = (HWND)wParam; 120 121 break; 122 } 111 123 } 112 124 … … 143 155 } 144 156 157 HWND getNotifyWindow(COMCTL32_HEADER *infoPtr) 158 { 159 if (!infoPtr) return 0; 160 161 return infoPtr->hwndNotify; 162 } 163 164 HWND getNotifyWindow(HWND hwnd) 165 { 166 COMCTL32_HEADER *infoPtr = getInfoPtr(hwnd); 167 168 return getNotifyWindow(infoPtr); 169 } 170 145 171 LRESULT sendNotify(HWND hwnd,UINT code) 146 172 { … … 151 177 nmhdr.code = code; 152 178 153 return SendMessageA( GetParent(hwnd),WM_NOTIFY,nmhdr.idFrom,(LPARAM)&nmhdr);179 return SendMessageA(getNotifyWindow(hwnd),WM_NOTIFY,nmhdr.idFrom,(LPARAM)&nmhdr); 154 180 } 155 181 … … 162 188 nmhdr->code = code; 163 189 164 return SendMessageA( GetParent(hwnd),WM_NOTIFY,nmhdr->idFrom,(LPARAM)nmhdr);190 return SendMessageA(getNotifyWindow(hwnd),WM_NOTIFY,nmhdr->idFrom,(LPARAM)nmhdr); 165 191 } 166 192 … … 172 198 LRESULT sendCommand(HWND hwnd,UINT wNotifyCode) 173 199 { 174 return SendMessageA(GetParent(hwnd),WM_COMMAND,MAKEWPARAM(GetWindowLongA(hwnd,GWL_ID),wNotifyCode),(LPARAM)hwnd); 200 return SendMessageA(getNotifyWindow(hwnd),WM_COMMAND,MAKEWPARAM(GetWindowLongA(hwnd,GWL_ID),wNotifyCode),(LPARAM)hwnd); 201 } 202 203 LRESULT sendHScroll(HWND hwnd,UINT wNotifyCode) 204 { 205 return SendMessageA(getNotifyWindow(hwnd),WM_HSCROLL,(WPARAM)wNotifyCode,(LPARAM)hwnd); 206 } 207 208 LRESULT sendVScroll(HWND hwnd,UINT wNotifyCode) 209 { 210 return SendMessageA(getNotifyWindow(hwnd),WM_VSCROLL,(WPARAM)wNotifyCode,(LPARAM)hwnd); 175 211 } 176 212
Note:
See TracChangeset
for help on using the changeset viewer.