Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mouse on Combobox Pushbutton
#1
I wonder whether - and if yes how - it is possible to start the folllowing dialog, with the mouse on combobox pushbutton. Thanks for any advice.

Function Dialog52
Code:
Select All      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;5 ComboBox 0x54230242 0x0 11 54 96 212 ""
;4 Edit 0x54030080 0x200 10 33 96 12 ""
;3 Button 0x54032000 0x0 10 9 48 14 "Button"
;1 Button 0x54030000 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "4 5"
str e4 cb5
cb5="1[]2[]a[]c"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#2
Code:
Select All      Help
,case WM_INITDIALOG
,mou 136 9 id(5 hDlg) 1 ;;combo box, push button 'Open'
#3
Thank you, however, it does not work. Please advise.
#4
working for me moves mouse to down arrow on combobox
 maybe need to adjust coordinates.
#5
I have already adjusted coordinates, but it does not work.  Nevertheless, it works if I click on button3, ie.

    case 3
    mou 150 9 id(5 hDlg) 1 ;;combo box, push button 'Open'
#6
are you just wanting to move the mouse to the combo or open the dropdown list in the combo?

try this
using WM_TIMER adjust timer length if needs more time
Code:
Select All      Help
sel message
,case WM_INITDIALOG
,SetTimer hDlg 1 100 0 
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_TIMER
,sel wParam
,,case 1
,,KillTimer hDlg wParam    
,,mou 136 9 id(5 hDlg) 1 ;;combo box, push button 'Open'
#7
I want just to move it there. The following work-around works. It seem that it needs a short delay :

Function Dialog52
Code:
Select All      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;5 ComboBox 0x54230242 0x0 11 54 96 212 ""
;4 Edit 0x54030080 0x200 10 33 96 12 ""
;3 Button 0x54032000 0x0 10 9 48 14 "Button"
;1 Button 0x54030000 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

str controls = "5 4"
str cb5 e4
cb5="1[]2[]a[]c"
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,mac "sub.mm" "" hDlg

,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,
,case IDOK
,case IDCANCEL
ret 1

#sub mm
function int'hDlg
0.1
mou 150 9 id(5 hDlg) 1 ;;combo box, push button 'Open'

Thank you for your last advice (WM_TIMER ). It works perfectly. Best Regards.
#8
yes that or my previous example using SetTimer


Forum Jump:


Users browsing this thread: 1 Guest(s)