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

C / C++ / MFC

 
AnswerRe: ON Network module Pin
Hamid_RT5-Feb-07 7:42
Hamid_RT5-Feb-07 7:42 
QuestionMFC STATUS BAR PROBLEM Pin
T.RATHA KRISHNAN4-Feb-07 23:44
T.RATHA KRISHNAN4-Feb-07 23:44 
AnswerRe: MFC STATUS BAR PROBLEM Pin
kasturi_haribabu5-Feb-07 0:04
kasturi_haribabu5-Feb-07 0:04 
GeneralRe: MFC STATUS BAR PROBLEM Pin
T.RATHA KRISHNAN5-Feb-07 0:20
T.RATHA KRISHNAN5-Feb-07 0:20 
AnswerRe: MFC STATUS BAR PROBLEM Pin
#realJSOP5-Feb-07 0:07
mve#realJSOP5-Feb-07 0:07 
AnswerRe: MFC STATUS BAR PROBLEM Pin
#realJSOP5-Feb-07 0:29
mve#realJSOP5-Feb-07 0:29 
GeneralMFC STATUS BAR PROBLEM ADDITIONAL Pin
T.RATHA KRISHNAN5-Feb-07 1:10
T.RATHA KRISHNAN5-Feb-07 1:10 
GeneralRe: MFC STATUS BAR PROBLEM ADDITIONAL Pin
#realJSOP5-Feb-07 1:40
mve#realJSOP5-Feb-07 1:40 
Well, I wouldn't change the statusbar until AFTER the user clicks OK, but that's just me. However...

1) In your dialog box, you would have to handle the EN_CHANGE message for the edit control. Every time the user types a character you have to calculate the new width of the string in pixels.

2) I would send a message to the parent view that contained a pointer to the string, and let the parent view do the width calculations. This message would probably be one you have to define (WM_APP+n) and manually add a handler for in your view.

3) When the view gets the message, it gets the string from the passed-in pointer value and creates a CPaintDC object. This dc object can then provide the width of the string via the GetTextExtent() function. This new width would be passed to the status bar for the appropriate pane, and the text would be applied to that pane.


If you decide to handle the status bar update after the user clicks the OK button in your dialog box, you can skip steps 1 and 2, and just retrieve the string from the dialog box itself, and do step 3.

I assume you're a programmer (and you obviously have access to the internet, so you can look stuff up on your own), so I leave it to you to work out the specifics.




"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


QuestionRe: MFC STATUS BAR PROBLEM ADDITIONAL [modified] Pin
T.RATHA KRISHNAN5-Feb-07 17:40
T.RATHA KRISHNAN5-Feb-07 17:40 
AnswerRe: MFC STATUS BAR PROBLEM ADDITIONAL Pin
#realJSOP5-Feb-07 23:13
mve#realJSOP5-Feb-07 23:13 
QuestionRe: MFC STATUS BAR PROBLEM ADDITIONAL [modified] Pin
T.RATHA KRISHNAN6-Feb-07 1:42
T.RATHA KRISHNAN6-Feb-07 1:42 
QuestionPlease help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
XTr1NiTy4-Feb-07 23:17
XTr1NiTy4-Feb-07 23:17 
AnswerRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
kasturi_haribabu4-Feb-07 23:44
kasturi_haribabu4-Feb-07 23:44 
AnswerRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
#realJSOP4-Feb-07 23:47
mve#realJSOP4-Feb-07 23:47 
GeneralRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
XTr1NiTy5-Feb-07 0:16
XTr1NiTy5-Feb-07 0:16 
QuestionRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) [modified] Pin
XTr1NiTy5-Feb-07 0:02
XTr1NiTy5-Feb-07 0:02 
AnswerRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
#realJSOP5-Feb-07 0:24
mve#realJSOP5-Feb-07 0:24 
QuestionRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
XTr1NiTy5-Feb-07 0:43
XTr1NiTy5-Feb-07 0:43 
AnswerRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
#realJSOP5-Feb-07 1:47
mve#realJSOP5-Feb-07 1:47 
QuestionRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
XTr1NiTy5-Feb-07 1:19
XTr1NiTy5-Feb-07 1:19 
AnswerRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
#realJSOP5-Feb-07 1:50
mve#realJSOP5-Feb-07 1:50 
GeneralRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
XTr1NiTy5-Feb-07 2:06
XTr1NiTy5-Feb-07 2:06 
GeneralRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
#realJSOP5-Feb-07 2:25
mve#realJSOP5-Feb-07 2:25 
JokeRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
XTr1NiTy5-Feb-07 2:47
XTr1NiTy5-Feb-07 2:47 
AnswerRe: Please help, SendMesssage not working in MFC Dialog Application, (with wizard) Pin
David Crow5-Feb-07 3:09
David Crow5-Feb-07 3:09 

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.