Click here to Skip to main content
15,919,358 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: See this code.. Pin
johnny,Kim29-Jun-04 20:13
johnny,Kim29-Jun-04 20:13 
GeneralInitialization of a CWnd derived custom control Pin
kfaday29-Jun-04 15:38
kfaday29-Jun-04 15:38 
GeneralRe: Initialization of a CWnd derived custom control Pin
User 58385229-Jun-04 16:47
User 58385229-Jun-04 16:47 
QuestionASCII programming ?? Pin
Spank me!!29-Jun-04 10:51
Spank me!!29-Jun-04 10:51 
AnswerRe: ASCII programming ?? Pin
l a u r e n29-Jun-04 11:53
l a u r e n29-Jun-04 11:53 
GeneralRe: ASCII programming ?? Pin
Christian Graus29-Jun-04 16:35
protectorChristian Graus29-Jun-04 16:35 
AnswerRe: ASCII programming ?? Pin
Johnny ²29-Jun-04 11:53
Johnny ²29-Jun-04 11:53 
GeneralProper usage of #pragma once Pin
digwizfox29-Jun-04 9:36
digwizfox29-Jun-04 9:36 
I've never gotten a good answer out of anyone when I have inquired about the proper way to ensure that a file is included only once in a build. I also did not see anything in my thread search so I'll ask and hopefully get a reasonable answer.

In the below subset of code, I though the first set of instructions was to ensure that the header file would be included only once in a build. Then I thought, well what is the pragma once for then? According to the MSDN help, pragma once does the same thing. So when class wizards generate a class header file, why do they insert code that seems to serve duplicate purposes? Any ideas?

#if !defined(AFX_RETRYDLG_H__4A3C71B3_E316_48A5_B38E_7F3E778D47DD__INCLUDED_)
#define AFX_RETRYDLG_H__4A3C71B3_E316_48A5_B38E_7F3E778D47DD__INCLUDED_

//I've already used the previous #ifndef ... #endif to
//ensure the single inclusion of my class declaration.
//Why do I need this #pragma once on top of that?
#if _MSC_VER > 1000
#pragma once
#endif

//of course my class would be declared after the #pragma once statement.
class MyClass
{
MyClass();
~MyClass();
};
#endif // _MSC_VER > 1000

GeneralRe: Proper usage of #pragma once Pin
Maximilien29-Jun-04 9:50
Maximilien29-Jun-04 9:50 
GeneralRe: Proper usage of #pragma once Pin
cmk29-Jun-04 9:56
cmk29-Jun-04 9:56 
GeneralRe: Proper usage of #pragma once Pin
Jeremy Falcon29-Jun-04 10:49
professionalJeremy Falcon29-Jun-04 10:49 
GeneralRe: Proper usage of #pragma once Pin
PJ Arends29-Jun-04 11:07
professionalPJ Arends29-Jun-04 11:07 
GeneralRe: Proper usage of #pragma once Pin
Maximilien30-Jun-04 3:25
Maximilien30-Jun-04 3:25 
GeneralRe: Proper usage of #pragma once Pin
Michael Dunn29-Jun-04 12:09
sitebuilderMichael Dunn29-Jun-04 12:09 
QuestionHow do I keep Menu from covering Property page tabs Pin
Bob_The_Programmer29-Jun-04 8:58
Bob_The_Programmer29-Jun-04 8:58 
Questionhow to loop portions of a WAV using DirectSound? Pin
seanmc.cs29-Jun-04 8:26
seanmc.cs29-Jun-04 8:26 
AnswerRe: how to loop portions of a WAV using DirectSound? Pin
Antti Keskinen29-Jun-04 11:57
Antti Keskinen29-Jun-04 11:57 
GeneralRe: how to loop portions of a WAV using DirectSound? Pin
seanmc.cs30-Jun-04 15:53
seanmc.cs30-Jun-04 15:53 
GeneralRe: how to loop portions of a WAV using DirectSound? Pin
seanmc.cs30-Jun-04 17:22
seanmc.cs30-Jun-04 17:22 
GeneralRe: how to loop portions of a WAV using DirectSound? Pin
Antti Keskinen1-Jul-04 7:33
Antti Keskinen1-Jul-04 7:33 
AnswerBlips are natural! Pin
normanS1-Jul-04 3:23
normanS1-Jul-04 3:23 
Generalwinsock2 for MS Visual C++ Toolkit 2003 Pin
george kermeen29-Jun-04 8:21
george kermeen29-Jun-04 8:21 
GeneralRe: winsock2 for MS Visual C++ Toolkit 2003 Pin
palbano29-Jun-04 13:39
palbano29-Jun-04 13:39 
GeneralRe: winsock2 for MS Visual C++ Toolkit 2003 Pin
george kermeen30-Jun-04 4:18
george kermeen30-Jun-04 4:18 
Generalwin32 dll Pin
ns29-Jun-04 7:42
ns29-Jun-04 7:42 

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.