Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problem with COleDateTime Pin
Cedric Moonen24-Mar-04 21:48
Cedric Moonen24-Mar-04 21:48 
GeneralRe: Problem with COleDateTime Pin
David Crow25-Mar-04 2:41
David Crow25-Mar-04 2:41 
GeneralEnums Pin
monrobot1324-Mar-04 21:22
monrobot1324-Mar-04 21:22 
GeneralRe: Enums Pin
Anonymous24-Mar-04 21:32
Anonymous24-Mar-04 21:32 
GeneralRe: Enums Pin
Maxwell Chen24-Mar-04 21:52
Maxwell Chen24-Mar-04 21:52 
GeneralRe: Enums Pin
David Crow25-Mar-04 2:48
David Crow25-Mar-04 2:48 
GeneralRe: Enums Pin
monrobot1325-Mar-04 18:33
monrobot1325-Mar-04 18:33 
Generalimproving a hack Pin
axid3j1al24-Mar-04 20:25
axid3j1al24-Mar-04 20:25 
Hi,


[1]

I have a 3 way splitter which mimics the visual studio IDE.

I have augmented a debugging class (thanks ravi) and am using a CFormView for the bottom
debug window. Which is subclassed (The FormView has an edit control on it) so that debug messages are routed to it.

I have a global function dbg(char *s,...) in my main CWinApp override which finds the dbg class which is buried in the splitter and outputs info to that debug window.

However now I want to call it from anywhere in my src.

What I have done is declared it as

extern void dgb(char *s,...) in the .cpp CWinApp override.

Then to call it from anywhere I declare

extern void dgb(char *s,...)

in stdafx.h.

Then in my code I call

Dbg("test");

and it will call mydebugclass->print("test");


While this works and mimics the beahvior of the VS IDE how would I do this in a less hacky windows MFC fashion?

[2]

For each function in my debug class I have to add an extern for each function in there.
How do I avoid this? For example I may want to turn on my timing trace writes, or turn on
message box alerts where I have them defined etc.

[3]

How Do I pass in the current windows message so in my output I can mimic the MFC tracer?

I am trying to get configurable output e.g.

12:23:0023 CMyDerivedClass::OnInit() "my trace write" "Win32 Err = 0xFF"

and then I should be able to choose on the fly what trace inofrmation I would like to display.



Regards,

axe


QuestionHow to popup the application-menu ? Pin
ohadp24-Mar-04 20:16
ohadp24-Mar-04 20:16 
GeneralError in calling DLL Pin
dafan24-Mar-04 19:14
dafan24-Mar-04 19:14 
GeneralRe: Error in calling DLL Pin
dafan25-Mar-04 2:41
dafan25-Mar-04 2:41 
GeneralA Loop...homework tips please! Pin
Joe Estes24-Mar-04 18:27
Joe Estes24-Mar-04 18:27 
GeneralRe: A Loop...homework tips please! Pin
Roger Wright24-Mar-04 19:54
professionalRoger Wright24-Mar-04 19:54 
GeneralRe: A Loop...homework tips please! Pin
Prakash Nadar24-Mar-04 20:16
Prakash Nadar24-Mar-04 20:16 
GeneralRe: A Loop...homework tips please! Pin
Roger Wright24-Mar-04 20:46
professionalRoger Wright24-Mar-04 20:46 
GeneralRe: A Loop...homework tips please! Pin
Prakash Nadar24-Mar-04 20:54
Prakash Nadar24-Mar-04 20:54 
GeneralRe: A Loop...homework tips please! Pin
Roger Wright24-Mar-04 21:00
professionalRoger Wright24-Mar-04 21:00 
GeneralRe: A Loop...homework tips please! Pin
peterzorbas24-Mar-04 21:40
peterzorbas24-Mar-04 21:40 
GeneralRe: A Loop...homework tips please! Pin
peterzorbas24-Mar-04 21:58
peterzorbas24-Mar-04 21:58 
GeneralRe: A Loop...homework tips please! Pin
peterzorbas24-Mar-04 21:57
peterzorbas24-Mar-04 21:57 
GeneralRe: A Loop...homework tips please! Pin
Paul Ranson25-Mar-04 2:35
Paul Ranson25-Mar-04 2:35 
GeneralRe: A Loop...homework tips please! Pin
Roger Wright25-Mar-04 5:55
professionalRoger Wright25-Mar-04 5:55 
GeneralRe: A Loop...homework tips please! Pin
Paul Ranson25-Mar-04 6:42
Paul Ranson25-Mar-04 6:42 
GeneralRe: A Loop...homework tips please! Pin
Roger Wright25-Mar-04 7:59
professionalRoger Wright25-Mar-04 7:59 
GeneralRe: A Loop...homework tips please! Pin
Maxwell Chen25-Mar-04 16:55
Maxwell Chen25-Mar-04 16: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.