Select items from combobox

Hello.
I have 3 items in a combobox and for the first one , when i select it i want to receive an error message. How is that possible?
You've got to process the messages sent correctly.

Aceix.
1
2
3
SendMessage(ID, CB_ADDSTRING, 0, (LPARAM) _T("Text1"));
SendMessage(ID, CB_ADDSTRING, 0, (LPARAM) _T("Text2"));
SendMessage(ID, CB_ADDSTRING, 0, (LPARAM) _T("Text3"));


There are 3 items, Text1,2,3 to the specified ID. So how can i do to call Text1 or Text2? I mean, when i select Text1 from combobox i receive an error message.
Process WM_COMMAND message with CBN_SELCHANGE notification code.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775821%28v=vs.85%29.aspx
use messagebox to display the message
http://msdn.microsoft.com/en-us/library/0eebkf6f.aspx

and use ON_CBN_SELCHANGE to fire the messagebox
Topic archived. No new replies allowed.