Click here to Skip to main content
15,921,250 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralReturning focus to window Pin
Julietta Magakian5-Feb-05 19:59
sussJulietta Magakian5-Feb-05 19:59 
GeneralRe: Returning focus to window Pin
X20405-Feb-05 22:00
X20405-Feb-05 22:00 
GeneralBeginner need help : bug in my code Pin
Robert Eckman5-Feb-05 19:24
Robert Eckman5-Feb-05 19:24 
GeneralRe: Beginner need help : bug in my code Pin
John L. DeVito5-Feb-05 19:37
professionalJohn L. DeVito5-Feb-05 19:37 
GeneralRe: Beginner need help : bug in my code Pin
Robert Eckman5-Feb-05 19:57
Robert Eckman5-Feb-05 19:57 
GeneralRe: Beginner need help : bug in my code Pin
Robert Eckman5-Feb-05 20:16
Robert Eckman5-Feb-05 20:16 
GeneralCEdit Control to unsigned short array Pin
Dennis Wentworth5-Feb-05 11:37
sussDennis Wentworth5-Feb-05 11:37 
GeneralRe: CEdit Control to unsigned short array Pin
PJ Arends5-Feb-05 13:11
professionalPJ Arends5-Feb-05 13:11 
Use GetWindowText to get the number (as a string) from the edit control.

Use strtod to convert the string to a double.

Do your calculation, whatever it is.

To round the number to the nearest int you have to add 0.5 then cast it to an int
int MyInt = (int)(MyDouble + 0.5);
A simple cast always rounds down, so adding 0.5 gives the effect of rounding up.

You can do a cast from an int to a short or char, you will just lose some info if your int is too large a value. The non-printing characters only matter if you actually want to print them.






"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" mYkel - 21 Jun '04

Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004

GeneralRe: CEdit Control to unsigned short array Pin
Dennis Wentworth5-Feb-05 13:35
sussDennis Wentworth5-Feb-05 13:35 
GeneralRe: CEdit Control to unsigned short array Pin
PJ Arends5-Feb-05 15:35
professionalPJ Arends5-Feb-05 15:35 
QuestionRedrawWindow(), Invalidate() ? Pin
BlackDice5-Feb-05 5:40
BlackDice5-Feb-05 5:40 
AnswerRe: RedrawWindow(), Invalidate() ? Pin
Mike Dimmick5-Feb-05 9:05
Mike Dimmick5-Feb-05 9:05 
GeneralRe: RedrawWindow(), Invalidate() ? Pin
BlackDice5-Feb-05 9:10
BlackDice5-Feb-05 9:10 
GeneralPlaying WAV files Pin
Grahamfff5-Feb-05 5:32
Grahamfff5-Feb-05 5:32 
GeneralRe: Playing WAV files Pin
PJ Arends5-Feb-05 10:44
professionalPJ Arends5-Feb-05 10:44 
GeneralRe: Playing WAV files Pin
Blake Miller7-Feb-05 5:25
Blake Miller7-Feb-05 5:25 
GeneralProblems with malloc Pin
r3dqu33n5-Feb-05 1:12
r3dqu33n5-Feb-05 1:12 
GeneralRe: Problems with malloc Pin
WoutL5-Feb-05 1:25
WoutL5-Feb-05 1:25 
GeneralRe: Problems with malloc Pin
r3dqu33n5-Feb-05 1:38
r3dqu33n5-Feb-05 1:38 
GeneralRe: Problems with malloc Pin
WoutL5-Feb-05 1:54
WoutL5-Feb-05 1:54 
GeneralRe: Problems with malloc Pin
Anonymous5-Feb-05 3:57
Anonymous5-Feb-05 3:57 
GeneralRe: Problems with malloc Pin
Mike Dimmick5-Feb-05 1:57
Mike Dimmick5-Feb-05 1:57 
GeneralRe: Problems with malloc Pin
Michael Dunn5-Feb-05 20:49
sitebuilderMichael Dunn5-Feb-05 20:49 
GeneralHTTP chunked encoding Pin
Taka Muraoka4-Feb-05 23:47
Taka Muraoka4-Feb-05 23:47 
GeneralA Problem with PostgreSQl Pin
tranglt4-Feb-05 22:44
tranglt4-Feb-05 22:44 

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.