> 3. Is there any need for storing the hwndParent in editor. Couldn't > the value be obtained by using GetWindowLongW using GWL_HWNDPARENT > after making sure that editor->hWnd is non-NULL (i.e. windowed mode). > Scratch that point, I see that it is tested for using SetParent in the tests after creating the richedit control.
Other things I noticed: > + r = SendMessage(hwRichEdit, WM_GETDLGCODE, (WPARAM)NULL, (LPARAM)NULL); Avoid superfluous casts. In this case it is preferred to use 0 instead of casting NULL. If the cast isn't needed, then leave it out (See: http://wiki.winehq.org/SuperfluousCasts). > +struct dialog_mode_messages > +{ > + int wm_getdefid, wm_close, wm_nextdlgctl; > +}; > + > +static struct dialog_mode_messages dm_messages; > + > +static void zero_dm_messages(void) > +{ > + dm_messages.wm_close = 0; > + dm_messages.wm_getdefid = 0; > + dm_messages.wm_nextdlgctl =0; > +} Couldn't memset(dm_messages, 0, sizeof(dm_messages)) be used instead of the special zero_dm_messages function.
