Rev 140 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 140 | Rev 178 | ||
|---|---|---|---|
| Line 6... | Line 6... | ||
| 6 | // dialog template |
6 | // dialog template |
| 7 | #define THIS_DIALOG DIALOG_PLAYERINFONAME |
7 | #define THIS_DIALOG DIALOG_PLAYERINFONAME |
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | // global variables |
10 | // global variables |
| 11 | static wchar_t player_name[64]; |
11 | static wchar_t player_name[64] = L""; |
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | // prototypes of local functions |
14 | // prototypes of local functions |
| 15 | static void StartThread_ThisDialog (void *thread_parms); |
15 | static void StartThread_ThisDialog (void *thread_parms); |
| 16 | static int CALLBACK DialogProc_ThisDialog (HWND hWnd, unsigned int message, WPARAM wParam, LPARAM lParam); |
16 | static int CALLBACK DialogProc_ThisDialog (HWND hWnd, unsigned int message, WPARAM wParam, LPARAM lParam); |
| Line 84... | Line 84... | ||
| 84 | // set window title and control texts |
84 | // set window title and control texts |
| 85 | SetWindowText (hWnd, LOCALIZE (L"PlayerInfoName_Title")); |
85 | SetWindowText (hWnd, LOCALIZE (L"PlayerInfoName_Title")); |
| 86 | SetDlgItemText (hWnd, STATICTEXT_PLAYERINFONAME_QUESTION, LOCALIZE (L"PlayerInfoName_Question")); |
86 | SetDlgItemText (hWnd, STATICTEXT_PLAYERINFONAME_QUESTION, LOCALIZE (L"PlayerInfoName_Question")); |
| 87 | SetDlgItemText (hWnd, BUTTON_DISPLAY, LOCALIZE (L"PlayerInfoName_Display")); |
87 | SetDlgItemText (hWnd, BUTTON_DISPLAY, LOCALIZE (L"PlayerInfoName_Display")); |
| 88 | SetDlgItemText (hWnd, STATICTEXT_PLAYERINFONAME_STATUSBAR, LOCALIZE (L"PlayerInfoName_StatusBar")); |
88 | SetDlgItemText (hWnd, STATICTEXT_PLAYERINFONAME_STATUSBAR, LOCALIZE (L"PlayerInfoName_StatusBar")); |
| - | 89 | ||
| - | 90 | // set the edit box value, select it and send focus to it |
|
| - | 91 | SetDlgItemText (hWnd, EDITBOX_PLAYERINFONAME_NAME, player_name); // reuse last player name asked for |
|
| - | 92 | SendMessage (GetDlgItem (hWnd, EDITBOX_PLAYERINFONAME_NAME), EM_SETSEL, 0, -1); |
|
| - | 93 | SetFocus (GetDlgItem (hWnd, EDITBOX_PLAYERINFONAME_NAME)); |
|
| 89 | 94 | ||
| 90 | // convert the status bar message to a hyperlink |
95 | // convert the status bar message to a hyperlink |
| 91 | ConvertStaticToHyperlink (GetDlgItem (hWnd, STATICTEXT_PLAYERINFONAME_STATUSBAR)); |
96 | ConvertStaticToHyperlink (GetDlgItem (hWnd, STATICTEXT_PLAYERINFONAME_STATUSBAR)); |
| 92 | } |
97 | } |
| 93 | 98 | ||