There is a selected index changed event on the combo box. Handle this event, and then check the text being displayed with GetWindowText(), if it's Test window', then act accordingly. You could also do it by index, if the index won't change, but if it does for some reason, your code will break later.
ctimko wrote:
Thank you for your reply....is it possible if you could give me a step by step, sort of, explination, because I am really lost. Thanks.
ctimko wrote:
So, if I understand this correctly, the CString str is the item that is selected in the combobox? Let me know if I am right. Thanks.
Yes. That's correct.
Right? I am rather new to working in the Visual Studio. I normally write in Win32 API, or just command line programs. :-) I hope I got this right.
ctimko
ctimko wrote:
So, I would use a if..else statement for that. For instance
if (str=='Test Window\0')
{
TestWindow wnd;
wnd.DoModal();
}Right? I am rather new to working in the Visual Studio. I normally write in Win32 API, or just command line programs. :-) I hope I got this right.
ctimko
Yes, CString has an overloaded == operator, so you can do just that.