Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.3 KiB

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