Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Windows class not created error? Pin
Mark Salsbery1-Dec-06 6:09
Mark Salsbery1-Dec-06 6:09 
Questionthe use of CreateNewDocument or ID_FILE_NEW Pin
prithaa30-Nov-06 7:57
prithaa30-Nov-06 7:57 
QuestionA Question about CreateFile [modified] Pin
Findekano30-Nov-06 5:03
Findekano30-Nov-06 5:03 
AnswerRe: A Question about CreateFile Pin
Mark Salsbery30-Nov-06 5:38
Mark Salsbery30-Nov-06 5:38 
GeneralRe: A Question about CreateFile Pin
Jay Zhu30-Nov-06 14:37
Jay Zhu30-Nov-06 14:37 
GeneralRe: A Question about CreateFile Pin
Mark Salsbery30-Nov-06 14:50
Mark Salsbery30-Nov-06 14:50 
GeneralRe: A Question about CreateFile Pin
Jay Zhu30-Nov-06 16:58
Jay Zhu30-Nov-06 16:58 
QuestionLimited string size in CStatusBarCtrl Pin
stupendous@mail.ru30-Nov-06 5:02
stupendous@mail.ru30-Nov-06 5:02 
Hi everyone.

Here is how I use CStatusBarCtrl in my dialog:

In OnInitDialog()

m_StatusBarCtrl.Create(WS_CHILD|WS_VISIBLE|CCS_BOTTOM|SBARS_SIZEGRIP,<br />
    CRect(0,0,0,0), this, IDC_STATUS_BAR);<br />
<br />
     int widths[1] = {-1};<br />
<br />
     m_StatusBarCtrl.SetParts(1, widths);<br />


In OnSize()

<br />
m_StatusBarCtrl.SendMessage( WM_SIZE, 0, 0 );<br />


And when I need to update status, I invoke:
<br />
void CMyDlg::UpdateStatusBar(const std::string& in_rsNewStatus)<br />
{<br />
  m_StatusBarCtrl.SetText(in_rsNewStatus.c_str(), 0, 0);<br />
 <br />
}


But if the string is long enough, it is cut even when current StatusBar's size is able to encapsulate it! What is strange, is that it is cut differently: I mean, that number of letters, that are shown and the length of shown string in pixels are not equal for different strings.

Has anybody come across the same?
AnswerRe: Limited string size in CStatusBarCtrl Pin
Mark Salsbery30-Nov-06 6:38
Mark Salsbery30-Nov-06 6:38 
AnswerRe: Limited string size in CStatusBarCtrl Pin
Steve Echols30-Nov-06 11:42
Steve Echols30-Nov-06 11:42 
QuestionHELP! HELP! How can I send SNMP packet & retrieve them Pin
ATC30-Nov-06 4:52
ATC30-Nov-06 4:52 
AnswerRe: HELP! HELP! How can I send SNMP packet & retrieve them Pin
Mark Salsbery30-Nov-06 5:51
Mark Salsbery30-Nov-06 5:51 
GeneralRe: HELP! HELP! How can I send SNMP packet &amp; retrieve them Pin
ATC30-Nov-06 6:10
ATC30-Nov-06 6:10 
GeneralRe: HELP! HELP! How can I send SNMP packet & retrieve them Pin
Mark Salsbery30-Nov-06 6:17
Mark Salsbery30-Nov-06 6:17 
GeneralRe: HELP! HELP! How can I send SNMP packet &amp; retrieve them Pin
ATC30-Nov-06 7:36
ATC30-Nov-06 7:36 
GeneralRe: HELP! HELP! How can I send SNMP packet &amp; retrieve them Pin
Mark Salsbery30-Nov-06 7:48
Mark Salsbery30-Nov-06 7:48 
GeneralRe: HELP! HELP! How can I send SNMP packet &amp; retrieve them Pin
ATC30-Nov-06 8:28
ATC30-Nov-06 8:28 
QuestionA better Sleep() function Pin
Johpoke30-Nov-06 4:23
Johpoke30-Nov-06 4:23 
QuestionRe: A better Sleep() function Pin
David Crow30-Nov-06 4:52
David Crow30-Nov-06 4:52 
AnswerRe: A better Sleep() function Pin
James R. Twine30-Nov-06 5:00
James R. Twine30-Nov-06 5:00 
GeneralRe: A better Sleep() function Pin
Johpoke30-Nov-06 5:09
Johpoke30-Nov-06 5:09 
GeneralRe: A better Sleep() function Pin
benjymous30-Nov-06 5:23
benjymous30-Nov-06 5:23 
GeneralRe: A better Sleep() function Pin
Johpoke30-Nov-06 5:57
Johpoke30-Nov-06 5:57 
GeneralRe: A better Sleep() function Pin
Waldermort30-Nov-06 6:18
Waldermort30-Nov-06 6:18 
GeneralRe: A better Sleep() function Pin
Mark Salsbery30-Nov-06 6:27
Mark Salsbery30-Nov-06 6:27 

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.