Changeset 3280 for trunk/src/comctl32/CCBase.cpp
- Timestamp:
- Mar 30, 2000, 5:39:10 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/CCBase.cpp
r3182 r3280 1 /* $Id: CCBase.cpp,v 1. 5 2000-03-21 17:30:40cbratschi Exp $ */1 /* $Id: CCBase.cpp,v 1.6 2000-03-30 15:39:08 cbratschi Exp $ */ 2 2 /* 3 3 * COMCTL32 Base Functions and Macros for all Controls … … 180 180 } 181 181 182 LRESULT sendNotify(HWND hwndFrom,HWND hwndTo,UINT code) 183 { 184 NMHDR nmhdr; 185 186 nmhdr.hwndFrom = hwndFrom; 187 nmhdr.idFrom = GetWindowLongA(hwndFrom,GWL_ID); 188 nmhdr.code = code; 189 190 return SendMessageA(hwndTo,WM_NOTIFY,nmhdr.idFrom,(LPARAM)&nmhdr); 191 } 192 182 193 LRESULT sendNotify(HWND hwnd,UINT code,LPNMHDR nmhdr) 183 194 { … … 189 200 190 201 return SendMessageA(getNotifyWindow(hwnd),WM_NOTIFY,nmhdr->idFrom,(LPARAM)nmhdr); 202 } 203 204 LRESULT sendNotify(HWND hwndFrom,HWND hwndTo,UINT code,LPNMHDR nmhdr) 205 { 206 if (!nmhdr) return 0; 207 208 nmhdr->hwndFrom = hwndFrom; 209 nmhdr->idFrom = GetWindowLongA(hwndFrom,GWL_ID); 210 nmhdr->code = code; 211 212 return SendMessageA(hwndTo,WM_NOTIFY,nmhdr->idFrom,(LPARAM)nmhdr); 191 213 } 192 214 … … 276 298 DeleteObject(pen); 277 299 } 300 301 //string functions 302 303 //compare ANSI with UNICODE string 304 INT lstrcmpAtoW(CHAR* textA,WCHAR* textW) 305 { 306 INT len,res; 307 WCHAR* tmp; 308 309 len = lstrlenA(textA); 310 if (len > 0) 311 { 312 len++; 313 tmp = (WCHAR*)COMCTL32_Alloc(len*sizeof(WCHAR)); 314 lstrcpyAtoW(tmp,textA); 315 } else tmp = NULL; 316 317 res = lstrcmpW(tmp,textW); 318 319 if (tmp) COMCTL32_Free(tmp); 320 return res; 321 }
Note:
See TracChangeset
for help on using the changeset viewer.