Click to See Complete Forum and Search --> : ......Is it possible in vc?
Shahzad
May 15th, 1999, 06:50 AM
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!
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.
Shahzad
May 15th, 1999, 07:19 AM
thankx alot, you have saved plenty of my time!
Shahzad
May 15th, 1999, 07:24 AM
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.
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.
aamirdogar
July 31st, 1999, 02:14 AM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.