English
Forum

left-, right-, Double click in area one Window erfassen

 
- Page 1 -



Julian
Schmidt
Hi,
i'd gladly erfassen whether within one designed Bereichs one master-, or Dialogfensters a left,- right-, semidetached(left)klick made watts.
i know the it about for left and Rechtsklick The Messages WM_LButtonDown, WM_RButtonDown gives. only How ermittle I a Double click within one designed Bereichs?
CompileMarkSeparation
Def LinksImBereich(4) (%message=$201) and (%MouseX>@&(1)) and (%MouseX<@&(3)) and (%MouseY>@&(2)) and (%MouseY<@&(4))
Def RechtsImBereich(4) (%message=$204) and (%MouseX>@&(1)) and (%MouseX<@&(3)) and (%MouseY>@&(2)) and (%MouseY<@&(4))
Windowstyle 24
cls
UseBrush 7,RGB(153,153,153)
Rectangle 50,50 - (width(%hwnd)-50),(height(%hwnd)-50)

While 1

    Waitinput

    If LinksImBereich(50,50,width(%hwnd)-50,height(%hwnd)-50)'Links im Innen-Rechteck = Verschieben

        UseCursor 5
        SendMessage(%hwnd,$112,$F012,0)
        External("USER32","ReleaseCapture")
        UseCursor 0

    Elseif RechtsImBereich(50,50,width(%hwnd)-50,height(%hwnd)-50)=0'Rechts im Außen-Rechteck = Ende

        break

    EndIf

Endwhile


LG

Julian57
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/24/11  
 



« this Posting watts as Solution marked. »


Detlef
Jagolski
And so with SubClassing!
CompileMarkSeparation
 $P+
SetErrorLevel 0
 $H WINDOWS.PH
 $H MESSAGES.PH
 $H STRUCTS.PH
STRUCT TRect         = ~Rect
STRUCT TPoint        = ~Point
Declare appexit%
Declare Point#
Declare Rect#
Declare Punkt&
Dim Point#,TPoint
Dim Rect#,TRect

SubClassProc

    If SubClassMessage(%hwnd, ~WM_LBUTTONDBLCLK)

        Point#.X& = LOWORD(&sLParam)
        Point#.Y& = HIWORD(&sLParam)
        ~SetRect(Rect#,70,70,200,200)
        Case ~PtInRect(Rect#,Point#.X&,Point#.Y&) <> 0: Print "Doppelklick Links"

    ElseIf SubClassMessage(%hwnd, ~WM_RBUTTONDBLCLK)

        Point#.X& = LOWORD(&sLParam)
        Point#.Y& = HIWORD(&sLParam)
        ~SetRect(Rect#,70,70,200,200)
        Case ~PtInRect(Rect#,Point#.X&,Point#.Y&) <> 0: Print "Doppelklick Rechts"

    EndIf

    Set("WinProc",1)

EndProc

SetTrueColor 1
WindowStyle $003F
WindowTitle "DesignForm"
Window %maxX + 5,114 - 498,415
Cls ~GetSysColor(15)
~SetClassLong(%hwnd,~GCL_STYLE,(~GetClassLong(%hwnd, ~GCL_STYLE) + ~CS_DBLCLKS))
Rectangle 70,70 - 200,200
UseFont "MS Sans Serif",13,0,0,0,0
SetDialogFont 1
SubClass %hwnd,1
SetWindowPos %hwnd = 207,114 - 498,415;0

WhileNot appexit%

    WaitInput

    If %key = 2

        appexit%=1

    ElseIf %key = 4

        ' Fenstergröße

    ElseIf %key = 5

        ' Hilfe

    EndIf

Wend

SubClass %hwnd,0
Dispose Point#
'./../../function-references/XProfan/dispose/'>Dispose Rect#
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
09/25/11  
 




Detlef
Jagolski
from the API Help!

WM_NCLBUTTONDBLCLK
WM_MBUTTONDBLCLK
WM_RBUTTONDBLCLK
WM_LBUTTONDBLCLK
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
09/24/11  
 




Julian
Schmidt
One example?
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/24/11  
 



can z.B. wm_lButtonDblClk as UserMessage determine...
 
09/24/11  
 




Julian
Schmidt
means in principle something like? functions but unfortunately not.
CompileMarkSeparation
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/24/11  
 



Window Style 512 or SubClassProc...
 
09/25/11  
 




Julian
Schmidt
functions but nevertheless not.
CompileMarkSeparation
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/25/11  
 




Dieter
Zornow
Should still simply so weg
CompileMarkSeparation
Declare X&
Def Getclasslong(2) !"USER32","GetClassLongA"
Def Setclasslong(3) !"USER32","SetClassLongA"
Cls
Usermessages $203,$206
X&=Getclasslong(%Hwnd,-26)
X&=X& | 8
Setclasslong(%Hwnd,-26,X&)'CS_DBLCLKS Class-Style setzen.

While 1

    Waitinput
    Case %Key=2:Break

    If %Umessage=$203

        Print "Linker Doppelklick."

    Elseif %Umessage=$206

        Print "Rechter Doppelklick."

    Endif

Endwhile

Usermessages 0
End
 
Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2
09/25/11  
 




Detlef
Jagolski
And so with SubClassing!
CompileMarkSeparation
 $P+
SetErrorLevel 0
 $H WINDOWS.PH
 $H MESSAGES.PH
 $H STRUCTS.PH
STRUCT TRect         = ~Rect
STRUCT TPoint        = ~Point
Declare appexit%
Declare Point#
Declare Rect#
Declare Punkt&
Dim Point#,TPoint
Dim Rect#,TRect

SubClassProc

    If SubClassMessage(%hwnd, ~WM_LBUTTONDBLCLK)

        Point#.X& = LOWORD(&sLParam)
        Point#.Y& = HIWORD(&sLParam)
        ~SetRect(Rect#,70,70,200,200)
        Case ~PtInRect(Rect#,Point#.X&,Point#.Y&) <> 0: Print "Doppelklick Links"

    ElseIf SubClassMessage(%hwnd, ~WM_RBUTTONDBLCLK)

        Point#.X& = LOWORD(&sLParam)
        Point#.Y& = HIWORD(&sLParam)
        ~SetRect(Rect#,70,70,200,200)
        Case ~PtInRect(Rect#,Point#.X&,Point#.Y&) <> 0: Print "Doppelklick Rechts"

    EndIf

    Set("WinProc",1)

EndProc

SetTrueColor 1
WindowStyle $003F
WindowTitle "DesignForm"
Window %maxX + 5,114 - 498,415
Cls ~GetSysColor(15)
~SetClassLong(%hwnd,~GCL_STYLE,(~GetClassLong(%hwnd, ~GCL_STYLE) + ~CS_DBLCLKS))
Rectangle 70,70 - 200,200
UseFont "MS Sans Serif",13,0,0,0,0
SetDialogFont 1
SubClass %hwnd,1
SetWindowPos %hwnd = 207,114 - 498,415;0

WhileNot appexit%

    WaitInput

    If %key = 2

        appexit%=1

    ElseIf %key = 4

        ' Fenstergröße

    ElseIf %key = 5

        ' Hilfe

    EndIf

Wend

SubClass %hwnd,0
Dispose Point#
'./../../function-references/XProfan/dispose/'>Dispose Rect#
 
XProfan X4, PRFellow, Profan2Cpp - Version 2.0c-pre5, Windows 11
09/25/11  
 




Julian
Schmidt
OK, the two Source functions super!
particularly The Variante of Detlef
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/25/11  
 



iF hats still written...Window Style 512 or SubClassProc...

hereon write You functions but nevertheless not one example what weder winstyle 512 or The Proc uses.

should one itself heavy on head grasp.
 
09/25/11  
 




Julian
Schmidt
Untitled (25.09.11)

iF hats still written...Window Style 512 or SubClassProc...
hereon write You functions but nevertheless not one example what weder winstyle 512 or The Proc uses.
should one itself heavy on head grasp.


where is in the example no SubClassProc?

Julian57 (25.09.11)
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
09/25/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.815 Views

Untitledvor 0 min.
Thomas Freier05/22/19
Walter04/12/19
Georg Teles12/27/18
Ernst04/30/14
More...

Themeninformationen



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