I've created a Combo Box in my MFC Dialog and would like to get the integer number which I select, for example:
I have no problem to select any number from 1 to 8 in the ComboBox but I need to get the number which I select to be applied in the function: CSerialSource::Open(PortNumber); "
CHAR DeviceTermSize ;
for ( int nDevice = 1; nDevice <= 8; nDevice++ )
sprintf ( DeviceTermSize, "%ld", nDevice );
m_DeviceNumber.AddString ( DeviceTermSize );
m_DeviceNumber.SetCurSel ( 1 );
// int PortNumber = ??? ;
This is very important to my serial communication to select the Port Number and let my program know what I have selected.
How can I obtain the "PortNumber" value? Any suggestion and help is well appreciated. Thanks!