Click here to Skip to main content
16,015,658 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Code-o-mat28-Jun-11 22:12
Code-o-mat28-Jun-11 22:12 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin29-Jun-11 7:51
professionalAlbert Holguin29-Jun-11 7:51 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Albert Holguin29-Jun-11 7:52
professionalAlbert Holguin29-Jun-11 7:52 
GeneralRe: CButton::DrawItem not called when owner dialog is "Restored" Pin
Code-o-mat29-Jun-11 7:56
Code-o-mat29-Jun-11 7:56 
QuestionREAD or WRITE .XLS File Pin
svkhadilkar28-Jun-11 6:01
svkhadilkar28-Jun-11 6:01 
AnswerRe: READ or WRITE .XLS File Pin
Richard MacCutchan28-Jun-11 6:55
mveRichard MacCutchan28-Jun-11 6:55 
Questionmissing zero in ostringstream format [modified] Pin
ed welch28-Jun-11 3:58
ed welch28-Jun-11 3:58 
AnswerRe: missing zero in ostringstream format Pin
enhzflep28-Jun-11 5:24
enhzflep28-Jun-11 5:24 
Seems to be a fairly common hurdle when dealing with the streams.
Found an answer on stackOverflow, it's a requirement that "fixed" is used before trying to
set the precision. If this is not done, the call to setprecision will specify the _total_ number of digits to be displayed. Occurring after "fixed", it will specify the number of places after the decimal point to display.

Found it here[^].

Code:
#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
    float incRate = 10.0f;
    cout << fixed << setprecision(2) << 12.12123 << endl << setprecision(5) << 12.12123;
    return 0;
}

Output
12.12
12.12123
Process returned 0 (0x0)   execution time : 0.023 s
Press any key to continue.


Cheers Smile | :)
GeneralRe: missing zero in ostringstream format Pin
ed welch28-Jun-11 5:31
ed welch28-Jun-11 5:31 
GeneralRe: missing zero in ostringstream format Pin
enhzflep28-Jun-11 5:56
enhzflep28-Jun-11 5:56 
Question_atoi64 in VS10 Pin
gomathylakshmanan28-Jun-11 3:43
gomathylakshmanan28-Jun-11 3:43 
AnswerRe: _atoi64 in VS10 PinPopular
Chuck O'Toole28-Jun-11 5:21
Chuck O'Toole28-Jun-11 5:21 
QuestionON_NOTIFY_REFLECT_EX called twice Pin
_Flaviu27-Jun-11 22:06
_Flaviu27-Jun-11 22:06 
QuestionRe: ON_NOTIFY_REFLECT_EX called twice Pin
David Crow28-Jun-11 3:27
David Crow28-Jun-11 3:27 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
_Flaviu28-Jun-11 4:40
_Flaviu28-Jun-11 4:40 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
enhzflep28-Jun-11 5:04
enhzflep28-Jun-11 5:04 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
_Flaviu28-Jun-11 8:06
_Flaviu28-Jun-11 8:06 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
enhzflep28-Jun-11 9:12
enhzflep28-Jun-11 9:12 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
David Crow28-Jun-11 16:57
David Crow28-Jun-11 16:57 
GeneralRe: ON_NOTIFY_REFLECT_EX called twice Pin
enhzflep28-Jun-11 21:19
enhzflep28-Jun-11 21:19 
QuestionHow to get clsid from GUID of a class Pin
gtag27-Jun-11 21:21
gtag27-Jun-11 21:21 
QuestionRe: How to get clsid from GUID of a class Pin
CPallini27-Jun-11 21:34
mveCPallini27-Jun-11 21:34 
QuestionDispatchID Failed... Pin
yaxiya27-Jun-11 16:25
yaxiya27-Jun-11 16:25 
AnswerRe: DispatchID Failed... Pin
barneyman27-Jun-11 17:40
barneyman27-Jun-11 17:40 
GeneralRe: DispatchID Failed... Pin
yaxiya27-Jun-11 19:32
yaxiya27-Jun-11 19:32 

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.