can check click double on window

Just starting out? Need help? Post your questions and find answers here.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

can check click double on window

Post 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 
:?:
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post by sec »

why don't anybody help me? :(
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Double click is only reported by a gadget...

Please check the GadgetAdvanced.pb example in the examples directory...
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

> why don't anybody help me?

You only posted your question 2 hours ago... give us a chance! :wink:
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Post 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
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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
Henrik
Enthusiast
Enthusiast
Posts: 404
Joined: Sat Apr 26, 2003 5:08 pm
Location: Denmark

Post 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
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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 :!:
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Post 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? :?:
Post Reply