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

Re: Recreation of edit control and WC_SIPPREF by Ilya

Ilya
Sun Oct 23 01:40:23 CDT 2005

Try to recreate SIPPREF control also (after the edit control recreation).
SIPPREF control subclass your edit control and it will not be working when
edit control is destroyed.

"Claus Henning" <claus#minus#guntram#dot#henning#at#ortim#dot#de> wrote in
message news:%23gkunAruFHA.3188@TK2MSFTNGP14.phx.gbl...
> 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



Re: Recreation of edit control and WC_SIPPREF by Claus

Claus
Mon Oct 24 01:11:23 CDT 2005

Ilya Manin schrieb/wrote:

Hello Ilya,

as I wrote, I have the same problem if I destroy and recreate my control
before I create the WC_SIPPPREF.

Claus

> Try to recreate SIPPREF control also (after the edit control recreation).
> SIPPREF control subclass your edit control and it will not be working when
> edit control is destroyed.
>
> "Claus Henning" <claus#minus#guntram#dot#henning#at#ortim#dot#de> wrote in
> message news:%23gkunAruFHA.3188@TK2MSFTNGP14.phx.gbl...
>
>>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