Click here to Skip to main content
15,886,797 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create shortcut with initial window size Pin
baerten10-Dec-07 4:08
baerten10-Dec-07 4:08 
GeneralAbout VC++ Pin
john56329-Dec-07 22:36
john56329-Dec-07 22:36 
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 
You're right, mapping the combo to an int variable make the latter containing the selected index value.
Hence you can either:
(1) Map the combo to a CString variable and the performing _tstoi on the variable.

(2) Getting a pointer (say pCombo) to your combo box class (you can either map a variable or call GetDlgItem) and then:
int nSel = pCombo->GetCurSel();
int nSelValue;
if (nSel != CB_ERR)
{
  CString strValue;
  pCombo->GetLBText(pCombo->GetCurSel(), strValue); 
  nSelValue = _tstoi(strValue); // your integer
}



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 17:21
Chandrasekharan P10-Dec-07 17:21 
GeneralRe: Regarding combo box Pin
CPallini10-Dec-07 22:01
mveCPallini10-Dec-07 22:01 
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 

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.