Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

about.c

Go to the documentation of this file.
00001 /*
00002  * PROJECT:     ReactOS Character Map
00003  * LICENSE:     GPL - See COPYING in the top level directory
00004  * FILE:        base/applications/charmap/about.c
00005  * PURPOSE:     about dialog
00006  * COPYRIGHT:   Copyright 2007 Ged Murphy <gedmurphy@reactos.org>
00007  *
00008  */
00009 
00010 
00011 #include <precomp.h>
00012 
00013 
00014 static
00015 INT_PTR
00016 CALLBACK
00017 AboutDialogProc(HWND hDlg,
00018                 UINT message,
00019                 WPARAM wParam,
00020                 LPARAM lParam)
00021 {
00022     static HICON hIcon = NULL;
00023 
00024     switch (message)
00025     {
00026         case WM_INITDIALOG:
00027         {
00028             HWND  hLicenseEditWnd;
00029             WCHAR strLicense[700];
00030 
00031             hIcon = LoadImageW(hInstance,
00032                                MAKEINTRESOURCEW(IDI_ICON),
00033                                IMAGE_ICON,
00034                                16,
00035                                16,
00036                                0);
00037             if (hIcon)
00038             {
00039                 SendMessageW(hDlg,
00040                              WM_SETICON,
00041                              ICON_SMALL,
00042                              (LPARAM)hIcon);
00043             }
00044 
00045             hLicenseEditWnd = GetDlgItem(hDlg,
00046                                          IDC_LICENSE_EDIT);
00047 
00048             if (LoadStringW(hInstance,
00049                             IDS_LICENSE,
00050                             strLicense,
00051                             sizeof(strLicense) / sizeof(WCHAR)))
00052             {
00053                 SetWindowTextW(hLicenseEditWnd,
00054                                strLicense);
00055             }
00056 
00057             return TRUE;
00058         }
00059 
00060         case WM_COMMAND:
00061         {
00062             if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
00063             {
00064                 DestroyIcon(hIcon);
00065                 EndDialog(hDlg,
00066                           LOWORD(wParam));
00067                 return TRUE;
00068             }
00069 
00070             break;
00071         }
00072     }
00073 
00074     return FALSE;
00075 }
00076 
00077 
00078 VOID
00079 ShowAboutDlg(HWND hWndParent)
00080 {
00081     DialogBoxW(hInstance,
00082                MAKEINTRESOURCEW(IDD_ABOUTBOX),
00083                hWndParent,
00084                AboutDialogProc);
00085 }

Generated on Thu Feb 9 04:38:56 2012 for ReactOS by doxygen 1.6.3

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.