Page 1 of 1

can check click double on window

Posted: Sun Aug 17, 2003 1:23 pm
by sec
i try but it don't run:

Code: Select all

OpenWindow(0,0,0,170,106,#PB_Window_ScreenCentered|#PB_Window_SystemMenu,"Events") 

Repeat 
  Select WaitWindowEvent() 
    Case #PB_Event_CloseWindow: End 
    Default
            Select EventType() 
              Case #PB_EventType_LeftDoubleClick
              MessageRequester("-","LeftDoubleClick",0)
            EndSelect 
  EndSelect 
ForEver 
:?:

Posted: Sun Aug 17, 2003 3:10 pm
by sec
why don't anybody help me? :(

Posted: Sun Aug 17, 2003 3:40 pm
by Num3
Double click is only reported by a gadget...

Please check the GadgetAdvanced.pb example in the examples directory...

Posted: Sun Aug 17, 2003 3:50 pm
by PB
> why don't anybody help me?

You only posted your question 2 hours ago... give us a chance! :wink:

Posted: Sun Aug 17, 2003 4:14 pm
by Henrik
Hi
U can use this for now, it's ugly buut.
I got some of it from somewere in this forum ? ?

Code: Select all

OpenWindow(0,0,0,170,106,#PB_Window_ScreenCentered|#PB_Window_SystemMenu,"Events")

Repeat 
EventID.l = WaitWindowEvent()

  If EventID= #WM_LButtonDown
      
      Tic=gettickcount_()
      Repeat 
       Event = WindowEvent()  
      Until Event= #WM_LButtonDown Or  gettickcount_()-Tic>getdoubleclicktime_()
       If gettickcount_()-Tic<=getdoubleclicktime_() 
            MessageRequester("-","LeftDoubleClick",0)
      EndIf
               
  EndIf
 
  Select EventID
  
  
    Case #PB_Event_CloseWindow: End 
    Default 
            
  EndSelect 
ForEver 
Best regards
Henrik

Posted: Sun Aug 17, 2003 4:47 pm
by Num3
I digged around on the API and this is what you need:


Code: Select all

OpenWindow(0,0,0,170,106,#PB_Window_ScreenCentered|#PB_Window_SystemMenu,"Events") 
Repeat
  
  Select WaitWindowEvent()
    
      Case  #WM_RBUTTONDBLCLK       ; right mouse button was clicked2x 
      Debug "Hippy !!!"
         
    Case  #PB_EventCloseWindow
      End
      
  EndSelect
  
ForEver

Posted: Sun Aug 17, 2003 4:54 pm
by Henrik
Num3 wrote:I digged around on the API and this is what you need:


Code: Select all

OpenWindow(0,0,0,170,106,#PB_Window_ScreenCentered|#PB_Window_SystemMenu,"Events") 
Repeat
  
  Select WaitWindowEvent()
    
      Case  #WM_RBUTTONDBLCLK       ; right mouse button was clicked2x 
      Debug "Hippy !!!"
         
    Case  #PB_EventCloseWindow
      End
      
  EndSelect
  
ForEver

Hi num, this doesn't work on win 98 for some reason..

best regards
Henrik

Posted: Sun Aug 17, 2003 5:21 pm
by Num3
Strange...

I use this event in a number of programs and works fine...

But when i use it in the code i pasted here it does not work 8O

What the hell :!:

Posted: Tue Aug 19, 2003 3:34 pm
by sec
:D thanks pb, Henrik, Num3
here have nice guys, :oops:
WM_LBUTTONDBLCLK message is *not* a WM_NOTIFY message,just use it as you would any other normal message
Can detail same something ,guys? :?: