Changeset 58 for trunk/src


Ignore:
Timestamp:
Jun 8, 1999, 9:32:46 PM (26 years ago)
Author:
achimha
Message:

* empty log message *

Location:
trunk/src/comctl32
Files:
2 edited

Legend:

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

    r49 r58  
    1212
    1313#include "comctl32.h"
     14#include "winerror.h"
    1415#include "progress.h"
    1516#include "comboex.h"
     
    9697
    9798/***********************************************************************
     99 * MenuHelp [COMCTL32.2]
     100 *
     101 * PARAMS
     102 *     uMsg       [I] message (WM_MENUSELECT) (see NOTES)
     103 *     wParam     [I] wParam of the message uMsg
     104 *     lParam     [I] lParam of the message uMsg
     105 *     hMainMenu  [I] handle to the application's main menu
     106 *     hInst      [I] handle to the module that contains string resources
     107 *     hwndStatus [I] handle to the status bar window
     108 *     lpwIDs     [I] pointer to an array of intergers (see NOTES)
     109 *
     110 * RETURNS
     111 *     No return value
     112 *
     113 * NOTES
     114 *     The official documentation is incomplete!
     115 *     This is the correct documentation:
     116 *
     117 *     uMsg:
     118 *     MenuHelp() does NOT handle WM_COMMAND messages! It only handes
     119 *     WM_MENUSELECT messages.
     120 *
     121 *     lpwIDs:
     122 *     (will be written ...)
     123 */
     124
     125VOID WINAPI
     126MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu,
     127          HINSTANCE hInst, HWND hwndStatus, LPUINT lpwIDs)
     128{
     129    UINT uMenuID = 0;
     130
     131    if (!IsWindow (hwndStatus))
     132        return;
     133
     134    switch (uMsg) {
     135        case WM_MENUSELECT:
     136//          TRACE (commctrl, "WM_MENUSELECT wParam=0x%X lParam=0x%lX\n",
     137//                 wParam, lParam);
     138
     139            if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
     140                /* menu was closed */
     141//              TRACE (commctrl, "menu was closed!\n");
     142                SendMessageA (hwndStatus, SB_SIMPLE, FALSE, 0);
     143            }
     144            else {
     145                /* menu item was selected */
     146                if (HIWORD(wParam) & MF_POPUP)
     147                    uMenuID = (UINT)*(lpwIDs+1);
     148                else
     149                    uMenuID = (UINT)LOWORD(wParam);
     150//              TRACE (commctrl, "uMenuID = %u\n", uMenuID);
     151
     152                if (uMenuID) {
     153                    CHAR szText[256];
     154
     155                    if (!LoadStringA (hInst, uMenuID, szText, 256))
     156                        szText[0] = '\0';
     157
     158                    SendMessageA (hwndStatus, SB_SETTEXTA,
     159                                    255 | SBT_NOBORDERS, (LPARAM)szText);
     160                    SendMessageA (hwndStatus, SB_SIMPLE, TRUE, 0);
     161                }
     162            }
     163            break;
     164
     165        default:
     166//          FIXME (commctrl, "Invalid Message 0x%x!\n", uMsg);
     167            break;
     168    }
     169}
     170
     171/***********************************************************************
     172 * ShowHideMenuCtl [COMCTL32.3]
     173 *
     174 * Shows or hides controls and updates the corresponding menu item.
     175 *
     176 * PARAMS
     177 *     hwnd   [I] handle to the client window.
     178 *     uFlags [I] menu command id.
     179 *     lpInfo [I] pointer to an array of integers. (See NOTES.)
     180 *
     181 * RETURNS
     182 *     Success: TRUE
     183 *     Failure: FALSE
     184 *
     185 * NOTES
     186 *     The official documentation is incomplete!
     187 *     This is the correct documentation:
     188 *
     189 *     hwnd
     190 *     Handle to the window that contains the menu and controls.
     191 *
     192 *     uFlags
     193 *     Identifier of the menu item to receive or loose a check mark.
     194 *
     195 *     lpInfo
     196 *     The array of integers contains pairs of values. BOTH values of
     197 *     the first pair must be the handles to the application's main menu.
     198 *     Each subsequent pair consists of a menu id and control id.
     199 */
     200
     201BOOL WINAPI
     202ShowHideMenuCtl (HWND hwnd, UINT uFlags, LPINT lpInfo)
     203{
     204    LPINT lpMenuId;
     205
     206//    TRACE (commctrl, "%x, %x, %p\n", hwnd, uFlags, lpInfo);
     207
     208    if (lpInfo == NULL)
     209        return FALSE;
     210
     211    if (!(lpInfo[0]) || !(lpInfo[1]))
     212        return FALSE;
     213
     214    /* search for control */
     215    lpMenuId = &lpInfo[2];
     216    while (*lpMenuId != uFlags)
     217        lpMenuId += 2;
     218
     219    if (GetMenuState (lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
     220        /* uncheck menu item */
     221        CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
     222
     223        /* hide control */
     224        lpMenuId++;
     225        SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
     226                        SWP_HIDEWINDOW);
     227    }
     228    else {
     229        /* check menu item */
     230        CheckMenuItem (lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
     231
     232        /* show control */
     233        lpMenuId++;
     234        SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
     235                        SWP_SHOWWINDOW);
     236    }
     237
     238    return TRUE;
     239}
     240
     241/***********************************************************************
     242 * GetEffectiveClientRect [COMCTL32.4]
     243 *
     244 * PARAMS
     245 *     hwnd   [I] handle to the client window.
     246 *     lpRect [O] pointer to the rectangle of the client window
     247 *     lpInfo [I] pointer to an array of integers (see NOTES)
     248 *
     249 * RETURNS
     250 *     No return value.
     251 *
     252 * NOTES
     253 *     The official documentation is incomplete!
     254 *     This is the correct documentation:
     255 *
     256 *     lpInfo
     257 *     (will be written...)
     258 */
     259
     260VOID WINAPI
     261GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, LPINT lpInfo)
     262{
     263    RECT rcCtrl;
     264    INT  *lpRun;
     265    HWND hwndCtrl;
     266
     267//    TRACE (commctrl, "(0x%08lx 0x%08lx 0x%08lx)\n",
     268//         (DWORD)hwnd, (DWORD)lpRect, (DWORD)lpInfo);
     269
     270    GetClientRect (hwnd, lpRect);
     271    lpRun = lpInfo;
     272
     273    do {
     274        lpRun += 2;
     275        if (*lpRun == 0)
     276            return;
     277        lpRun++;
     278        hwndCtrl = GetDlgItem (hwnd, *lpRun);
     279        if (GetWindowLongA (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
     280//          TRACE (commctrl, "control id 0x%x\n", *lpRun);
     281            GetWindowRect (hwndCtrl, &rcCtrl);
     282            MapWindowPoints ((HWND)0, hwnd, (LPPOINT)&rcCtrl, 2);
     283            SubtractRect (lpRect, lpRect, &rcCtrl);
     284        }
     285        lpRun++;
     286    } while (*lpRun);
     287}
     288
     289/***********************************************************************
     290 * DrawStatusText32A [COMCTL32.5][COMCTL32.27]
     291 *
     292 * Draws text with borders, like in a status bar.
     293 *
     294 * PARAMS
     295 *     hdc   [I] handle to the window's display context
     296 *     lprc  [I] pointer to a rectangle
     297 *     text  [I] pointer to the text
     298 *     style [I] drawing style
     299 *
     300 * RETURNS
     301 *     No return value.
     302 *
     303 * NOTES
     304 *     The style variable can have one of the following values:
     305 *     (will be written ...)
     306 */
     307
     308VOID WINAPI
     309DrawStatusTextA (HDC hdc, LPRECT lprc, LPCSTR text, UINT style)
     310{
     311    RECT r = *lprc;
     312    UINT border = BDR_SUNKENOUTER;
     313
     314    if (style == SBT_POPOUT)
     315      border = BDR_RAISEDOUTER;
     316    else if (style == SBT_NOBORDERS)
     317      border = 0;
     318
     319    DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST|BF_MIDDLE);
     320
     321    /* now draw text */
     322    if (text) {
     323      int oldbkmode = SetBkMode (hdc, TRANSPARENT);
     324      r.left += 3;
     325      DrawTextA (hdc, text, lstrlenA(text),
     326                   &r, DT_LEFT|DT_VCENTER|DT_SINGLELINE); 
     327      if (oldbkmode != TRANSPARENT)
     328        SetBkMode(hdc, oldbkmode);
     329    }
     330}
     331
     332
     333/***********************************************************************
     334 * DrawStatusText32W [COMCTL32.28]
     335 *
     336 * Draws text with borders, like in a status bar.
     337 *
     338 * PARAMS
     339 *     hdc   [I] handle to the window's display context
     340 *     lprc  [I] pointer to a rectangle
     341 *     text  [I] pointer to the text
     342 *     style [I] drawing style
     343 *
     344 * RETURNS
     345 *     No return value.
     346 */
     347
     348VOID WINAPI
     349DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style)
     350{
     351// ERROR DON'T KNOW HOW TO TRANSLATE!!!
     352LPSTR p;
     353//    LPSTR p = HEAP_strdupWtoA (GetProcessHeap (), 0, text);
     354    DrawStatusTextA (hdc, lprc, p, style);
     355    HeapFree (GetProcessHeap (), 0, p );
     356}
     357
     358
     359/***********************************************************************
     360 * CreateStatusWindow32A [COMCTL32.6][COMCTL32.21]
     361 *
     362 * Creates a status bar
     363 *
     364 * PARAMS
     365 *     style  [I] window style
     366 *     text   [I] pointer to the window text
     367 *     parent [I] handle to the parent window
     368 *     wid    [I] control id of the status bar
     369 *
     370 * RETURNS
     371 *     Success: handle to the status window
     372 *     Failure: 0
     373 */
     374
     375HWND WINAPI
     376CreateStatusWindowA (INT style, LPCSTR text, HWND parent, UINT wid)
     377{
     378    return CreateWindowA(STATUSCLASSNAMEA, text, style,
     379                           CW_USEDEFAULT, CW_USEDEFAULT,
     380                           CW_USEDEFAULT, CW_USEDEFAULT,
     381                           parent, wid, 0, 0);
     382}
     383
     384
     385/***********************************************************************
     386 * CreateStatusWindow32W [COMCTL32.22] Creates a status bar control
     387 *
     388 * PARAMS
     389 *     style  [I] window style
     390 *     text   [I] pointer to the window text
     391 *     parent [I] handle to the parent window
     392 *     wid    [I] control id of the status bar
     393 *
     394 * RETURNS
     395 *     Success: handle to the status window
     396 *     Failure: 0
     397 */
     398
     399HWND WINAPI
     400CreateStatusWindowW (INT style, LPCWSTR text, HWND parent, UINT wid)
     401{
     402    return CreateWindowW(STATUSCLASSNAMEW, text, style,
     403                           CW_USEDEFAULT, CW_USEDEFAULT,
     404                           CW_USEDEFAULT, CW_USEDEFAULT,
     405                           parent, wid, 0, 0);
     406}
     407
     408
     409/***********************************************************************
     410 * CreateUpDownControl [COMCTL32.16] Creates an up-down control
     411 *
     412 * PARAMS
     413 *     style  [I] window styles
     414 *     x      [I] horizontal position of the control
     415 *     y      [I] vertical position of the control
     416 *     cx     [I] with of the control
     417 *     cy     [I] height of the control
     418 *     parent [I] handle to the parent window
     419 *     id     [I] the control's identifier
     420 *     inst   [I] handle to the application's module instance
     421 *     buddy  [I] handle to the buddy window, can be NULL
     422 *     maxVal [I] upper limit of the control
     423 *     minVal [I] lower limit of the control
     424 *     curVal [I] current value of the control
     425 *
     426 * RETURNS
     427 *     Success: handle to the updown control
     428 *     Failure: 0
     429 */
     430
     431HWND WINAPI
     432CreateUpDownControl (DWORD style, INT x, INT y, INT cx, INT cy,
     433                     HWND parent, INT id, HINSTANCE inst,
     434                     HWND buddy, INT maxVal, INT minVal, INT curVal)
     435{
     436    HWND hUD =
     437        CreateWindowA (UPDOWN_CLASSA, 0, style, x, y, cx, cy,
     438                         parent, id, inst, 0);
     439    if (hUD) {
     440        SendMessageA (hUD, UDM_SETBUDDY, buddy, 0);
     441        SendMessageA (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
     442        SendMessageA (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));     
     443    }
     444
     445    return hUD;
     446}
     447
     448/***********************************************************************
    98449 * InitCommonControls [COMCTL32.17]
    99450 *
     
    115466{
    116467}
     468
     469/***********************************************************************
     470 * InitCommonControlsEx [COMCTL32.81]
     471 *
     472 * Registers the common controls.
     473 *
     474 * PARAMS
     475 *     lpInitCtrls [I] pointer to an INITCOMMONCONTROLS structure.
     476 *
     477 * RETURNS
     478 *     Success: TRUE
     479 *     Failure: FALSE
     480 *
     481 * NOTES
     482 *     Only the additinal common controls are registered by this function.
     483 *     The Win95 controls are registered at the DLL's initialization.
     484 */
     485
     486BOOL WINAPI
     487InitCommonControlsEx (LPINITCOMMONCONTROLSEX lpInitCtrls)
     488{
     489    INT cCount;
     490    DWORD dwMask;
     491
     492    if (!lpInitCtrls)
     493        return FALSE;
     494    if (lpInitCtrls->dwSize != sizeof(INITCOMMONCONTROLSEX))
     495        return FALSE;
     496
     497//    TRACE(commctrl,"(0x%08lx)\n", lpInitCtrls->dwICC);
     498
     499    for (cCount = 0; cCount < 32; cCount++) {
     500        dwMask = 1 << cCount;
     501        if (!(lpInitCtrls->dwICC & dwMask))
     502            continue;
     503
     504        switch (lpInitCtrls->dwICC & dwMask) {
     505            /* dummy initialization */
     506            case ICC_ANIMATE_CLASS:
     507            case ICC_BAR_CLASSES:
     508            case ICC_LISTVIEW_CLASSES:
     509            case ICC_TREEVIEW_CLASSES:
     510            case ICC_TAB_CLASSES:
     511            case ICC_UPDOWN_CLASS:
     512            case ICC_PROGRESS_CLASS:
     513            case ICC_HOTKEY_CLASS:
     514                break;
     515
     516            /* advanced classes - not included in Win95 */
     517            case ICC_DATE_CLASSES:
     518                MONTHCAL_Register ();
     519                DATETIME_Register ();
     520                break;
     521
     522            case ICC_USEREX_CLASSES:
     523                COMBOEX_Register ();
     524                break;
     525
     526            case ICC_COOL_CLASSES:
     527                REBAR_Register ();
     528                break;
     529
     530            case ICC_INTERNET_CLASSES:
     531//              IPADDRESS_Register ();
     532                break;
     533
     534            case ICC_PAGESCROLLER_CLASS:
     535                PAGER_Register ();
     536                break;
     537
     538            case ICC_NATIVEFNTCTL_CLASS:
     539                NATIVEFONT_Register ();
     540                break;
     541
     542            default:
     543//              FIXME (commctrl, "Unknown class! dwICC=0x%lX\n", dwMask);
     544                break;
     545        }
     546    }
     547
     548    return TRUE;
     549}
     550
     551/***********************************************************************
     552 * CreateToolbarEx [COMCTL32.32] Creates a tool bar window
     553 *
     554 * PARAMS
     555 *     hwnd
     556 *     style
     557 *     wID
     558 *     nBitmaps
     559 *     hBMInst
     560 *     wBMID
     561 *     lpButtons
     562 *     iNumButtons
     563 *     dxButton
     564 *     dyButton
     565 *     dxBitmap
     566 *     dyBitmap
     567 *     uStructSize
     568 *
     569 * RETURNS
     570 *     Success: handle to the tool bar control
     571 *     Failure: 0
     572 */
     573
     574HWND WINAPI
     575CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
     576                 HINSTANCE hBMInst, UINT wBMID, LPCTBBUTTON lpButtons,
     577                 INT iNumButtons, INT dxButton, INT dyButton,
     578                 INT dxBitmap, INT dyBitmap, UINT uStructSize)
     579{
     580    HWND hwndTB =
     581        CreateWindowExA (0, TOOLBARCLASSNAMEA, "", style, 0, 0, 0, 0,
     582                           hwnd, (HMENU)wID, 0, NULL);
     583    if(hwndTB) {
     584        TBADDBITMAP tbab;
     585
     586        SendMessageA (hwndTB, TB_BUTTONSTRUCTSIZE,
     587                        (WPARAM)uStructSize, 0);
     588
     589        /* set bitmap and button size */
     590        /*If CreateToolbarEx receive 0, windows set default values*/
     591        if (dyBitmap < 0)
     592            dyBitmap = 16;
     593        if (dxBitmap < 0)
     594            dxBitmap = 16;
     595
     596            SendMessageA (hwndTB, TB_SETBITMAPSIZE, 0,
     597                            MAKELPARAM((WORD)dyBitmap, (WORD)dxBitmap));
     598            SendMessageA (hwndTB, TB_SETBUTTONSIZE, 0,
     599                            MAKELPARAM((WORD)dyButton, (WORD)dxButton));
     600
     601
     602        /* add bitmaps */
     603        if (nBitmaps > 0)
     604        {
     605        tbab.hInst = hBMInst;
     606        tbab.nID   = wBMID;
     607
     608        SendMessageA (hwndTB, TB_ADDBITMAP,
     609                        (WPARAM)nBitmaps, (LPARAM)&tbab);
     610        }
     611        /* add buttons */
     612        if(iNumButtons > 0)
     613        SendMessageA (hwndTB, TB_ADDBUTTONSA,
     614                        (WPARAM)iNumButtons, (LPARAM)lpButtons);
     615    }
     616
     617    return hwndTB;
     618}
     619
     620
     621/***********************************************************************
     622 * CreateMappedBitmap [COMCTL32.8]
     623 *
     624 * PARAMS
     625 *     hInstance  [I]
     626 *     idBitmap   [I]
     627 *     wFlags     [I]
     628 *     lpColorMap [I]
     629 *     iNumMaps   [I]
     630 *
     631 * RETURNS
     632 *     Success: handle to the new bitmap
     633 *     Failure: 0
     634 */
     635
     636HBITMAP WINAPI
     637CreateMappedBitmap (HINSTANCE hInstance, INT idBitmap, UINT wFlags,
     638                    LPCOLORMAP lpColorMap, INT iNumMaps)
     639{
     640    HGLOBAL hglb;
     641    HRSRC hRsrc;
     642    LPBITMAPINFOHEADER lpBitmap, lpBitmapInfo;
     643    UINT nSize, nColorTableSize;
     644    DWORD *pColorTable;
     645    INT iColor, i, iMaps, nWidth, nHeight;
     646    HDC hdcScreen;
     647    HBITMAP hbm;
     648    LPCOLORMAP sysColorMap;
     649    COLORMAP internalColorMap[4] =
     650        {{0x000000, 0}, {0x808080, 0}, {0xC0C0C0, 0}, {0xFFFFFF, 0}};
     651
     652    /* initialize pointer to colortable and default color table */
     653    if (lpColorMap) {
     654        iMaps = iNumMaps;
     655        sysColorMap = lpColorMap;
     656    }
     657    else {
     658        internalColorMap[0].to = GetSysColor (COLOR_BTNTEXT);
     659        internalColorMap[1].to = GetSysColor (COLOR_BTNSHADOW);
     660        internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
     661        internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
     662        iMaps = 4;
     663        sysColorMap = (LPCOLORMAP)internalColorMap;
     664    }
     665
     666    hRsrc = FindResourceA (hInstance, (LPSTR)idBitmap, RT_BITMAPA);
     667    if (hRsrc == 0)
     668        return 0;
     669    hglb = LoadResource (hInstance, hRsrc);
     670    if (hglb == 0)
     671        return 0;
     672    lpBitmap = (LPBITMAPINFOHEADER)LockResource (hglb);
     673    if (lpBitmap == NULL)
     674        return 0;
     675
     676    nColorTableSize = (1 << lpBitmap->biBitCount);
     677    nSize = lpBitmap->biSize + nColorTableSize * sizeof(RGBQUAD);
     678    lpBitmapInfo = (LPBITMAPINFOHEADER)GlobalAlloc (GMEM_FIXED, nSize);
     679    if (lpBitmapInfo == NULL)
     680        return 0;
     681    RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
     682
     683    pColorTable = (DWORD*)(((LPBYTE)lpBitmapInfo)+(UINT)lpBitmapInfo->biSize);
     684
     685    for (iColor = 0; iColor < nColorTableSize; iColor++) {
     686        for (i = 0; i < iMaps; i++) {
     687            if (pColorTable[iColor] == sysColorMap[i].from) {
     688#if 0
     689                if (wFlags & CBS_MASKED) {
     690                    if (sysColorMap[i].to != COLOR_BTNTEXT)
     691                        pColorTable[iColor] = RGB(255, 255, 255);
     692                }
     693                else
     694#endif
     695                    pColorTable[iColor] = sysColorMap[i].to;
     696                break;
     697            }
     698        }
     699    }
     700
     701    nWidth  = (INT)lpBitmapInfo->biWidth;
     702    nHeight = (INT)lpBitmapInfo->biHeight;
     703    hdcScreen = GetDC ((HWND)0);
     704    hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
     705    if (hbm) {
     706        HDC hdcDst = CreateCompatibleDC (hdcScreen);
     707        HBITMAP hbmOld = SelectObject (hdcDst, hbm);
     708        LPBYTE lpBits = (LPBYTE)(lpBitmap + 1);
     709        lpBits += (1 << (lpBitmapInfo->biBitCount)) * sizeof(RGBQUAD);
     710        StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
     711                         lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
     712                         SRCCOPY);
     713        SelectObject (hdcDst, hbmOld);
     714        DeleteDC (hdcDst);
     715    }
     716    ReleaseDC ((HWND)0, hdcScreen);
     717    GlobalFree ((HGLOBAL)lpBitmapInfo);
     718    FreeResource (hglb);
     719
     720    return hbm;
     721}
     722
     723
     724/***********************************************************************
     725 * CreateToolbar [COMCTL32.7] Creates a tool bar control
     726 *
     727 * PARAMS
     728 *     hwnd
     729 *     style
     730 *     wID
     731 *     nBitmaps
     732 *     hBMInst
     733 *     wBMID
     734 *     lpButtons
     735 *     iNumButtons
     736 *
     737 * RETURNS
     738 *     Success: handle to the tool bar control
     739 *     Failure: 0
     740 *
     741 * NOTES
     742 *     Do not use this functions anymore. Use CreateToolbarEx instead.
     743 */
     744
     745HWND WINAPI
     746CreateToolbar (HWND hwnd, DWORD style, UINT wID, INT nBitmaps,
     747               HINSTANCE hBMInst, UINT wBMID,
     748               LPCOLDTBBUTTON lpButtons,INT iNumButtons)
     749{
     750    return CreateToolbarEx (hwnd, style | CCS_NODIVIDER, wID, nBitmaps,
     751                            hBMInst, wBMID, (LPCTBBUTTON)lpButtons,
     752                            iNumButtons, 0, 0, 0, 0, sizeof (OLDTBBUTTON));
     753}
     754
     755
     756/***********************************************************************
     757 * DllGetVersion [COMCTL32.25]
     758 *
     759 * Retrieves version information of the 'COMCTL32.DLL'
     760 *
     761 * PARAMS
     762 *     pdvi [O] pointer to version information structure.
     763 *
     764 * RETURNS
     765 *     Success: S_OK
     766 *     Failure: E_INVALIDARG
     767 *
     768 * NOTES
     769 *     Returns version of a comctl32.dll from IE4.01 SP1.
     770 */
     771
     772HRESULT WINAPI
     773COMCTL32_DllGetVersion (DLLVERSIONINFO *pdvi)
     774{
     775    if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
     776//        WARN (commctrl, "wrong DLLVERSIONINFO size from app");
     777        return E_INVALIDARG;
     778    }
     779
     780    pdvi->dwMajorVersion = 4;
     781    pdvi->dwMinorVersion = 72;
     782    pdvi->dwBuildNumber = 3110;
     783    pdvi->dwPlatformID = 1;
     784
     785//    TRACE (commctrl, "%lu.%lu.%lu.%lu\n",
     786//         pdvi->dwMajorVersion, pdvi->dwMinorVersion,
     787//         pdvi->dwBuildNumber, pdvi->dwPlatformID);
     788
     789    return S_OK;
     790}
     791
  • trunk/src/comctl32/comctl32.def

    r55 r58  
    44
    55EXPORTS
     6  MenuHelp                     = _MenuHelp@28                        @2
     7  ShowHideMenuCtl              = _ShowHideMenuCtl@12                 @3
     8  GetEffectiveClientRect       = _GetEffectiveClientRect@12          @4
     9  DrawStatusTextA              = _DrawStatusTextA@16                 @5
     10  DrawStatusTextA              = _DrawStatusTextA@16                 @27
     11  DrawStatusTextW              = _DrawStatusTextW@16                 @28
     12  CreateStatusWindowA          = _CreateStatusWindowA@16             @6
     13  CreateStatusWindowA          = _CreateStatusWindowA@16             @21
     14  CreateStatusWindowW          = _CreateStatusWindowW@16             @22
     15  CreateUpdDownControl         = _CreateUpDownControl@48             @16
    616  InitCommonControls           = _InitCommonControls@0               @17
     17  InitCommonControlsEx         = _InitCommonControlsEx@4             @81
     18  CreateToolbarEx              = _CreateToolbarEx@52                 @32
     19  CreateMappedBitmap           = _CreateMappedBitmap@20              @8
     20  CreateToolbar                = _CreateToolbar@32                   @7
     21  DllGetVersion                = _COMCTL32_DllGetVersion@4           @25
    722
    823  ImageList_Add                = _ImageList_Add@12                   @39
Note: See TracChangeset for help on using the changeset viewer.