Ignore:
Timestamp:
Sep 24, 1999, 2:47:51 PM (26 years ago)
Author:
sandervl
Message:

Menu changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibmenu.cpp

    r949 r1031  
    1 /* $Id: oslibmenu.cpp,v 1.1 1999-09-15 23:18:53 sandervl Exp $ */
     1/* $Id: oslibmenu.cpp,v 1.2 1999-09-24 12:47:50 sandervl Exp $ */
    22/*
    33 * Window Menu wrapper functions for OS/2
     
    2525//******************************************************************************
    2626//******************************************************************************
    27 HWND OSLibWinCreateMenu(HWND hwndParent, PVOID menutemplate)
     27HWND OSLibWinSetMenu(HWND hwndParent, HMENU hMenu)
    2828{
    29   return WinCreateMenu(hwndParent, menutemplate);
     29   // Remove current menu from window
     30   HWND currMenu = WinWindowFromID( (HWND)hwndParent, FID_MENU );
     31   if (currMenu)
     32   {
     33      WinSetOwner (currMenu, HWND_OBJECT);
     34      WinSetParent(currMenu, HWND_OBJECT, FALSE);
     35   }
     36
     37   if (hMenu)
     38   {
     39      if(WinIsWindow(GetThreadHAB(), hMenu) == TRUE) {
     40         WinSetOwner (hMenu, hwndParent);
     41         WinSetParent(hMenu, hwndParent, FALSE );
     42         WinSetWindowUShort(hMenu, QWS_ID, FID_MENU);
     43         WinSendMsg(hwndParent, WM_UPDATEFRAME, (MPARAM)FCF_MENU, 0);
     44         return hMenu;
     45      }
     46   }
     47   return 0;
    3048}
    3149//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.