Click here to Skip to main content
15,906,558 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Status Pane Pin
prasad_som11-Feb-07 17:54
prasad_som11-Feb-07 17:54 
AnswerRe: Status Pane Pin
T.RATHA KRISHNAN11-Feb-07 18:12
T.RATHA KRISHNAN11-Feb-07 18:12 
QuestionRe: Status Pane Pin
prasad_som11-Feb-07 18:16
prasad_som11-Feb-07 18:16 
AnswerRe: Status Pane Pin
T.RATHA KRISHNAN11-Feb-07 18:23
T.RATHA KRISHNAN11-Feb-07 18:23 
AnswerRe: Status Pane Pin
prasad_som11-Feb-07 18:28
prasad_som11-Feb-07 18:28 
QuestionRe: Status Pane [modified] Pin
T.RATHA KRISHNAN11-Feb-07 19:10
T.RATHA KRISHNAN11-Feb-07 19:10 
QuestionRe: Status Pane Pin
prasad_som11-Feb-07 19:30
prasad_som11-Feb-07 19:30 
AnswerRe: Status Pane Pin
T.RATHA KRISHNAN11-Feb-07 20:23
T.RATHA KRISHNAN11-Feb-07 20:23 
Yes, There are two status bar panes. I've called SetPaneInfo function after creating the Status Bar only. The code for displaying message in the status bar pane is,

void CPerspectiveDoc::OnShowMsg(CCmdUI* pCmdUI)
{
char str1[150];
//int len = message.GetLength();
sprintf(str1, "%s",message.GetString());
CDC* pDC = m_wndStatusBar.GetDC();
pDC->SetTextAlign(TA_RIGHT);
pCmdUI->Enable(TRUE);
//m_wndStatusBar.SetPaneInfo(1,IDS_MESSAGE,SBPS_NORMAL,100);
pCmdUI->SetText((const char *)str1);
//m_wndStatusBar.SetPaneInfo(1, IDS_MESSAGE, SBPS_STRETCH, len);
}

Here this line,
CDC* pDC = m_wndStatusBar.GetDC();
compiles without any problem.

This line also,
pDC->SetTextAlign(TA_RIGHT);
compiles without problem. But not displaying message right aligned.

If I remove commenting from this line,
//m_wndStatusBar.SetPaneInfo(1,IDS_MESSAGE,SBPS_NORMAL,100);
then only that exception occurs.


QuestionRe: Status Pane Pin
prasad_som11-Feb-07 21:22
prasad_som11-Feb-07 21:22 
AnswerRe: Status Pane Pin
T.RATHA KRISHNAN11-Feb-07 21:45
T.RATHA KRISHNAN11-Feb-07 21:45 
GeneralRe: Status Pane Pin
prasad_som11-Feb-07 21:57
prasad_som11-Feb-07 21:57 
GeneralRe: Status Pane Pin
T.RATHA KRISHNAN11-Feb-07 23:08
T.RATHA KRISHNAN11-Feb-07 23:08 
GeneralRe: Status Pane Pin
David Crow12-Feb-07 2:48
David Crow12-Feb-07 2:48 
GeneralRe: Status Pane Pin
kasturi_haribabu11-Feb-07 22:02
kasturi_haribabu11-Feb-07 22:02 
QuestionRe: Status Pane Pin
David Crow12-Feb-07 2:47
David Crow12-Feb-07 2:47 
GeneralRe: Status Pane Pin
kasturi_haribabu11-Feb-07 21:57
kasturi_haribabu11-Feb-07 21:57 
GeneralRe: Status Pane Pin
T.RATHA KRISHNAN11-Feb-07 22:37
T.RATHA KRISHNAN11-Feb-07 22:37 
AnswerRe: Status Pane Pin
Hamid_RT11-Feb-07 19:42
Hamid_RT11-Feb-07 19:42 
QuestionRe: Status Pane Pin
David Crow12-Feb-07 2:45
David Crow12-Feb-07 2:45 
Questionconsole application TCP client in C++ [modified] Pin
wizard 20211-Feb-07 16:48
wizard 20211-Feb-07 16:48 
Questionopengl and color filter Pin
zqueezy11-Feb-07 11:45
zqueezy11-Feb-07 11:45 
AnswerRe: opengl and color filter Pin
cmk11-Feb-07 12:20
cmk11-Feb-07 12:20 
QuestionCListCtrl Selection problem Pin
Zombie_Inc11-Feb-07 9:44
Zombie_Inc11-Feb-07 9:44 
AnswerRe: CListCtrl Selection problem Pin
Mark Salsbery11-Feb-07 11:19
Mark Salsbery11-Feb-07 11:19 
GeneralRe: CListCtrl Selection problem Pin
Zombie_Inc11-Feb-07 11:32
Zombie_Inc11-Feb-07 11:32 

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.