Visual Studio C++

Ok guys I have a slight problem in Visual Studio C++.

I have a Combo Box with four options : Construction Project,Research Project,Business Project,Accounting Project. When I select one and press the continue button I'm suppose to go to Form2.

I already programed the Cancel Button, I just don't know how to program the Continue button.

Well here's the response I posted a couple of hours ago at:

http://www.cplusplus.com/forum/general/105351/

Firstly, you should have really put this in the "Windows Programming" section.

Have you written code that caters for the ON_CBN_SELCHANGE event? If not, then write that to start with. When you are in the code that handles that event, then you will be able to obtain the index for the item selected via:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
CComboBox* pCB = (ComboBox*)GetDlgItem(IDC_COMBOBOXID);
int idx = pCB->GetCurSel();
Form* pForm(NULL);

switch (idx)
{
	case 0:

		break;

	case 1:
		pForm = new Form2();
		break;

	case 2:

		break;

	case 3:

		break;
}

// etc ... 




Not knowing anything about your code I don't know what functions, classes etc you have. But hope that helps.
Last edited on
Topic archived. No new replies allowed.