Mercurial > msvpvf
comparison src/gui.c @ 26:0d19cff70e93
cast for type, make type a static variable
author | Paper <37962225+mrpapersonic@users.noreply.github.com> |
---|---|
date | Thu, 07 Apr 2022 23:24:09 -0400 |
parents | eb15d8595e8c |
children | 1b8d066e55ae |
comparison
equal
deleted
inserted
replaced
25:eb15d8595e8c | 26:0d19cff70e93 |
---|---|
31 #define COMBOBOX 1 | 31 #define COMBOBOX 1 |
32 #define LISTBOX 2 | 32 #define LISTBOX 2 |
33 #define SAVE_FILE_BUTTON 3 | 33 #define SAVE_FILE_BUTTON 3 |
34 | 34 |
35 HWND hWndListBox, hWndComboBox; | 35 HWND hWndListBox, hWndComboBox; |
36 int16_t version = 11; | 36 int16_t version = 13; |
37 enum type { | 37 static enum type { |
38 vf, | 38 vf, |
39 veg | 39 veg |
40 }; | 40 }; |
41 char* file_name = " "; | 41 char* file_name = " "; |
42 | 42 |
213 case WM_COMMAND: | 213 case WM_COMMAND: |
214 if(HIWORD(wParam) == CBN_SELCHANGE) { | 214 if(HIWORD(wParam) == CBN_SELCHANGE) { |
215 if (LOWORD(wParam) == COMBOBOX) | 215 if (LOWORD(wParam) == COMBOBOX) |
216 version = (int16_t)(8+SendMessage((HWND) lParam, (UINT) CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0)); | 216 version = (int16_t)(8+SendMessage((HWND) lParam, (UINT) CB_GETCURSEL, (WPARAM) 0, (LPARAM) 0)); |
217 if (LOWORD(wParam) == LISTBOX) | 217 if (LOWORD(wParam) == LISTBOX) |
218 type = SendMessage((HWND) lParam, (UINT) LB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); | 218 type = (type)SendMessage((HWND) lParam, (UINT) LB_GETCURSEL, (WPARAM) 0, (LPARAM) 0); |
219 } | 219 } |
220 switch(wParam) { | 220 switch(wParam) { |
221 case OPEN_FILE_BUTTON: | 221 case OPEN_FILE_BUTTON: |
222 file_name = open_file(hWnd); | 222 file_name = open_file(hWnd); |
223 break; | 223 break; |