Thanks Semen.
As i said, i make use of the Get check DDT command.
Thanks,
BTW, excellent shortcut code (shortened from JA)
------------------
Announcement
Collapse
No announcement yet.
2x %bn_clicked in DDT callback(!)
Collapse
X
-
Guest replied
-
Edwin --
it's possible to solve this problem by very easy way
Code:#Compile Exe #Register None #Dim All #Include "WIN32API.INC" CallBack Function DlgProc Static ii As Long, i As Long, j As Long Select Case CbMsg Case %WM_COMMAND If CbCtl >= 101 And CbCtl <= 103 Then For i = 101 To 103 If i <> ii Then Control Get Check CbHndl, i To j: _ If j Then ii = i: ListBox Add CbHndl, 100, Time$ + Str$(i) Next End If End Select End Function Function PbMain Local hDlg As Long Dialog New 0,"Option Group Test",,, 300,200, %WS_SYSMENU To hDlg Control Add ListBox,hDlg, 100,, 60, 10, 200, 140, %WS_VSCROLL, %WS_EX_CLIENTEDGE Control Add Option,hDlg,101, "Opt 1", 10, 15, 50, 14, %WS_GROUP Or %WS_TABSTOP Control Add Option,hDlg,102, "Opt 2", 10, 30, 50, 14 Control Add Option,hDlg,103, "Opt 3", 10, 45, 50, 14 Control Set Focus hDlg, 101 Dialog Show Modal hDlg Call DlgProc End Function
Leave a comment:
-
Guest repliedDidn't notice that the msg where 2 different controls.
I used the 'check'..
Thanks,
------------------
Leave a comment:
-
If I'm not mistaken, option buttons report "clicked" whenever they are turned on or off. If you select an option button, the button that you selected and the one that was previously selected will both report "clicked". You'll need to query the button states using CONTROL GET CHECK.
-- Eric
------------------
Perfect Sync: Perfect Sync Development Tools
Email: mailto:[email protected][email protected]</A>
Leave a comment:
-
2x %bn_clicked in DDT callback(!)
When i switch from option1 to option2 using arrows, i get 2x a wm_command and bn_clicked.
When i click a button with a msgbox call, after the msgbox option1 get's the focus.
(usual for windows)
But this also results in a option-click (while it's not beeing selected)
This is a part of my callback;
CallBack Function My_CallBack()
Select Case cbmsg
Case %WM_COMMAND
If cbctlmsg = %BN_CLICKED Then
Select Case CBCTL
Case %ID_Option1
Case %ID_Option2
End Select
End If
End Select
End Function
Tags: None
Leave a comment: