Changeset 5416 for trunk/src/comctl32/datetime.c
- Timestamp:
- Mar 31, 2001, 3:25:59 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/datetime.c
r4627 r5416 19 19 #include "winbase.h" 20 20 #include "wingdi.h" 21 #include "wine/winestring.h"22 21 #include "commctrl.h" 23 22 #include "debugtools.h" 24 23 24 #ifdef __WIN32OS2__ 25 #include "ccbase.h" 26 #define inline 27 #endif 28 25 29 DEFAULT_DEBUG_CHANNEL(datetime); 26 30 27 31 typedef struct 28 32 { 33 #ifdef __WIN32OS2__ 34 COMCTL32_HEADER header; 35 #endif 29 36 HWND hMonthCal; 30 37 HWND hUpdown; … … 308 315 LPSTR buf; 309 316 int retval; 310 int len = lstrlenW ((LPWSTR) lParam)+1;317 int len = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1, NULL, 0, NULL, NULL ); 311 318 312 319 buf = (LPSTR) COMCTL32_Alloc (len); 313 lstrcpyWtoA (buf, (LPWSTR) lParam);320 WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1, buf, len, NULL, NULL ); 314 321 retval=DATETIME_SetFormat (hwnd, 0, (LPARAM) buf); 315 322 COMCTL32_Free (buf); … … 1112 1119 /* allocate memory for info structure */ 1113 1120 TRACE("%04x %08lx\n",wParam,lParam); 1121 #ifdef __WIN32OS2__ 1122 infoPtr = (DATETIME_INFO*)initControl(hwnd,sizeof(DATETIME_INFO)); 1123 #else 1114 1124 infoPtr = (DATETIME_INFO *)COMCTL32_Alloc (sizeof(DATETIME_INFO)); 1125 #endif 1115 1126 if (infoPtr == NULL) { 1116 1127 ERR("could not allocate info memory!\n"); … … 1166 1177 TRACE("\n"); 1167 1178 COMCTL32_Free (infoPtr); 1179 SetWindowLongA( hwnd, 0, 0 ); 1168 1180 return 0; 1169 1181 } … … 1173 1185 DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 1174 1186 { 1187 if (!DATETIME_GetInfoPtr(hwnd) && (uMsg != WM_CREATE)) 1188 return DefWindowProcA( hwnd, uMsg, wParam, lParam ); 1189 1175 1190 switch (uMsg) 1176 1191 { … … 1252 1267 uMsg, wParam, lParam); 1253 1268 #ifdef __WIN32OS2__ 1254 1269 return defComCtl32ProcA (hwnd, uMsg, wParam, lParam); 1255 1270 #else 1256 1271 return DefWindowProcA (hwnd, uMsg, wParam, lParam);
Note:
See TracChangeset
for help on using the changeset viewer.