| 1 | /* $Id: winresmenu.cpp,v 1.3 1999-09-15 23:38:02 sandervl Exp $ */
|
|---|
| 2 |
|
|---|
| 3 | /*
|
|---|
| 4 | * Win32 Menu resource class
|
|---|
| 5 | *
|
|---|
| 6 | * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
|
|---|
| 7 | *
|
|---|
| 8 | *
|
|---|
| 9 | * Project Odin Software License can be found in LICENSE.TXT
|
|---|
| 10 | *
|
|---|
| 11 | */
|
|---|
| 12 | #define INCL_BASE
|
|---|
| 13 | #define INCL_WIN
|
|---|
| 14 | #define INCL_GPIBITMAPS
|
|---|
| 15 | #define INCL_BITMAPFILEFORMAT
|
|---|
| 16 | #define INCL_DOSMODULEMGR
|
|---|
| 17 | #include <os2wrap.h> //Odin32 OS/2 api wrappers
|
|---|
| 18 | #include <stdarg.h>
|
|---|
| 19 | #include <string.h>
|
|---|
| 20 | #define INCL_WINRES
|
|---|
| 21 | #include <win32type.h>
|
|---|
| 22 | #include <winres.h>
|
|---|
| 23 | #include <winresmenu.h>
|
|---|
| 24 | #include <misc.h>
|
|---|
| 25 | #include <winexebase.h>
|
|---|
| 26 | #include "cvtresource.h"
|
|---|
| 27 |
|
|---|
| 28 | //******************************************************************************
|
|---|
| 29 | //******************************************************************************
|
|---|
| 30 | Win32MenuRes::Win32MenuRes(Win32ImageBase *module, HRSRC hRes, ULONG id, ULONG type)
|
|---|
| 31 | : Win32Resource(module, hRes, id, type)
|
|---|
| 32 | {
|
|---|
| 33 | }
|
|---|
| 34 | //******************************************************************************
|
|---|
| 35 | //******************************************************************************
|
|---|
| 36 | Win32MenuRes::Win32MenuRes(Win32ImageBase *module, ULONG id, ULONG type,
|
|---|
| 37 | ULONG size, char *resdata)
|
|---|
| 38 | : Win32Resource(module, id, type, size, resdata)
|
|---|
| 39 | {
|
|---|
| 40 | }
|
|---|
| 41 | //******************************************************************************
|
|---|
| 42 | //******************************************************************************
|
|---|
| 43 | Win32MenuRes::Win32MenuRes(HWND hwndObjectMenu)
|
|---|
| 44 | : Win32Resource()
|
|---|
| 45 | {
|
|---|
| 46 | OS2ResHandle = hwndObjectMenu;
|
|---|
| 47 | resType = RSRC_CUSTOMNODATA;
|
|---|
| 48 | }
|
|---|
| 49 | //******************************************************************************
|
|---|
| 50 | //Template always contains Unicode strings
|
|---|
| 51 | //******************************************************************************
|
|---|
| 52 | Win32MenuRes::Win32MenuRes(LPVOID menutemplate)
|
|---|
| 53 | : Win32Resource()
|
|---|
| 54 | {
|
|---|
| 55 | resType = RSRC_CUSTOMINDIRECT;
|
|---|
| 56 |
|
|---|
| 57 | os2resdata = ConvertMenu((MenuHeader *)menutemplate, 0);
|
|---|
| 58 | OS2ResHandle = 0;
|
|---|
| 59 | }
|
|---|
| 60 | //******************************************************************************
|
|---|
| 61 | //******************************************************************************
|
|---|
| 62 | Win32MenuRes::~Win32MenuRes()
|
|---|
| 63 | {
|
|---|
| 64 | }
|
|---|
| 65 | //******************************************************************************
|
|---|
| 66 | //******************************************************************************
|
|---|