Click here to Skip to main content
16,008,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mapping array of CButtons Pin
David Crow27-May-04 3:52
David Crow27-May-04 3:52 
GeneralRe: Mapping array of CButtons Pin
dart1327-May-04 4:07
dart1327-May-04 4:07 
GeneralRe: Mapping array of CButtons Pin
David Crow27-May-04 4:34
David Crow27-May-04 4:34 
GeneralRe: Mapping array of CButtons Pin
dart1327-May-04 4:58
dart1327-May-04 4:58 
GeneralRe: Mapping array of CButtons Pin
Blake Miller27-May-04 5:30
Blake Miller27-May-04 5:30 
GeneralRe: Mapping array of CButtons Pin
dart1327-May-04 6:54
dart1327-May-04 6:54 
GeneralRe: Mapping array of CButtons Pin
David Fleming19-Aug-04 15:00
David Fleming19-Aug-04 15:00 
GeneralRe: Mapping array of CButtons Pin
David Fleming19-Aug-04 15:20
David Fleming19-Aug-04 15:20 
OK, I figured out how to map the buttons all to the same function. Here's the code:

BEGIN_MESSAGE_MAP(CButtonArrayTestDlg, CDialog)
//{{AFX_MSG_MAP(CButtonArrayTestDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDC_BUTTON1, OnButtonArray)
ON_BN_CLICKED(IDC_BUTTON2, OnButtonArray)
ON_BN_CLICKED(IDC_BUTTON3, OnButtonArray)
END_MESSAGE_MAP()

Now, when each of the buttons is pressed, it does call the correct function. But now how do I know which button was pressed?
GeneralRe: Mapping array of CButtons Pin
Blake Miller20-Aug-04 4:26
Blake Miller20-Aug-04 4:26 
GeneralRe: Mapping array of CButtons Pin
David Fleming26-Aug-04 14:04
David Fleming26-Aug-04 14:04 
GeneralRe: Mapping array of CButtons Pin
David Crow27-May-04 5:52
David Crow27-May-04 5:52 
QuestionHow can I make this? (Windows Shell Programming) Pin
Thomas Enderson27-May-04 3:05
Thomas Enderson27-May-04 3:05 
AnswerRe: How can I make this? (Windows Shell Programming) Pin
Alexander M.,27-May-04 8:43
Alexander M.,27-May-04 8:43 
Generalclosing dialog by clicking on it Pin
toxcct27-May-04 2:42
toxcct27-May-04 2:42 
GeneralRe: closing dialog by clicking on it Pin
Antony M Kancidrowski27-May-04 2:48
Antony M Kancidrowski27-May-04 2:48 
GeneralRe: closing dialog by clicking on it Pin
toxcct27-May-04 2:53
toxcct27-May-04 2:53 
GeneralRe: closing dialog by clicking on it Pin
Antony M Kancidrowski27-May-04 3:14
Antony M Kancidrowski27-May-04 3:14 
GeneralRe: closing dialog by clicking on it Pin
Antony M Kancidrowski27-May-04 3:20
Antony M Kancidrowski27-May-04 3:20 
GeneralRe: closing dialog by clicking on it Pin
toxcct27-May-04 3:23
toxcct27-May-04 3:23 
GeneralRe: closing dialog by clicking on it Pin
dart1327-May-04 3:01
dart1327-May-04 3:01 
GeneralRe: closing dialog by clicking on it Pin
toxcct27-May-04 3:03
toxcct27-May-04 3:03 
GeneralRe: closing dialog by clicking on it Pin
David Crow27-May-04 3:05
David Crow27-May-04 3:05 
GeneralRe: closing dialog by clicking on it Pin
toxcct27-May-04 3:10
toxcct27-May-04 3:10 
General[Message Deleted] Pin
Naren Neelamegam28-May-04 18:55
Naren Neelamegam28-May-04 18:55 
GeneralRe: closing dialog by clicking on it Pin
toxcct28-May-04 22:36
toxcct28-May-04 22:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.