Click here to Skip to main content
15,892,839 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Custom Tool Bar Event Handler Pin
Owner drawn24-Jan-06 0:11
Owner drawn24-Jan-06 0:11 
GeneralRe: Custom Tool Bar Event Handler Pin
BlitzPackage24-Jan-06 2:05
BlitzPackage24-Jan-06 2:05 
GeneralRe: Custom Tool Bar Event Handler Pin
Owner drawn24-Jan-06 16:49
Owner drawn24-Jan-06 16:49 
QuestionVariable Baud Rate Pin
IceBerG7123-Jan-06 15:33
IceBerG7123-Jan-06 15:33 
AnswerRe: Variable Baud Rate Pin
Ryan Binns23-Jan-06 17:10
Ryan Binns23-Jan-06 17:10 
AnswerRe: Variable Baud Rate Pin
normanS23-Jan-06 18:41
normanS23-Jan-06 18:41 
QuestionDoModal throws an access violation only for one language Pin
A_L23-Jan-06 13:19
A_L23-Jan-06 13:19 
Questionkeyboard event during long lasting loop Pin
wpuelm23-Jan-06 12:45
wpuelm23-Jan-06 12:45 
AnswerRe: keyboard event during long lasting loop Pin
Blake Miller23-Jan-06 12:57
Blake Miller23-Jan-06 12:57 
AnswerRe: keyboard event during long lasting loop Pin
Michael Dunn23-Jan-06 17:13
sitebuilderMichael Dunn23-Jan-06 17:13 
GeneralRe: keyboard event during long lasting loop Pin
Rajesh R Subramanian23-Jan-06 18:27
professionalRajesh R Subramanian23-Jan-06 18:27 
AnswerRe: keyboard event during long lasting loop Pin
namaskaaram23-Jan-06 18:47
namaskaaram23-Jan-06 18:47 
QuestionHow to define a global object Pin
xyhan23-Jan-06 11:29
xyhan23-Jan-06 11:29 
AnswerRe: How to define a global object Pin
Stephen Hewitt23-Jan-06 11:35
Stephen Hewitt23-Jan-06 11:35 
GeneralRe: How to define a global object Pin
xyhan23-Jan-06 11:49
xyhan23-Jan-06 11:49 
AnswerRe: How to define a global object Pin
Blake Miller23-Jan-06 12:22
Blake Miller23-Jan-06 12:22 
Another approach, and one I favor over the 'global object' is to declare the instance of the object in one place, as a static.

Then write a function that returns the address of the 'globally accessible' object.

Look at how the CWinApp is defined and implemented in MFC for a decent example. You call a fucntion AfxGetApp to obtain the pointer to the object, rather than accessing the object by name directly.



People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
Question.NET's "function collapse" feature for VC6? Pin
__yb23-Jan-06 11:07
__yb23-Jan-06 11:07 
AnswerRe: .NET's "function collapse" feature for VC6? Pin
Owner drawn23-Jan-06 16:46
Owner drawn23-Jan-06 16:46 
QuestionShare data between objects. Pin
xyhan23-Jan-06 11:05
xyhan23-Jan-06 11:05 
AnswerRe: Share data between objects. Pin
__yb23-Jan-06 11:08
__yb23-Jan-06 11:08 
GeneralRe: Share data between objects. Pin
xyhan23-Jan-06 11:18
xyhan23-Jan-06 11:18 
GeneralRe: Share data between objects. Pin
Stephen Hewitt23-Jan-06 12:22
Stephen Hewitt23-Jan-06 12:22 
GeneralRe: Share data between objects. Pin
Blake Miller23-Jan-06 12:25
Blake Miller23-Jan-06 12:25 
GeneralRe: Share data between objects. Pin
Stephen Hewitt23-Jan-06 12:30
Stephen Hewitt23-Jan-06 12:30 
GeneralRe: Share data between objects. Pin
Blake Miller23-Jan-06 12:56
Blake Miller23-Jan-06 12:56 

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.