Click here to Skip to main content
15,914,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDo you put :: in front of every Windows API call ? Pin
Defenestration8-Dec-08 17:42
Defenestration8-Dec-08 17:42 
AnswerRe: Do you put :: in front of every Windows API call ? Pin
_AnsHUMAN_ 8-Dec-08 18:15
_AnsHUMAN_ 8-Dec-08 18:15 
GeneralRe: Do you put :: in front of every Windows API call ? Pin
Defenestration8-Dec-08 18:31
Defenestration8-Dec-08 18:31 
GeneralRe: Do you put :: in front of every Windows API call ? Pin
_AnsHUMAN_ 8-Dec-08 18:38
_AnsHUMAN_ 8-Dec-08 18:38 
GeneralRe: Do you put :: in front of every Windows API call ? Pin
Defenestration8-Dec-08 18:46
Defenestration8-Dec-08 18:46 
GeneralRe: Do you put :: in front of every Windows API call ? Pin
_AnsHUMAN_ 8-Dec-08 18:53
_AnsHUMAN_ 8-Dec-08 18:53 
AnswerRe: Do you put :: in front of every Windows API call ? [modified] Pin
Defenestration8-Dec-08 19:06
Defenestration8-Dec-08 19:06 
GeneralRe: Do you put :: in front of every Windows API call ? Pin
Rajesh R Subramanian8-Dec-08 20:27
professionalRajesh R Subramanian8-Dec-08 20:27 
If you need to call the function declared in global namespace, then use the scope resolution operator, suffixing the API. If you don't do this, the local version of the API will be called.

For example, when you write an MFC app, something like MessageBox is provided to you by both - the MFC application framework and is as well available in the global namespace. A call to MessageBox will end up calling the one provided by the application framework, whereas ::MessageBox will call the one in the global namespace.

There's nothing special to it, just used to specify the scope of the API being called.


It is a crappy thing, but it's life -^ Carlo Pallini

AnswerRe: Do you put :: in front of every Windows API call ? Pin
Roger Stoltz8-Dec-08 21:29
Roger Stoltz8-Dec-08 21:29 
GeneralRe: Do you put :: in front of every Windows API call ? Pin
Defenestration8-Dec-08 22:22
Defenestration8-Dec-08 22:22 
AnswerRe: Do you put :: in front of every Windows API call ? Pin
Roger Stoltz8-Dec-08 22:34
Roger Stoltz8-Dec-08 22:34 
GeneralRe: Do you put :: in front of every Windows API call ? Pin
Defenestration8-Dec-08 22:39
Defenestration8-Dec-08 22:39 
AnswerRe: Do you put :: in front of every Windows API call ? Pin
Roger Stoltz8-Dec-08 22:44
Roger Stoltz8-Dec-08 22:44 
AnswerRe: Do you put :: in front of every Windows API call ? [modified] Pin
Defenestration8-Dec-08 22:53
Defenestration8-Dec-08 22:53 
AnswerRe: Do you put :: in front of every Windows API call ? Pin
Snorri Kristjansson8-Dec-08 22:21
professionalSnorri Kristjansson8-Dec-08 22:21 
Questionhelp in dll Import Pin
tasumisra8-Dec-08 17:05
tasumisra8-Dec-08 17:05 
AnswerRe: help in dll Import Pin
raju00038-Dec-08 21:01
raju00038-Dec-08 21:01 
GeneralRe: help in dll Import Pin
tasumisra8-Dec-08 21:22
tasumisra8-Dec-08 21:22 
AnswerRe: help in dll Import Pin
Roger Stoltz8-Dec-08 21:35
Roger Stoltz8-Dec-08 21:35 
QuestionReading a MBCS string from a Rich Edit Text Box in VC6 Pin
JJeffrey8-Dec-08 16:32
JJeffrey8-Dec-08 16:32 
QuestionRe: Reading a MBCS string from a Rich Edit Text Box in VC6 Pin
Rajesh R Subramanian8-Dec-08 20:10
professionalRajesh R Subramanian8-Dec-08 20:10 
AnswerRe: Reading a MBCS string from a Rich Edit Text Box in VC6 Pin
JJeffrey8-Dec-08 21:00
JJeffrey8-Dec-08 21:00 
AnswerRe: Reading a MBCS string from a Rich Edit Text Box in VC6 Pin
Rajesh R Subramanian8-Dec-08 21:15
professionalRajesh R Subramanian8-Dec-08 21:15 
GeneralRe: Reading a MBCS string from a Rich Edit Text Box in VC6 Pin
JJeffrey8-Dec-08 21:49
JJeffrey8-Dec-08 21:49 
GeneralRe: Reading a MBCS string from a Rich Edit Text Box in VC6 Pin
Rajesh R Subramanian8-Dec-08 21:55
professionalRajesh R Subramanian8-Dec-08 21:55 

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.