Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About VC++ Pin
Cedric Moonen9-Dec-07 22:43
Cedric Moonen9-Dec-07 22:43 
GeneralRe: About VC++ Pin
Chandrasekharan P9-Dec-07 22:44
Chandrasekharan P9-Dec-07 22:44 
GeneralRegarding combo box Pin
Chandrasekharan P9-Dec-07 22:28
Chandrasekharan P9-Dec-07 22:28 
GeneralRe: Regarding combo box [modified] Pin
CPallini9-Dec-07 23:04
mveCPallini9-Dec-07 23:04 
GeneralRe: Regarding combo box Pin
Chandrasekharan P10-Dec-07 0:00
Chandrasekharan P10-Dec-07 0:00 
GeneralRe: Regarding combo box Pin
CPallini10-Dec-07 0:33
mveCPallini10-Dec-07 0:33 
GeneralRe: Regarding combo box Pin
Chandrasekharan P10-Dec-07 17:21
Chandrasekharan P10-Dec-07 17:21 
GeneralRe: Regarding combo box Pin
CPallini10-Dec-07 22:01
mveCPallini10-Dec-07 22:01 
Chandrasekharanp wrote:
so cant change the data type. it can be only int.


In fact, you can. Sometimes a bit refactoring effort it is worthy to do.
Anyway I don't insist on design policies, hence, supposing you int variable name is iCurSel (and your combo box ID is IDC_COMBO), you can do:
int iValue;
UpdateData();
if (iCurSel != CB_ERR)
{
  CString strValue;
  ((CComboBox *) GetDlgItem(IDC_COMBO))->GetLBText(iCurSel, strValue);
  iValue = _tstoi(strValue);
}


Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.


GeneralRe: Regarding combo box Pin
Chandrasekharan P10-Dec-07 23:59
Chandrasekharan P10-Dec-07 23:59 
Generalproblem with network programming Pin
Kogee San9-Dec-07 22:11
Kogee San9-Dec-07 22:11 
GeneralRe: problem with network programming Pin
Cedric Moonen9-Dec-07 22:24
Cedric Moonen9-Dec-07 22:24 
GeneralRe: problem with network programming Pin
CPallini9-Dec-07 22:43
mveCPallini9-Dec-07 22:43 
GeneralRe: problem with network programming Pin
Kogee San11-Dec-07 19:36
Kogee San11-Dec-07 19:36 
GeneralRead the first byte of a buffer Pin
CodingLover9-Dec-07 20:58
CodingLover9-Dec-07 20:58 
GeneralRe: Read the first byte of a buffer Pin
Cedric Moonen9-Dec-07 21:03
Cedric Moonen9-Dec-07 21:03 
GeneralRe: Read the first byte of a buffer [modified] Pin
toxcct9-Dec-07 21:24
toxcct9-Dec-07 21:24 
GeneralRe: Read the first byte of a buffer Pin
CodingLover9-Dec-07 23:46
CodingLover9-Dec-07 23:46 
GeneralRe: Read the first byte of a buffer Pin
toxcct9-Dec-07 23:51
toxcct9-Dec-07 23:51 
GeneralRe: Read the first byte of a buffer Pin
CodingLover9-Dec-07 23:54
CodingLover9-Dec-07 23:54 
GeneralRe: Read the first byte of a buffer Pin
CodingLover9-Dec-07 21:50
CodingLover9-Dec-07 21:50 
GeneralModulable programming Pin
Lord Kixdemp9-Dec-07 20:57
Lord Kixdemp9-Dec-07 20:57 
GeneralRe: Modulable programming Pin
Matthew Faithfull10-Dec-07 0:11
Matthew Faithfull10-Dec-07 0:11 
QuestionHow to Hide Caption Bar using SetWindowLong() Pin
santhoshv849-Dec-07 20:46
santhoshv849-Dec-07 20:46 
AnswerRe: How to Hide Caption Bar using SetWindowLong() Pin
Nishad S10-Dec-07 0:06
Nishad S10-Dec-07 0:06 
AnswerRe: How to Hide Caption Bar using SetWindowLong() Pin
Paresh Chitte10-Dec-07 0:39
Paresh Chitte10-Dec-07 0:39 

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.