Visual Basic - Crear una ventena MDICHILD en tiempo de ejecucion

Life is soft - evento anual de software empresarial
 
Vista:

Crear una ventena MDICHILD en tiempo de ejecucion

Publicado por Raul (3 intervenciones) el 02/09/2007 18:15:34
Por favor alguien me puede explicar porque esta funcion no funciona e Vb

hwnd = SendMessage(a, WM_MDICREATE, 0, ByVal Mdies(1))

este es el codigo
de donde la uso
Private Function MyCreateWindow(hPhwnd As Long, qa As Long) As Boolean
Dim mdi As MDICREATESTRUCT
Dim a As Long
Dim Mdies(Len(mdi)) As Byte

mdi.szTitle = "[Untitled]" & vbNullString
mdi.szClass = "myWindowClass"
mdi.hOwner = GetModuleHandle(vbNullString)
mdi.x = 0
mdi.cx = 100
mdi.y = 0
mdi.cy = 100
mdi.style = 1
mdi.lParam = 0
a = GetParent(qa)


RtlMoveMemory Mdies(1), mdi, Len(mdi)

hwnd = SendMessage(a, WM_MDICREATE, 0, ByVal Mdies(1))

If hwnd <> 0 Then
ShowWindow hwnd, SW_SHOWNORMAL
' Show them
MehDc = GetDC(hwnd)

End If
' MyCreateWindow = (hwnd <> 0)
End Function
Private Function MyRegisterClass() As Boolean
' WNDCLASS-structure
Dim wndcls As WNDCLASS
wndcls.style = WS_VSCROLL Or WS_HSCROLL
wndcls.lpfnwndproc = GetMyWndProc(AddressOf MyWndProc)
wndcls.cbClsextra = 0
wndcls.cbWndExtra2 = 0
wndcls.hInstance = App.hInstance
wndcls.hIcon = 0
wndcls.hCursor = LoadCursor(0, IDC_ARROW)
wndcls.hbrBackground = COLOR_WINDOW
wndcls.lpszMenuName = 0
wndcls.lpszClassName = "myWindowClass"
' Register class
MyRegisterClass = (RegisterClass(wndcls) <> 0)
End Function

Private Sub MyUnregisterClass()
UnregisterClass "myWindowClass", App.hInstance
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder