Hello,
in an application for Pocket PC (eVC4 + MFC) I use an CEdit in a dialog.
In my OnInitDialog() I construct via
::CreateWindow (WC_SIPPREF, TEXT(""), WS_CHILD, -1, -1, 0, 0,
DialogHandle, HMENU(-1), ::AfxGetInstanceHandle(), NULL);
a child that opens the SIP when the edit control gets the focus. With
this control my edit control automatically get the context menu for Cut,
Copy and Paste.
(refer to
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceui40/html/_cerefwc_sippref.asp)
I added a check box to my dialog, to control automatic word-wrap for my
edit control. Unfortunately the style ES_AUTOHSCROLL could not be added
or removed after creation of the window. So I destroy my edit control
and create a new one. I thereby copy rectangle, dialog ID, parent
window, style (adjusting WS_HSCROLL and ES_AUTOHSCROLL), limit, text and
selection into the newly created edit control. After that my edit
control does not have the property of automatically opening the SIP
anymore. The automatic context menu has gone too.
I have the same problem if I destroy and recreate my control in the
OnInitDialog (before creation of the WC_SIPPPREF).
Does anyone have an idea what I am doing wrong?
Claus