English
Forum

Button-request

 

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
 
03/12/14  
 




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
Window 600,400
Var btn& = Create("Button",%hwnd,"Klick",100,10,60,24)
Usermessages $10

While 1

    WaitInput

    If %umessage = $10

        Break

    ElseIf Clicked(btn&)

        Print "Aha"

    EndIf

Wend

 
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
 
03/12/14  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.827 Views

Untitledvor 0 min.
H.Brill01/10/19
E.T.10/19/15
Ernst03/02/15
iF07/09/14
More...

Themeninformationen

this Topic has 2 subscriber:

Ernst (2x)
Jörg Sellmeyer (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie