home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
PRIMAR.ZIP
/
TEST.HLP
(
.txt
)
< prev
Wrap
OS/2 Help File
|
1991-10-25
|
2KB
|
54 lines
ΓòÉΓòÉΓòÉ 1. Extended Help for the worplace window ΓòÉΓòÉΓòÉ
The demo program has a fully working help support. You just have to select a
menu item, press F1 and you will see the related application code.
ΓòÉΓòÉΓòÉ 2. File Open Help ΓòÉΓòÉΓòÉ
When you select this option, you will create a primary window, that was created
with the help of the PrimaryWindow Class. It is good programming style is you
hide the use of the function SeiCreateDialogWindow in a creation function.
In the following you see the entire creation function.
HWND EXPENTRY CreateDummy ( HWND hwnd, PVOID pParamDummy) {
USHORT usrc;
HMODULE hModule;
HWND hwndFrame;
usrc = DosGetModHandle (DLL_NAME, &hModule);
hwndFrame = SeiCreateDialogWindow (HWND_DESKTOP, // Parent
hwnd, // Owner
WS_VISIBLE, // Frame style
NULL, // FCF
DlgWinProc, // WinProc
NULL, // Title
hModule, // Resource
DLG_MAIN, // ResourceID
pParamDummy);
return (hwndFrame);
}
The function was invoked in the window procedure of the client window of our
workplace during the handling of the WM_CREATE message.
Here is the code:
case MN_FILEOPEN: {
HWND hwndDummy;
/*--------------------------------------*/
/* Create a primary or secondary window */
/*--------------------------------------*/
hwndDummy = CreateDummy (hwnd, "Charly Brown");
} break;
ΓòÉΓòÉΓòÉ 3. File Exit Help ΓòÉΓòÉΓòÉ
When you select the exit option , a WM _ QUIT message is posted .
case MN_FILEEXIT: {
WinPostMsg (hwnd, WM_QUIT, 0L, 0L);
} break;