Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: disable parent window Pin
Nishad S21-Nov-05 19:59
Nishad S21-Nov-05 19:59 
AnswerRe: disable parent window Pin
Owner drawn21-Nov-05 19:31
Owner drawn21-Nov-05 19:31 
GeneralRe: disable parent window Pin
Nishad S21-Nov-05 19:40
Nishad S21-Nov-05 19:40 
QuestionHow to change CEdit's background color and text color? thanks. Pin
LeeeNN21-Nov-05 17:18
LeeeNN21-Nov-05 17:18 
AnswerRe: How to change CEdit's background color and text color? thanks. Pin
Owner drawn21-Nov-05 19:33
Owner drawn21-Nov-05 19:33 
QuestionHow to display value immediatle to status bar by SenMessage() Pin
quangpk21-Nov-05 16:17
quangpk21-Nov-05 16:17 
AnswerRe: How to display value immediatle to status bar by SenMessage() Pin
Christian Graus21-Nov-05 16:35
protectorChristian Graus21-Nov-05 16:35 
AnswerRe: How to display value immediatle to status bar by SenMessage() Pin
khan++21-Nov-05 19:46
khan++21-Nov-05 19:46 
I would assume you are using MFC.
If you are doing the processing inside CMainFrame, then you could simply use:
m_wndStatusBar.SetPaneText(Pane_No, "New Text");
If you are using the View, then use a user-defined message to send to CMainFrame. You can use resource.h and define your message id:
#define WM_MY_SETTEXT 3020
And include resource.h in mainframe.

From the View, send the message away:
AfxGetApp()->GetMainWnd()->SendMessage(WM_MY_SETTEXT,0,(LPARAM)"Hello old man");

In mainframe.h, declare your own message handler:
LRESULT OnMyMessage(WPARAM, LPARAM);
In mainframe.cpp, include your function in the message-map macro:
...<br />
ON_MESSAGE(WM_MY_SETTEXT,OnMyMessage)<br />
END_MESSAGE_MAP()


Then later in mainframe.cpp, implement it:
LRESULT CMainFrame::OnMyMessage(WPARAM, LPARAM lParam)<br />
{<br />
TCHAR* pS = (TCHAR*)lParam;<br />
TCHAR ss[200];<br />
strcpy(ss,pS);<br />
m_wndStatusBar.SetPaneText(0,ss);<br />
return 0;<br />
}



this is this.
AnswerRe: How to display value immediatle to status bar by SenMessage() Pin
Owner drawn21-Nov-05 19:57
Owner drawn21-Nov-05 19:57 
QuestionBoost with VC8 Pin
Ed K21-Nov-05 16:11
Ed K21-Nov-05 16:11 
QuestionCScrollBar: what's the secret? Pin
Jamaica21-Nov-05 15:15
Jamaica21-Nov-05 15:15 
AnswerAnd moreover... Pin
Jamaica21-Nov-05 15:21
Jamaica21-Nov-05 15:21 
AnswerRe: CScrollBar: what's the secret? Pin
Christian Graus21-Nov-05 16:37
protectorChristian Graus21-Nov-05 16:37 
GeneralRe: CScrollBar: what's the secret? Pin
Jamaica21-Nov-05 16:53
Jamaica21-Nov-05 16:53 
GeneralRe: CScrollBar: what's the secret? Pin
Christian Graus21-Nov-05 16:59
protectorChristian Graus21-Nov-05 16:59 
QuestionTesting for empty C-Style string... Pin
Blake Miller21-Nov-05 11:32
Blake Miller21-Nov-05 11:32 
AnswerRe: Testing for empty C-Style string... Pin
PJ Arends21-Nov-05 12:11
professionalPJ Arends21-Nov-05 12:11 
GeneralRe: Testing for empty C-Style string... Pin
Blake Miller22-Nov-05 4:25
Blake Miller22-Nov-05 4:25 
AnswerRe: Testing for empty C-Style string... Pin
toxcct21-Nov-05 22:22
toxcct21-Nov-05 22:22 
AnswerRe: Testing for empty C-Style string... Pin
Owner drawn22-Nov-05 1:11
Owner drawn22-Nov-05 1:11 
AnswerRe: Testing for empty C-Style string... Pin
wboncal22-Nov-05 7:59
wboncal22-Nov-05 7:59 
QuestionHow to print content of a CRichEditCtrl to a Rect Pin
AnTri21-Nov-05 9:43
AnTri21-Nov-05 9:43 
AnswerRe: How to print content of a CRichEditCtrl to a Rect Pin
Aamir Butt21-Nov-05 21:21
Aamir Butt21-Nov-05 21:21 
QuestionCheck box next to selected menu items Pin
NYTSX21-Nov-05 9:05
NYTSX21-Nov-05 9:05 
AnswerRe: Check box next to selected menu items Pin
Maximilien21-Nov-05 9:24
Maximilien21-Nov-05 9:24 

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.