Hello
please, could you help me with the such deal:
i need to create User control(Windowless) with dynamically created
Edit box within it. Edit box must be created via calling
"CreateWindowEx" function. But i can't display it on my User control.
What i'm doing wrong?
Sample:
'I call ity in UserControl_EnterFocus()
InitCommonControls
pTextWnd = CreateWindowEx(0, "Edit", vbNullString, _
WS_VISIBLE Or WS_CHILD, _
10, 60, 140, 25, _
UserControl.ContainerHwnd, 0, App.hInstance, 0&)
ShowWindow pTextWnd, SW_SHOWNORMAL
Dean Earley - 20 May 2008 14:21 GMT
> Hello
> please, could you help me with the such deal:
[quoted text clipped - 13 lines]
>
> ShowWindow pTextWnd, SW_SHOWNORMAL
For a start, you are using the user controls containers hWnd rather than
the user controls hWnd itself.

Signature
Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team
iCode Systems
expvb - 20 May 2008 20:02 GMT
> Hello
> please, could you help me with the such deal:
[quoted text clipped - 13 lines]
>
> ShowWindow pTextWnd, SW_SHOWNORMAL
You don't need InitCommonControls, it's for the common controls.
Also, anything created with CreateWindowEx() will not participate in the Tab
order, arrow keys for navigation, nor validate event. In order to get these
to work, you have to implement IOLEInPlaceActiveObject hack to get these to
work. If someone clicked on a VB6 Control, then clicked on your API control,
the VB6 Control Validate event won't fire. Implementing
IOLEInPlaceActiveObject fixes this issue.