Mercurial > hg > xemacs-beta
comparison src/dialog-msw.c @ 440:8de8e3f6228a r21-2-28
Import from CVS: tag r21-2-28
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:33:38 +0200 |
parents | 3ecd8885ac67 |
children | abe6d1db359e |
comparison
equal
deleted
inserted
replaced
439:357dd071b03c | 440:8de8e3f6228a |
---|---|
157 { | 157 { |
158 Extbyte *mbcs_string; | 158 Extbyte *mbcs_string; |
159 Charcount length = XSTRING_CHAR_LENGTH (string); | 159 Charcount length = XSTRING_CHAR_LENGTH (string); |
160 LPWSTR uni_string; | 160 LPWSTR uni_string; |
161 | 161 |
162 GET_C_CHARPTR_EXT_DATA_ALLOCA (XSTRING_DATA (string), | 162 TO_EXTERNAL_FORMAT (LISP_STRING, string, |
163 FORMAT_OS, mbcs_string); | 163 C_STRING_ALLOCA, mbcs_string, |
164 Qnative); | |
164 uni_string = alloca_array (WCHAR, length + 1); | 165 uni_string = alloca_array (WCHAR, length + 1); |
165 length = MultiByteToWideChar (CP_ACP, 0, mbcs_string, -1, | 166 length = MultiByteToWideChar (CP_ACP, 0, mbcs_string, -1, |
166 uni_string, sizeof(WCHAR) * (length + 1)); | 167 uni_string, sizeof(WCHAR) * (length + 1)); |
167 Dynarr_add_many (dynarr, uni_string, sizeof(WCHAR) * length); | 168 Dynarr_add_many (dynarr, uni_string, sizeof(WCHAR) * length); |
168 } | 169 } |
342 item_tem.dwExtendedStyle = 0; | 343 item_tem.dwExtendedStyle = 0; |
343 | 344 |
344 for (i = 0; i < Dynarr_length (dialog_items); ++i) | 345 for (i = 0; i < Dynarr_length (dialog_items); ++i) |
345 { | 346 { |
346 Lisp_Object* gui_item = Dynarr_atp (dialog_items, i); | 347 Lisp_Object* gui_item = Dynarr_atp (dialog_items, i); |
347 struct Lisp_Gui_Item *pgui_item = XGUI_ITEM (*gui_item); | 348 Lisp_Gui_Item *pgui_item = XGUI_ITEM (*gui_item); |
348 | 349 |
349 item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON | 350 item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON |
350 | (gui_item_active_p (*gui_item) ? 0 : WS_DISABLED)); | 351 | (gui_item_active_p (*gui_item) ? 0 : WS_DISABLED)); |
351 item_tem.cx = button_width (pgui_item->name); | 352 item_tem.cx = button_width (pgui_item->name); |
352 /* Item ids are indices into dialog_items plus offset, to avoid having | 353 /* Item ids are indices into dialog_items plus offset, to avoid having |