Update Statusbar from a non-window class method.
-
I have written a class in a seperate file which I want access to the statusbar. How do I change the message in the statusbar from this class? I have included the "stdafx.h" in the class I defined. :confused:
If what you want is a value being displayed in the status bar (like coordiantes in a picture-editor), try this: You set a variable in your CDocument class. This variable is then displayed via a ON_COMMAND_UPDATE_UI-handler in either your main frame or your view.
-
If what you want is a value being displayed in the status bar (like coordiantes in a picture-editor), try this: You set a variable in your CDocument class. This variable is then displayed via a ON_COMMAND_UPDATE_UI-handler in either your main frame or your view.
Thanks for your reply, jhwurmbach! I think I have to repharase my question. I have written a class method which does all the screen output, but the output is onto the screen via "cout". Now, I am trying to rewrite this class such that I could output my message onto the statusbar in windows instead. I understand that "CView" is the one that handles the output in windows. I am trying to change my original DOS-output class to a windows-output class one. I hope u can understand what I am trying to say. U have any suggestion? :rolleyes:
-
Thanks for your reply, jhwurmbach! I think I have to repharase my question. I have written a class method which does all the screen output, but the output is onto the screen via "cout". Now, I am trying to rewrite this class such that I could output my message onto the statusbar in windows instead. I understand that "CView" is the one that handles the output in windows. I am trying to change my original DOS-output class to a windows-output class one. I hope u can understand what I am trying to say. U have any suggestion? :rolleyes:
You don't want to simplay have a 'logging' style output in a Window (for that, try searching the site), you want to show one output line in the status bar, right? Do we talk about the same 'StatusBar'-thing? I talk about he same bar that in IE contains the little globe and the 'Internet' text at the right bottom of the window. in the same bar, with SSE-connection, a little yellow lock shows up. So, probably it is really easiest to let your class-method set a variable in the dochument and show that variable via ON_UPDTE_COMMNAND_UI.
-
I have written a class in a seperate file which I want access to the statusbar. How do I change the message in the statusbar from this class? I have included the "stdafx.h" in the class I defined. :confused:
-