Rev 14 | Rev 83 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 14 | Rev 74 | ||
|---|---|---|---|
| Line 60... | Line 60... | ||
| 60 | 60 | ||
| 61 | static int CALLBACK DialogProc_ThisDialog (HWND hWnd, unsigned int message, WPARAM wParam, LPARAM lParam) | 61 | static int CALLBACK DialogProc_ThisDialog (HWND hWnd, unsigned int message, WPARAM wParam, LPARAM lParam) | 
| 62 | { | 62 | { | 
| 63 |    // message handler for the dialog box | 63 |    // message handler for the dialog box | 
| 64 | 64 | ||
| 65 | static wchar_t | 65 | static wchar_t temp_buffer[256]; | 
| 66 | 66 | ||
| 67 | unsigned short wParam_hiword; | 67 | unsigned short wParam_hiword; | 
| 68 | unsigned short wParam_loword; | 68 | unsigned short wParam_loword; | 
| 69 | 69 | ||
| 70 |    // filter out the commonly used message values | 70 |    // filter out the commonly used message values | 
| Line 86... | Line 86... | ||
| 86 | 86 | ||
| 87 |       // set the banner area font | 87 |       // set the banner area font | 
| 88 | SendMessage (GetDlgItem (hWnd, STATICTEXT_BANNER), WM_SETFONT, (WPARAM) hFontBanner, false); | 88 | SendMessage (GetDlgItem (hWnd, STATICTEXT_BANNER), WM_SETFONT, (WPARAM) hFontBanner, false); | 
| 89 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_BANNER), PROGRAM_NAME); | 89 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_BANNER), PROGRAM_NAME); | 
| 90 | 90 | ||
| 91 | 
 | 91 | swprintf_s (temp_buffer, WCHAR_SIZEOF (temp_buffer), L"version %c%c%c%c%s%c%c " PROGRAM_COPYRIGHT L" " AUTHOR_NAME L" - ", | 
| - | 92 | __DATE__[7], __DATE__[8], __DATE__[9], __DATE__[10], | |
| - | 93 | (strncmp (__DATE__, "Jan", 3) == 0 ? L"01" : | |
| - | 94 | (strncmp (__DATE__, "Feb", 3) == 0 ? L"02" : | |
| - | 95 | (strncmp (__DATE__, "Mar", 3) == 0 ? L"03" : | |
| - | 96 | (strncmp (__DATE__, "Apr", 3) == 0 ? L"04" : | |
| - | 97 | (strncmp (__DATE__, "May", 3) == 0 ? L"05" : | |
| - | 98 | (strncmp (__DATE__, "Jun", 3) == 0 ? L"06" : | |
| - | 99 | (strncmp (__DATE__, "Jul", 3) == 0 ? L"07" : | |
| - | 100 | (strncmp (__DATE__, "Aug", 3) == 0 ? L"08" : | |
| - | 101 | (strncmp (__DATE__, "Sep", 3) == 0 ? L"09" : | |
| - | 102 | (strncmp (__DATE__, "Oct", 3) == 0 ? L"10" : | |
| - | 103 | (strncmp (__DATE__, "Nov", 3) == 0 ? L"11" : | |
| - | 104 | (strncmp (__DATE__, "Dec", 3) == 0 ? L"12" : L"??")))))))))))), | |
| - | 105 | __DATE__[4], __DATE__[5]); | |
| - | 106 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_PROGRAMVERSION), temp_buffer); | |
| 92 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_AUTHOREMAIL), AUTHOR_EMAIL); | 107 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_AUTHOREMAIL), AUTHOR_EMAIL); | 
| 93 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_ABOUTBOX_1STPARAGRAPH), LOCALIZE (L"AboutBox_1stParagraph")); | 108 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_ABOUTBOX_1STPARAGRAPH), LOCALIZE (L"AboutBox_1stParagraph")); | 
| 94 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_ABOUTBOX_2NDPARAGRAPH), LOCALIZE (L"AboutBox_2ndParagraph")); | 109 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_ABOUTBOX_2NDPARAGRAPH), LOCALIZE (L"AboutBox_2ndParagraph")); | 
| 95 | SetWindowText (GetDlgItem (hWnd, BUTTON_WEBSITE), LOCALIZE (L"AboutBox_VisitWebsite")); | 110 | SetWindowText (GetDlgItem (hWnd, BUTTON_WEBSITE), LOCALIZE (L"AboutBox_VisitWebsite")); | 
| 96 | 111 | ||
| 97 |       // build the "registered to:" message and display it | 112 |       // build the "registered to:" message and display it | 
| 98 | if (is_registered) | 113 | if (is_registered) | 
| 99 | swprintf_s ( | 114 | swprintf_s (temp_buffer, WCHAR_SIZEOF (temp_buffer), LOCALIZE (L"Registration_RegisteredTo"), options.registration.user_email); | 
| 100 |       else | 115 |       else | 
| 101 | wcscpy_s ( | 116 | wcscpy_s (temp_buffer, WCHAR_SIZEOF (temp_buffer), LOCALIZE (L"Registration_Unregistered")); | 
| 102 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_REGISTEREDTO), | 117 | Static_SetText (GetDlgItem (hWnd, STATICTEXT_REGISTEREDTO), temp_buffer); | 
| 103 | 118 | ||
| 104 |       // convert the bitmaps to clickable things | 119 |       // convert the bitmaps to clickable things | 
| 105 | ConvertStaticToHyperlink (GetDlgItem (hWnd, BITMAP_ABOUT)); | 120 | ConvertStaticToHyperlink (GetDlgItem (hWnd, BITMAP_ABOUT)); | 
| 106 | ConvertStaticToHyperlink (GetDlgItem (hWnd, STATICTEXT_AUTHOREMAIL)); | 121 | ConvertStaticToHyperlink (GetDlgItem (hWnd, STATICTEXT_AUTHOREMAIL)); | 
| 107 |    } | 122 |    } |