Ignore:
Timestamp:
Mar 31, 2001, 3:25:59 PM (24 years ago)
Author:
sandervl
Message:

Resync with Wine + previous merge fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/datetime.c

    r4627 r5416  
    1919#include "winbase.h"
    2020#include "wingdi.h"
    21 #include "wine/winestring.h"
    2221#include "commctrl.h"
    2322#include "debugtools.h"
    2423
     24#ifdef __WIN32OS2__
     25#include "ccbase.h"
     26#define inline
     27#endif
     28
    2529DEFAULT_DEBUG_CHANNEL(datetime);
    2630
    2731typedef struct
    2832{
     33#ifdef __WIN32OS2__
     34        COMCTL32_HEADER header;
     35#endif
    2936        HWND hMonthCal;
    3037        HWND hUpdown;
     
    308315        LPSTR buf;
    309316        int retval;
    310         int len = lstrlenW ((LPWSTR) lParam)+1;
     317        int len = WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1, NULL, 0, NULL, NULL );
    311318
    312319        buf = (LPSTR) COMCTL32_Alloc (len);
    313         lstrcpyWtoA (buf, (LPWSTR) lParam);
     320        WideCharToMultiByte( CP_ACP, 0, (LPWSTR)lParam, -1, buf, len, NULL, NULL );
    314321        retval=DATETIME_SetFormat (hwnd, 0, (LPARAM) buf);
    315322        COMCTL32_Free (buf);
     
    11121119  /* allocate memory for info structure */
    11131120  TRACE("%04x %08lx\n",wParam,lParam);
     1121#ifdef __WIN32OS2__
     1122  infoPtr = (DATETIME_INFO*)initControl(hwnd,sizeof(DATETIME_INFO));
     1123#else
    11141124  infoPtr = (DATETIME_INFO *)COMCTL32_Alloc (sizeof(DATETIME_INFO));
     1125#endif
    11151126  if (infoPtr == NULL) {
    11161127    ERR("could not allocate info memory!\n");
     
    11661177    TRACE("\n");
    11671178    COMCTL32_Free (infoPtr);
     1179    SetWindowLongA( hwnd, 0, 0 );
    11681180    return 0;
    11691181}
     
    11731185DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    11741186{
     1187    if (!DATETIME_GetInfoPtr(hwnd) && (uMsg != WM_CREATE))
     1188        return DefWindowProcA( hwnd, uMsg, wParam, lParam );
     1189   
    11751190    switch (uMsg)
    11761191    {
     
    12521267                     uMsg, wParam, lParam);
    12531268#ifdef __WIN32OS2__
    1254             return defComCtl32ProcA (hwnd, uMsg, wParam, lParam);
     1269        return defComCtl32ProcA (hwnd, uMsg, wParam, lParam);
    12551270#else
    12561271        return DefWindowProcA (hwnd, uMsg, wParam, lParam);
Note: See TracChangeset for help on using the changeset viewer.