| |
|
|
Ernst | Hello people, I create not, whom Button abzufragen; 1. with clicked no reaction 2. with getfocus comes reaction klarerweise a blank and Button behave itself for the time being not like a Button (at Anklicken) 3. question I at all on the right position ex ??
CompileMarkSeparation {$iq}
$H windows.ph
$H messages.ph
$H structs.ph
Set("ErrorLevel",1)
Set("FastMode",1)
Declare WndClass#
Declare Msg#
Struct TWindowClass = ~WNDCLASS
Struct TMsg = ~MSG
Dim Msg#,TMsg
Var hwndClass$ = "WINDOW"
Var hwndName$ = "FENSTER"
'*****************************************************************************************
Proc WinMain
Dim WndClass#,TWindowClass
With WndClass#
.style& = ~CS_HREDRAW | ~CS_VREDRAW
.lpfnWndProc& = ProcAddr(WndProc,4)
.cbClsExtra& = 0
.cbWndExtra& = 0
.hInstance& = %hInstance
.hIcon& = 0
.hCursor& = ~LoadCursor(0, ~IDC_ARROW)
.hbrBackground& = (~COLOR_APPWORKSPACE + 1)
.lpszMenuName& = 0
.lpszClassName& = Addr(hwndClass$)
EndWith
~RegisterClass(WndClass#)
Dispose WndClass#
Var hWnd& = ~CreateWindowEx(0,Addr(hwndClass$),Addr(hwndName$),$02CA0000,100,100,780,500,0,0,%hInstance,0)
~ShowWindow(hWnd&, ~SW_SHOWNORMAL)
~UpdateWindow(hWnd&)
Var but& = @create("BUTTON",hWnd&,"TEST",50,50,100,100)
While ~GetMessage(Msg#, 0, 0, 0) > 0
~TranslateMessage(Msg#)
If getfocus(but&)
print "1"
EndIf
~DispatchMessage(Msg#)
EndWhile
EndProc
'*****************************************************************************************
nProc WndProc
Parameters Wnd&, Message&, wParam&, lParam&
If Message& = ~WM_DESTROY
~PostQuitMessage(0)
EndIf
Return ~DefwindowProc(Wnd&, Message&, wParam&, lParam&)
EndProc
'*****************************************************************************************
WinMain
Dispose< g#
END
Thanks for Hilfestellung in the Vorhinein Greeting serious |
|
|
| |
|
|
|
Jörg Sellmeyer | can I,may I time ask, Why You it to you so heavy make? straight The Creation of Elementen, including Windows, is one of XProfans strengthen. CompileMarkSeparation |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 03/12/14 ▲ |
|
|
|
|
Ernst | Hello Jörg, with the XProfan-Windows is me klar; only this example relating itself the MDI-proposition ([...] on the I since vorigem year bastle - and if I The right Vorgehensweise with one einfachen API-Window understand can, looks I leichter through ..... hab's already self geschafft |
|
|
| |
|
|