home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
winutil
/
adg_7_8
/
mdi.h
< prev
next >
Wrap
C/C++ Source or Header
|
1991-02-21
|
5KB
|
146 lines
/****************************************************************************
Module name: MDI.H
Programmer : Jeffrey M. Richter & Elvira Peretsman.
*****************************************************************************/
#include "dialog.h"
extern char _szAppName[]; // The name of the application.
extern HANDLE _hInstance; // Data instance of the application.
extern HANDLE _hAccelTable; // Handle to active Accelerator table.
extern HWND _hWndMDIClient; // Handle to MDICLIENT window.
extern HWND _hDlgRibbon; // Handle to Ribbon modeless dialog box.
BOOL FAR PASCAL RegisterFrameWndClass (void);
BOOL FAR PASCAL RegisterSheetWndClass (void);
BOOL FAR PASCAL RegisterChartWndClass (void);
BOOL FAR PASCAL RibbonDlgProc (HWND hDlg, WORD wMsg, WORD wParam, DWORD dwParam);
#define GETFRAME(hWnd) ((HWND) (GetParent(GetParent(hWnd))))
// User-defined Messages processed by Frame Window class.
#define FW_MDICHILDDESTROY (WM_USER + 0)
#define FW_RESIZEMDICLIENT (WM_USER + 1)
#define FW_GETSTATBARRECT (WM_USER + 2)
#define FW_SETMENUHELP (WM_USER + 3)
#define FW_GETMENUHELP (WM_USER + 4)
#define FW_DRAWSTATUSDIVIDE (WM_USER + 5)
// User-defined Messages processed by all window classes.
#define AW_PAINTMENUHELP (WM_USER + 100)
// User-defined Messages processed by all MDI Child window classes.
#define AC_PAINTSTATBAR (WM_USER + 200)
// FILE MENU
#define IDM_FILEOPENSHEET 101
#define IDM_FILEOPENCHART 102
#define IDM_FILESAVE 104
#define IDM_FILESAVEAS 105
#define IDM_FILEPRINT 106
#define IDM_FILEPRINTERSETUP 107
#define IDM_EXIT 108
// EDIT MENU
#define IDM_EDITCUT 110
#define IDM_EDITCOPY 111
#define IDM_EDITPASTE 112
// SHEET MENU
#define IDM_SHEETOPTION 120
// CHART MENU
#define IDM_CHARTOPTION 130
// OPTIONS MENU
#define IDM_OPTIONSSTATUS 140
#define IDM_OPTIONSRIBBON 141
// HELP MENU
#define IDM_HELPINDEX 150
#define IDM_HELPKEYBOARD 151
#define IDM_HELPCOMMANDS 152
#define IDM_HELPPROCEDURES 153
#define IDM_HELPUSINGHELP 154
#define IDM_ABOUT 155
// WINDOW MENU
#define IDM_WINDOWTILEVERT 160
#define IDM_WINDOWTILEHORIZ 161
#define IDM_WINDOWCASCADE 162
#define IDM_WINDOWARRANGEICONS 163
#define IDM_WINDOWCHILD 164
//*********************** String Table Constants *****************************
// String table used to fill the font and the size comboboxes in the Ribbon.
#define IDS_FONT 100
#define IDS_SIZE 200
// String table for Frame window's menu.
#define IDS_FRAMEPOPUPID 1000
#define IDS_FRAMEMENUID 2000
// String table for Sheet window's menu.
#define IDS_SHEETPOPUPID 3000
#define IDS_SHEETMENUID 4000
// String table for Chart window's menu.
#define IDS_CHARTPOPUPID 5000
#define IDS_CHARTMENUID 6000
// String table for contents of status bar when no menu is open.
#define IDS_FRAMESTATUSBAR 7000
#define IDS_SHEETSTATUSBAR 7001
#define IDS_CHARTSTATUSBAR 7002
// Identifiers to help use string tables for menu help descriptions for
// menu item s in the Application and MDI Child system menus.
#define IDM_SYSMENUSIZE 0x00 // ((SC_SIZE & 0x0FFF) >> 4)
#define IDM_SYSMENUMOVE 0x01 // ((SC_MOVE & 0x0FFF) >> 4)
#define IDM_SYSMENUMINIMIZE 0x02 // ((SC_MINIMIZE & 0x0FFF) >> 4)
#define IDM_SYSMENUMAXIMIZE 0x03 // ((SC_MAXIMIZE & 0x0FFF) >> 4)
#define IDM_SYSMENUNEXTWINDOW 0x04 // ((SC_NEXTWINDOW & 0x0FFF) >> 4)
#define IDM_SYSMENUCLOSE 0x06 // ((SC_CLOSE & 0x0FFF) >> 4)
#define IDM_SYSMENURESTORE 0x12 // ((SC_RESTORE & 0x0FFF) >> 4)
#define IDM_SYSMENUTASKLIST 0x13 // ((SC_TASKLIST & 0x0FFF) >> 4)
void FAR PASCAL ChangeMDIMenu (HWND hWndFrame, HWND hWndClient,
HMENU hTopLevelMenu, WORD wMenuID);
HWND FAR PASCAL CreateMDIChild (LPSTR szClassName, LPSTR szWindowName,
DWORD dwStyle, short x, short y, short nWidth, short nHeight,
HWND hWndMDIClient, HANDLE hInstance, LONG lParam);
//*********** Macros for use by Window and Class Extra Bytes *****************
#define offsetof(Struct, Member) \
((unsigned int) &(((Struct NEAR *) 0)->Member))
#define GETWNDEB(hWnd, Struct, Member) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
GetWindowLong(hWnd, offsetof(Struct, Member)) : \
GetWindowWord(hWnd, offsetof(Struct, Member)))
#define SETWNDEB(hWnd, Struct, Member, Value) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
SetWindowLong(hWnd, offsetof(Struct, Member), Value) : \
SetWindowWord(hWnd, offsetof(Struct, Member), (WORD) Value))
#define GETCLSEB(hWnd, Struct, Member) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
GetClassLong(hWnd, offsetof(Struct, Member)) : \
GetClassWord(hWnd, offsetof(Struct, Member)))
#define SETCLSEB(hWnd, Struct, Member, Value) \
((sizeof(((Struct FAR *)0)->Member) == sizeof(DWORD)) ? \
SetClassLong(hWnd, offsetof(Struct, Member), Value) : \
SetClassWord(hWnd, offsetof(Struct, Member), (WORD) Value))