|
-
May 15th, 1999, 06:50 AM
#1
......Is it possible in vc?
In Visual Basic, one can define an array of controls e.g button control. A consequence of this is all the buttons in this array correspond to a 'single click event' and the index number determines which button is click (its just like combo buttons grouped togather in vc).
Is this behavour possible for button control in VC? If so, please help!
-
May 15th, 1999, 07:05 AM
#2
Re: ......Is it possible in vc?
ON_CONTROL_RANGE( wNotifyCode, id1, id2, memberFxn )
Use this macro to map a contiguous range of control IDs to a single message handler function for a specified Windows notification message, such as BN_CLICKED.
ClassWizard does not support message map ranges, so you must place the macro yourself. Be sure to put it outside the message map //{{AFX_MSG_MAP delimiters.
-
May 15th, 1999, 07:19 AM
#3
thanks alot!
thankx alot, you have saved plenty of my time!
-
May 15th, 1999, 07:24 AM
#4
Re: ......Is it possible in vc?
tell me just one thing more!
What do we mean by contiguous id numbers, how can an ID be contiguous?
the following line is in the help for the macro you gave:
id1 Command ID at the beginning of a contiguous range of control IDs.
-
May 16th, 1999, 01:54 AM
#5
Re: ......Is it possible in vc?
For example, in resource.h of your project
#define IDC_id1 1001
#define IDC_id2 1002
#define IDC_id3 1003
#define IDC_id4 1004
contiguous range of control IDs means 1001,1002,1003,1004 is contiguous. IDC_id1 is at the beginning of a contiguous range of control IDs, and IDC_id4 is at the end.
-
July 31st, 1999, 02:14 AM
#6
Re: ......Is it possible in vc?
this is possible by using the grouping in VC controls and the value can tell you that which control has been clicked on whose event is generated
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|