|
|
| version 1.5, 2005/02/07 15:39:27 | version 1.6, 2005/02/09 20:11:36 |
|---|---|
| Line 29 static const VIRCAL_T vircal[6] = { {IDC | Line 29 static const VIRCAL_T vircal[6] = { {IDC |
| static void set_cal2dlg(HWND hWnd, const UINT8 *cbuf) { | static void set_cal2dlg(HWND hWnd, const UINT8 *cbuf) { |
| int i; | int i; |
| TCHAR work[8]; | OEMCHAR work[8]; |
| for (i=0; i<6; i++) { | for (i=0; i<6; i++) { |
| if (i != 1) { | if (i != 1) { |
| Line 52 static void vircalendar(HWND hWnd, BOOL | Line 52 static void vircalendar(HWND hWnd, BOOL |
| EnableWindow(GetDlgItem(hWnd, IDC_SETNOW), disp); | EnableWindow(GetDlgItem(hWnd, IDC_SETNOW), disp); |
| } | } |
| static UINT32 getbcd(char *str, int len) { | static UINT32 getbcd(const OEMCHAR *str, int len) { |
| UINT32 ret; | UINT32 ret; |
| UINT8 c; | UINT c; |
| if (!(*str)) { | if (!(*str)) { |
| return(0xff); | return(0xff); |
| Line 77 static UINT32 getbcd(char *str, int len) | Line 77 static UINT32 getbcd(char *str, int len) |
| LRESULT CALLBACK ClndDialogProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { | LRESULT CALLBACK ClndDialogProc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { |
| char work[32]; | OEMCHAR work[32]; |
| UINT8 b; | UINT8 b; |
| int i; | int i; |
| HWND subwnd; | HWND subwnd; |
| Line 109 LRESULT CALLBACK ClndDialogProc(HWND hWn | Line 109 LRESULT CALLBACK ClndDialogProc(HWND hWn |
| } | } |
| for (i=0; i<6; i++) { | for (i=0; i<6; i++) { |
| GetDlgItemText(hWnd, vircal[i].res, | GetDlgItemText(hWnd, vircal[i].res, |
| work, sizeof(work)); | work, NELEMENTS(work)); |
| b = (UINT8)getbcd(work, 2); | b = (UINT8)getbcd(work, 2); |
| if ((b >= vircal[i].min) && (b <= vircal[i].max)) { | if ((b >= vircal[i].min) && (b <= vircal[i].max)) { |
| if (i == 1) { | if (i == 1) { |