Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWhat is your intention Pin
Rama Krishna Vavilala30-Jun-02 10:14
Rama Krishna Vavilala30-Jun-02 10:14 
General:-P Pin
Shog930-Jun-02 10:14
sitebuilderShog930-Jun-02 10:14 
GeneralRe: :-P Pin
Rama Krishna Vavilala30-Jun-02 10:18
Rama Krishna Vavilala30-Jun-02 10:18 
GeneralRe: :-P Pin
Shog930-Jun-02 10:20
sitebuilderShog930-Jun-02 10:20 
Generaldumb eh? Pin
Nish Nishant30-Jun-02 17:24
sitebuilderNish Nishant30-Jun-02 17:24 
GeneralRe: dumb eh? Pin
Rama Krishna Vavilala30-Jun-02 17:39
Rama Krishna Vavilala30-Jun-02 17:39 
Questioncan someone help me with process creation? Pin
Edd30-Jun-02 9:34
Edd30-Jun-02 9:34 
QuestionBeginner question: How do I put the open file name in the status bar? Pin
John Soares30-Jun-02 8:44
John Soares30-Jun-02 8:44 
Here is what I have so far in the ChildFrm.cpp file(this is an MDI program).

int CChildFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMDIChildWnd::OnCreate(lpCreateStruct) == -1)
return -1;

// TODO: Add your specialized creation code here

//create the status bar

m_StatusBar.Create(this);
m_StatusBar2.Create(this);

//width of text we want to display

CRect textRect;
CRect textRect2;
CClientDC aDC(&m_StatusBar);
CClientDC aDC2(&m_StatusBar2);

aDC.SelectObject(m_StatusBar.GetFont());
aDC.SelectObject(m_StatusBar2.GetFont());


aDC2.DrawText("Line #: ", -1, textRect2, DT_CALCRECT);
aDC.DrawText("File: ", -1, textRect, DT_CALCRECT);

//set up status bar big enough to take the text

int width = textRect.Width();
m_StatusBar.GetStatusBarCtrl().SetParts(1, &width);

int width2 = textRect2.Width();
m_StatusBar2.GetStatusBarCtrl().SetParts(1, &width2);

//Initialize the text for the status bar

m_StatusBar2.GetStatusBarCtrl().SetText("Line #: ",0,0);
m_StatusBar.GetStatusBarCtrl().SetText("File: ", 0,0);

return 0;
}

I need to display the open file name in the status bar. Right now, I get:

Line #:
File:

Is there a command for this? I haven't found one.

Thanks for any hints.

Best,



John Soares
support@onlinescamreports.com
AnswerRe: Beginner question: How do I put the open file name in the status bar? Pin
Chris Maunder30-Jun-02 19:55
cofounderChris Maunder30-Jun-02 19:55 
GeneralScreen Saver Multi-Monitors Pin
Jon Newman30-Jun-02 7:27
Jon Newman30-Jun-02 7:27 
GeneralRe: Screen Saver Multi-Monitors Pin
Christian Graus30-Jun-02 10:58
protectorChristian Graus30-Jun-02 10:58 
GeneralRe: Screen Saver Multi-Monitors Pin
Jon Newman30-Jun-02 11:03
Jon Newman30-Jun-02 11:03 
GeneralRe: Screen Saver Multi-Monitors Pin
Christian Graus30-Jun-02 11:08
protectorChristian Graus30-Jun-02 11:08 
GeneralRe: Screen Saver Multi-Monitors Pin
Michael Dunn30-Jun-02 11:14
sitebuilderMichael Dunn30-Jun-02 11:14 
GeneralHelp with Help Files Pin
Raskolnikov30-Jun-02 5:46
Raskolnikov30-Jun-02 5:46 
GeneralRe: Help with Help Files Pin
Ernest Laurentin30-Jun-02 8:44
Ernest Laurentin30-Jun-02 8:44 
GeneralRe: Help with Help Files Pin
Raskolnikov30-Jun-02 10:44
Raskolnikov30-Jun-02 10:44 
Questionhow draw use scretchblt Pin
Alexey Kourakolov30-Jun-02 4:53
Alexey Kourakolov30-Jun-02 4:53 
AnswerRe: how draw use scretchblt Pin
Mike Nordell30-Jun-02 5:44
Mike Nordell30-Jun-02 5:44 
AnswerRe: how draw use scretchblt Pin
Christian Graus30-Jun-02 11:00
protectorChristian Graus30-Jun-02 11:00 
GeneralRe: how draw use scretchblt Pin
Shog930-Jun-02 12:24
sitebuilderShog930-Jun-02 12:24 
GeneralRe: how draw use scretchblt Pin
Christian Graus30-Jun-02 12:51
protectorChristian Graus30-Jun-02 12:51 
GeneralStrange mutex Pin
Hans Ruck30-Jun-02 4:37
Hans Ruck30-Jun-02 4:37 
GeneralRe: Strange mutex Pin
Mike Nordell30-Jun-02 5:19
Mike Nordell30-Jun-02 5:19 
GeneralRe: Strange mutex Pin
Hans Ruck30-Jun-02 5:40
Hans Ruck30-Jun-02 5:40 

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.