Ignore:
Timestamp:
Jan 9, 2000, 6:57:50 PM (26 years ago)
Author:
sandervl
Message:

System menu commands now work

File:
1 edited

Legend:

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

    r2388 r2391  
    1 /* $Id: win32wbasepaint.cpp,v 1.3 2000-01-09 16:52:55 sandervl Exp $ */
     1/* $Id: win32wbasepaint.cpp,v 1.4 2000-01-09 17:57:50 sandervl Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    4343#include "initterm.h"
    4444
     45#define SC_ABOUTODIN            (SC_SCREENSAVE+1)
     46#define SC_PUTMARK              (SC_SCREENSAVE+2)
     47
    4548#define HAS_DLGFRAME(style,exStyle) \
    4649    (((exStyle) & WS_EX_DLGMODALFRAME) || \
     
    8386static HBITMAP hbitmapRestoreD = 0;
    8487static HMENU   hSysMenu = 0;
     88
     89static INT (* WINAPI ShellAboutA)(HWND,LPCSTR,LPCSTR,HICON) = 0;
    8590
    8691BYTE lpGrayMask[] = { 0xAA, 0xA0,
     
    10151020            hwndTitleBar = OSLibWinGetFrameControlHandle(getOS2FrameWindowHandle(), OSLIB_FID_TITLEBAR);
    10161021            OSLibWinQueryWindowRect(hwndTitleBar, &rect, RELATIVE_TO_SCREEN);
    1017             TrackPopupMenu((OS2SysMenu) ? OS2SysMenu : hSysMenu, TPM_LEFTALIGN|TPM_LEFTBUTTON,
    1018                            rect.left, rect.bottom+1,
    1019                            0, getWindowHandle(), NULL);
     1022            //Need to use Open32 api directly, as we want the msgs to go to the frame window
     1023            O32_TrackPopupMenu((OS2SysMenu) ? OS2SysMenu : hSysMenu, TPM_LEFTALIGN|TPM_LEFTBUTTON,
     1024                               rect.left, rect.bottom+1,
     1025                               0, getOS2FrameWindowHandle(), NULL);
    10201026        }
    10211027        //MENU_TrackMouseMenuBar( wndPtr, wParam & 0x000F, pt32 );
     1028        break;
     1029
     1030    case SC_SCREENSAVE:
     1031        if (wParam == SC_ABOUTODIN) {
     1032            if(ShellAboutA == 0) {
     1033                HINSTANCE hShell32 = LoadLibraryA("SHELL32");
     1034                if(hShell32 == 0)
     1035                    break;
     1036                *(VOID **)&ShellAboutA = (VOID *)GetProcAddress(hShell32, "ShellAboutA");
     1037            }
     1038            ShellAboutA(Win32Hwnd,"Odin","Odin alpha release compiled with IBM VAC++",0);
     1039        }
     1040        else
     1041        if (wParam == SC_PUTMARK)
     1042            dprintf(("Mark requested by user\n"));
    10221043        break;
    10231044
     
    10401061        break;
    10411062
    1042     case SC_SCREENSAVE:
    1043         if (wParam == SC_ABOUTWINE)
    1044             ShellAboutA(hwnd, "Odin", WINE_RELEASE_INFO, 0);
    1045         else
    1046         if (wParam == SC_PUTMARK)
    1047             dprintf(("Mark requested by user\n"));
    1048         break;
    1049 
    10501063    case SC_HOTKEY:
    10511064    case SC_ARRANGE:
     
    10591072//******************************************************************************
    10601073//******************************************************************************
    1061 
     1074HMENU Win32BaseWindow::getSystemMenu()
     1075{
     1076    if(!fOS2Look) {
     1077        return (OS2SysMenu) ? OS2SysMenu : hSysMenu;
     1078    }
     1079    return 0;
     1080}
     1081//******************************************************************************
     1082//******************************************************************************
     1083
Note: See TracChangeset for help on using the changeset viewer.