62 lines
1.3 KiB
Plaintext
62 lines
1.3 KiB
Plaintext
Windows Entertainment Package About Dialog Box Dynamic Link Library
|
|
===================================================================
|
|
|
|
|
|
|
|
HOW TO USE THE WEP ABOUTDLG DLL
|
|
*******************************
|
|
|
|
|
|
1. In the ".def" file include the line:
|
|
|
|
IMPORTS AboutWEP=AboutWEP.2
|
|
|
|
|
|
2. Declare the function in your main ".c" file or a ".h" file:
|
|
|
|
void FAR PASCAL AboutWEP(HWND, HICON, LPSTR, LPSTR);
|
|
|
|
|
|
3. Add an "About..." menu item (to the Help Menu)
|
|
|
|
|
|
4. Handle the menu item:
|
|
|
|
in the MainWndProc
|
|
|
|
case WM_SYSCOMMAND:
|
|
if (wParam == IDM_ABOUT)
|
|
AboutWEP(hwndMain, hIconMain, "game name", "by developer");
|
|
else ...
|
|
|
|
|
|
If you don't have an icon or don't want to show a credits line,
|
|
pass NULL for that parameter.
|
|
|
|
|
|
I usually have an icon included in my ".rc" file:
|
|
|
|
ID_ICON_MAIN ICON generic.ico
|
|
|
|
and load it only when needed by replacing the variable hIconMain with
|
|
|
|
LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON_MAIN))
|
|
|
|
|
|
|
|
The file "aboutwep.dll" should be in the main windows directory.
|
|
|
|
|
|
|
|
IMPLEMENTATION NOTES
|
|
********************
|
|
|
|
The Bitmap is displayed in color only on a VGA.
|
|
An EGA system will display the black & white version and be a bit taller.
|
|
|
|
The bitmap is implemented as a button because
|
|
- it is easy to draw
|
|
- we may want to do something if the user clicks on the logo
|
|
- I couldn't get a static user-drawn item to work
|
|
|