|  |  | 
|  | 
|  | 
| - 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
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
| « 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
 |  | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  | | can z.B. wm_lButtonDblClk as UserMessage determine... | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Julian
 Schmidt
 |  | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  | | Window Style 512 or SubClassProc... | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  Julian
 Schmidt
 |  | 
|  | 
| 
 
 
 | 
|  | 
|  Dieter
 Zornow
 |  | 
|  | 
|  | | 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
  | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  | | 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.
  | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 | 
|  | 
|  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)
 
 | 
 | 
|  | 
|  |  | 
|  | 
| 
 
 
 |