MikeMcc
October 11th, 2001, 06:37 PM
i am trying to create a control in a usercontrol using createwindow but can't get the cursor keys or tab order to work. this is basically the code i am using. when you run the control and click into the text box the cursor keys do nothing.
Private Sub UserControl_Initialize()
Dim hWndTextBox As Long
Dim lngStyle As Long
'Create the Edit Control
lngStyle = WS_CHILDWINDOW
lngStyle = lngStyle Or WS_VISIBLE
lngStyle = lngStyle Or WS_TABSTOP
lngStyle = lngStyle Or ES_AUTOHSCROLL
hWndTextBox = CreateWindowEx(0, "EDIT", "Mike's Edit Control", lngStyle, 0, 0, 100, 100, UserControl.hwnd, 0, App.hInstance, 0)
End Sub
Private Sub UserControl_Initialize()
Dim hWndTextBox As Long
Dim lngStyle As Long
'Create the Edit Control
lngStyle = WS_CHILDWINDOW
lngStyle = lngStyle Or WS_VISIBLE
lngStyle = lngStyle Or WS_TABSTOP
lngStyle = lngStyle Or ES_AUTOHSCROLL
hWndTextBox = CreateWindowEx(0, "EDIT", "Mike's Edit Control", lngStyle, 0, 0, 100, 100, UserControl.hwnd, 0, App.hInstance, 0)
End Sub