Ignore:
Timestamp:
Jul 19, 1999, 1:50:04 PM (26 years ago)
Author:
sandervl
Message:

Menus are displayed now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/win32wnd.cpp

    r332 r336  
    1 /* $Id: win32wnd.cpp,v 1.13 1999-07-18 18:04:30 sandervl Exp $ */
     1/* $Id: win32wnd.cpp,v 1.14 1999-07-19 11:50:04 sandervl Exp $ */
    22/*
    33 * Win32 Window Code for OS/2
     
    2929#include <oslibutil.h>
    3030#include <oslibgdi.h>
     31#include <winres.h>
    3132
    3233#define HAS_DLGFRAME(style,exStyle) \
     
    10321033BOOL Win32Window::SetMenu(ULONG hMenu)
    10331034{
    1034  PVOID menutemplate;
    1035 
     1035 PVOID          menutemplate;
     1036 Win32Resource *winres = (Win32Resource *)hMenu;
     1037
     1038#if 1
     1039    if(winres == NULL) {
     1040        dprintf(("Win32Window:: Win32Resource *winres == 0"));
     1041        return FALSE;
     1042    }
     1043    menutemplate = winres->lockOS2Resource();
     1044    if(menutemplate == NULL)
     1045    {
     1046        dprintf(("Win32Window::SetMenu menutemplate == 0"));
     1047        return FALSE;
     1048    }
     1049    OS2HwndMenu = OSLibWinCreateMenu(OS2HwndFrame, menutemplate);
     1050    if(OS2HwndMenu == 0) {
     1051        dprintf(("Win32Window::SetMenu OS2HwndMenu == 0"));
     1052        return FALSE;
     1053    }
     1054    return TRUE;
     1055#else
    10361056   if(HMHandleTranslateToOS2(hMenu, (PULONG)&menutemplate) == NO_ERROR)
    10371057   {
     
    10441064   dprintf(("Win32Window::SetMenu unknown hMenu (%x)", hMenu));
    10451065   return FALSE;
     1066#endif
    10461067}
    10471068//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.