Yes Charles i know for that GLWindow example and i understand that architecture
is not trivial.
I don't want to force OOP over standard things.
I want simplicity of course but must there be way to simplify things like in other compilers,right?
If all this methods fail i will give up defenately from all this mumbo-jumbo.
Just another example from GUI-oop zip from fb:
function TForm.WindowProc(hDlg as hwnd,Msg as uint,wParam as wparam,lParam as lparam) as integer
dim as TWinControl ptr WinControl = iif(CreationData, CreationData, GetWinControl(hDlg))
dim as TMessage message = type(hDlg,Msg,wParam,lParam,0,WinControl)
if WinControl then
WinControl->ProcessMessage(message)
cast(TForm ptr,WinControl)->ProcessMessage(message)
return message.result
end if
return message.result
end function
function TForm.ClientWindowProc(hDlg as hwnd,Msg as uint,wParam as wparam,lParam as lparam) as integer
dim as TWinControl ptr WinControl = iif(CreationData, CreationData, GetWinControl(hDlg))
dim as TMessage message = type(hDlg,Msg,wParam,lParam,0,WinControl)
if WinControl then
WinControl->ProcessMessage(message)
dim as WndClassEx wc
wc.cbSize = sizeof(wc)
if GetClassInfoEx(0,"MDIClIENT",@wc) then
message.result = CallWindowProc(wc.lpfnWndProc,message.Handle,message.Msg,message.wParam,message.lParam)
end if
return message.result
end if
return message.result
end function