Click here to Skip to main content
15,888,908 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: back ground color of Message Box Pin
ThatsAlok3-Aug-08 22:34
ThatsAlok3-Aug-08 22:34 
GeneralRe: back ground color of Message Box Pin
ThatsAlok3-Aug-08 22:34
ThatsAlok3-Aug-08 22:34 
GeneralRe: back ground color of Message Box Pin
Y_Kaushik3-Aug-08 23:24
Y_Kaushik3-Aug-08 23:24 
GeneralRe: back ground color of Message Box Pin
ThatsAlok3-Aug-08 23:35
ThatsAlok3-Aug-08 23:35 
AnswerRe: back ground color of Message Box Pin
bolivar1234-Aug-08 4:49
bolivar1234-Aug-08 4:49 
QuestionInlining Question Pin
Leslie Sanford3-Aug-08 19:36
Leslie Sanford3-Aug-08 19:36 
AnswerRe: Inlining Question Pin
vikas amin4-Aug-08 7:46
vikas amin4-Aug-08 7:46 
AnswerRe: Inlining Question Pin
not_in_use5-Aug-08 11:58
not_in_use5-Aug-08 11:58 
As far as I understand it they won't be inlined, just like regular constants. I have pretty much the same problem right now, except that I don't need to switch types. In this thread I posted my current idea for a workaround (using operator overloading and inline functions), maybe that could help you. It's a hack, but in theory it should work.

As for your templating idea, if you don't need both float and double versions at the same time, you could just use typedefs like so:

// .h file
typedef double myFpType; // Changing this to float changes the type of all constants

const myFpType pi;
...

// .cpp file
const myFpType pi = myFpType( 3.14159265358979 );
...


or using my workaround idea from the link above:
typedef double myFpType;

// In .h file
INLINE_CONST( myFpType, pi, myFpType( 3.14159265358979 ) );


But maybe someone knows a better solution that could help us both out.

Hope that helps,
Peter
QuestionError: Message too long Pin
vikramaditya2343-Aug-08 19:32
vikramaditya2343-Aug-08 19:32 
QuestionRe: Error: Message too long Pin
David Crow4-Aug-08 3:11
David Crow4-Aug-08 3:11 
QuestionStrange problem about IOCP Pin
zengkun1003-Aug-08 16:43
zengkun1003-Aug-08 16:43 
QuestionIs there any tools or add-ins to help refactor the codes in vc6? Pin
fantasy12153-Aug-08 15:04
fantasy12153-Aug-08 15:04 
AnswerRe: Is there any tools or add-ins to help refactor the codes in vc6? Pin
bolivar1233-Aug-08 16:18
bolivar1233-Aug-08 16:18 
QuestionRe: Is there any tools or add-ins to help refactor the codes in vc6? Pin
fantasy12153-Aug-08 16:39
fantasy12153-Aug-08 16:39 
GeneralRe: Is there any tools or add-ins to help refactor the codes in vc6? Pin
fantasy12153-Aug-08 17:00
fantasy12153-Aug-08 17:00 
QuestionCreating a dos driver? [modified] Pin
Sauce!3-Aug-08 12:57
Sauce!3-Aug-08 12:57 
AnswerRe: Creating a dos driver? Pin
Sauce!5-Aug-08 20:59
Sauce!5-Aug-08 20:59 
QuestionStarting Windows mobile C++ Development Pin
Jamie Nordmeyer3-Aug-08 12:49
Jamie Nordmeyer3-Aug-08 12:49 
AnswerRe: Starting Windows mobile C++ Development Pin
Garth J Lancaster3-Aug-08 20:05
professionalGarth J Lancaster3-Aug-08 20:05 
QuestionProgress indicator in dialog title Pin
philrk3-Aug-08 11:00
philrk3-Aug-08 11:00 
AnswerRe: Progress indicator in dialog title Pin
Mark Salsbery4-Aug-08 7:51
Mark Salsbery4-Aug-08 7:51 
QuestionCreatefile in Vista Pin
RaymondM3-Aug-08 2:32
RaymondM3-Aug-08 2:32 
AnswerRe: Createfile in Vista Pin
Perspx3-Aug-08 2:55
Perspx3-Aug-08 2:55 
GeneralRe: Createfile in Vista Pin
RaymondM3-Aug-08 5:03
RaymondM3-Aug-08 5:03 
GeneralRe: Createfile in Vista Pin
Perspx3-Aug-08 5:26
Perspx3-Aug-08 5:26 

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.