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.

89 lines
3.2 KiB

  1. /*----------------------------------------------------------------------------*\
  2. | |
  3. | about.c - About Dialog Proc Handler for Timer Device Driver Test App |
  4. | |
  5. | |
  6. | History: |
  7. | Created Glenn Steffler (w-GlennS) 29-Jan-1990 |
  8. | |
  9. \*----------------------------------------------------------)-----------------*/
  10. /*----------------------------------------------------------------------------*\
  11. | |
  12. | i n c l u d e f i l e s |
  13. | |
  14. \*----------------------------------------------------------------------------*/
  15. #include <windows.h>
  16. #include <mmsystem.h>
  17. #include <port1632.h>
  18. #include <stdio.h>
  19. #include <string.h>
  20. #include "ta.h"
  21. /*----------------------------------------------------------------------------*\
  22. | |
  23. | g l o b a l v a r i a b l e s |
  24. | |
  25. \*----------------------------------------------------------------------------*/
  26. /*----------------------------------------------------------------------------*\
  27. | fnAboutDlg( hDlg, uiMessage, wParam, lParam ) |
  28. | |
  29. | Description: |
  30. | This function handles messages belonging to the "About" dialog box. |
  31. | The only message that it looks for is WM_COMMAND, indicating the use |
  32. | has pressed the "OK" button. When this happens, it takes down |
  33. | the dialog box. |
  34. | |
  35. | Arguments: |
  36. | hDlg window handle of about dialog window |
  37. | uiMessage message number |
  38. | wParam message-dependent |
  39. | lParam message-dependent |
  40. | |
  41. | Returns: |
  42. | TRUE if message has been processed, else FALSE |
  43. | |
  44. \*----------------------------------------------------------------------------*/
  45. BOOL FAR PASCAL
  46. fnAboutDlg( HWND hDlg, unsigned uiMessage, UINT wParam, LONG lParam )
  47. {
  48. #define ptCurrent ((POINT)lParam)
  49. RECT rcDlg,rcButton,rcNew;
  50. HWND hwndButton;
  51. switch( uiMessage ) {
  52. case WM_COMMAND:
  53. if( wParam == IDOK )
  54. EndDialog(hDlg,TRUE);
  55. break;
  56. #ifdef THISCOULDNEVERBEDEFINED
  57. case WM_MOUSEMOVE:
  58. if( wParam & MK_CONTROL == 0 ) {
  59. GetClientRect( hDlg, &rc );
  60. hwndButton = GetDlgItem(hDlg,ID_BUTTON);
  61. GetWindowRect( hwndButton, &rcButton);
  62. rcNew.top = min( 0,
  63. GetWindowPos(
  64. }
  65. break;
  66. case WM_NCHIT
  67. case WM_DESTROY:
  68. return TRUE;
  69. #endif
  70. case WM_INITDIALOG:
  71. return TRUE;
  72. }
  73. return FALSE;
  74. #undef ptCurrent
  75. }