Click here to Skip to main content
15,897,718 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CButton click PinPopular
Cool_Dev25-Feb-11 0:49
Cool_Dev25-Feb-11 0:49 
GeneralRe: CButton click Pin
goorley27-Feb-11 21:51
goorley27-Feb-11 21:51 
QuestionHow can I catch FindString event on CComboBox ? Pin
_Flaviu24-Feb-11 22:11
_Flaviu24-Feb-11 22:11 
AnswerRe: How can I catch FindString event on CComboBox ? Pin
Hans Dietrich24-Feb-11 22:12
mentorHans Dietrich24-Feb-11 22:12 
AnswerRe: How can I catch FindString event on CComboBox ? Pin
Richard MacCutchan24-Feb-11 23:04
mveRichard MacCutchan24-Feb-11 23:04 
GeneralRe: How can I catch FindString event on CComboBox ? Pin
_Flaviu25-Feb-11 0:56
_Flaviu25-Feb-11 0:56 
Questionhow to set the width of scrollbar in listbox Pin
raj157624-Feb-11 20:48
raj157624-Feb-11 20:48 
AnswerRe: how to set the width of scrollbar in listbox Pin
Hans Dietrich24-Feb-11 21:07
mentorHans Dietrich24-Feb-11 21:07 
Questionhow to integrate WPF window designs in vc++ win32/mfc environment? Pin
mathivanaan24-Feb-11 19:15
mathivanaan24-Feb-11 19:15 
AnswerRe: how to integrate WPF window designs in vc++ win32/mfc environment? Pin
Rolf Kristensen24-Feb-11 20:54
Rolf Kristensen24-Feb-11 20:54 
AnswerRe: how to integrate WPF window designs in vc++ win32/mfc environment? Pin
Richard MacCutchan24-Feb-11 22:55
mveRichard MacCutchan24-Feb-11 22:55 
QuestionConvert from Double to Integer w/o Rounding in C++ Pin
User 741604624-Feb-11 12:06
User 741604624-Feb-11 12:06 
AnswerRe: Convert from Double to Integer w/o Rounding in C++ Pin
Luc Pattyn24-Feb-11 12:30
sitebuilderLuc Pattyn24-Feb-11 12:30 
GeneralRe: Convert from Double to Integer w/o Rounding in C++ Pin
User 741604624-Feb-11 13:31
User 741604624-Feb-11 13:31 
QuestionRe: Convert from Double to Integer w/o Rounding in C++ Pin
Luc Pattyn24-Feb-11 13:42
sitebuilderLuc Pattyn24-Feb-11 13:42 
AnswerRe: Convert from Double to Integer w/o Rounding in C++ Pin
«_Superman_»24-Feb-11 18:51
professional«_Superman_»24-Feb-11 18:51 
AnswerRe: Convert from Double to Integer w/o Rounding in C++ Pin
Bernhard Hiller24-Feb-11 20:56
Bernhard Hiller24-Feb-11 20:56 
AnswerRe: Convert from Double to Integer w/o Rounding in C++ Pin
Andrew Brock24-Feb-11 22:20
Andrew Brock24-Feb-11 22:20 
GeneralRe: Convert from Double to Integer w/o Rounding in C++ Pin
User 741604625-Feb-11 2:44
User 741604625-Feb-11 2:44 
Thanks.

I thought I read somewhere that int() rounded down when converting from double, though it didn't seem so when I tested it. I think the whole thing that brought up this issue was the fact that int() doesn't handle decimals like 1.99999... correctly. Therefore it was throwing off everything when it rounded 1.999... to 2.

The above function works perfectly, so long as you make sure to include both float.h and cmath.

Thanks again!

modified 21-Dec-20 21:02pm.

QuestionHow can I retrieve handlw of dropdown list box ? Pin
_Flaviu24-Feb-11 5:20
_Flaviu24-Feb-11 5:20 
AnswerRe: How can I retrieve handlw of dropdown list box ? Pin
Hans Dietrich24-Feb-11 5:31
mentorHans Dietrich24-Feb-11 5:31 
GeneralRe: How can I retrieve handlw of dropdown list box ? Pin
_Flaviu24-Feb-11 7:02
_Flaviu24-Feb-11 7:02 
AnswerRe: How can I retrieve handlw of dropdown list box ? Pin
Code-o-mat24-Feb-11 8:33
Code-o-mat24-Feb-11 8:33 
GeneralRe: How can I retrieve handlw of dropdown list box ? Pin
_Flaviu24-Feb-11 9:52
_Flaviu24-Feb-11 9:52 
GeneralRe: How can I retrieve handlw of dropdown list box ? Pin
Code-o-mat24-Feb-11 9:54
Code-o-mat24-Feb-11 9:54 

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.