+2012-08-10 Eli Zaretskii <eliz@gnu.org>
+
+ * w32fns.c <w32_unicode_gui>: New static variable.
+ (globals_of_w32fns): Initialize it according to os_subtype.
+ (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
+ testing os_subtype.
+
2012-08-10 Joakim HÃ¥rsman <joakim.harsman@gmail.com> (tiny change)
Eli Zaretskii <eliz@gnu.org>
static HWND w32_visible_system_caret_hwnd;
+static int w32_unicode_gui;
+
/* From w32menu.c */
extern HMENU current_popup_menu;
static int menubar_in_use = 0;
w32_init_class (HINSTANCE hinst)
{
- if (os_subtype == OS_NT)
+ if (w32_unicode_gui)
{
WNDCLASSW uwc;
INIT_WINDOW_CLASS(uwc);
msh_mousewheel = RegisterWindowMessage (MSH_MOUSEWHEEL);
- while ((os_subtype == OS_NT ? GetMessageW : GetMessageA) (&msg, NULL, 0, 0))
+ while ((w32_unicode_gui ? GetMessageW : GetMessageA) (&msg, NULL, 0, 0))
{
if (msg.hwnd == NULL)
{
}
else
{
- if (os_subtype == OS_NT)
+ if (w32_unicode_gui)
DispatchMessageW (&msg);
else
DispatchMessageA (&msg);
}
dflt:
- return (os_subtype == OS_NT ? DefWindowProcW : DefWindowProcA) (hwnd, msg, wParam, lParam);
+ return (w32_unicode_gui ? DefWindowProcW : DefWindowProcA) (hwnd, msg, wParam, lParam);
}
/* The most common default return code for handled messages is 0. */
doc: /* The ANSI code page used by the system. */);
w32_ansi_code_page = GetACP ();
+ if (os_subtype == OS_NT)
+ w32_unicode_gui = 1;
+ else
+ w32_unicode_gui = 0;
+
/* MessageBox does not work without this when linked to comctl32.dll 6.0. */
InitCommonControls ();