Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralVrml Pin
Micealgleeson16-Feb-05 9:35
Micealgleeson16-Feb-05 9:35 
GeneralPuzzling Runtime Error Pin
LighthouseJ16-Feb-05 9:06
LighthouseJ16-Feb-05 9:06 
GeneralRe: Puzzling Runtime Error Pin
Bob Ciora16-Feb-05 10:31
Bob Ciora16-Feb-05 10:31 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ16-Feb-05 10:46
LighthouseJ16-Feb-05 10:46 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ16-Feb-05 11:17
LighthouseJ16-Feb-05 11:17 
GeneralRe: Puzzling Runtime Error Pin
Steve Mayfield16-Feb-05 13:47
Steve Mayfield16-Feb-05 13:47 
GeneralRe: Puzzling Runtime Error Pin
Bob Ciora16-Feb-05 14:03
Bob Ciora16-Feb-05 14:03 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ16-Feb-05 14:26
LighthouseJ16-Feb-05 14:26 
Thanks Steve and Bob,

This program was originally written from scratch mainly to immerse myself in Windows programming. After reaching a plateau of understanding and realizing the app code is filled with failed attempts at doing things that don't need to be done, I started a new project, using the AppWizard and simply fill in the routines from my old code.

I had a feeling the problem is because of the toolbar because that's what I changed immediately before this recent error cropped up, but I don't see how to fix it without reverting my changes. Here's the code for my status bar now:
<br />
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) {<br />
... (creates view window and toolbar here) ...<br />
if (!m_wndStatusBar.Create(this) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) {<br />
  TRACE0("Failed to create status bar\n");<br />
  return -1;      // fail to create<br />
} else {<br />
int i;<br />
m_wndStatusBar.SetPaneInfo(0, ID_INDICATOR_INFOLINE, SBPS_STRETCH, 80);<br />
m_wndStatusBar.SetPaneInfo(1, ID_INDICATOR_WORKING, SBPS_NORMAL, 150);<br />
m_wndStatusBar.SetPaneInfo(2, ID_INDICATOR_COMMSETTINGS, SBPS_NORMAL, 125);<br />
m_wndStatusBar.SetPaneInfo(3, ID_INDICATOR_USIZE, SBPS_NORMAL, 125);<br />
m_wndStatusBar.SetPaneInfo(4, ID_INDICATOR_SENTLENGTH, SBPS_NORMAL, 90);<br />
m_wndStatusBar.SetPaneInfo(5, ID_INDICATOR_RECVLENGTH, SBPS_NORMAL, 120);<br />
m_wndStatusBar.SetPaneInfo(6, ID_INDICATOR_CSIZE, SBPS_NORMAL, 140);<br />
<br />
m_wndStatusBar.SetPaneText(0, "No File Loaded", true);<br />
for (i=1; i<6; i++) { m_wndStatusBar.SetPaneText(i, "", true); }<br />
... (sets toolbar style here) ...<br />
return 0;<br />
}<br />

The COMMSETTINGS toolbar segment is the one I added. CMainFrame is derived from CFrameWnd.
GeneralRe: Puzzling Runtime Error Pin
Steve Mayfield16-Feb-05 14:52
Steve Mayfield16-Feb-05 14:52 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ16-Feb-05 15:04
LighthouseJ16-Feb-05 15:04 
GeneralRe: Puzzling Runtime Error Pin
Bob Ciora17-Feb-05 0:56
Bob Ciora17-Feb-05 0:56 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ17-Feb-05 4:01
LighthouseJ17-Feb-05 4:01 
GeneralRe: Puzzling Runtime Error Pin
Bob Ciora17-Feb-05 6:14
Bob Ciora17-Feb-05 6:14 
GeneralRe: Puzzling Runtime Error Pin
Bob Ciora17-Feb-05 6:29
Bob Ciora17-Feb-05 6:29 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ17-Feb-05 8:34
LighthouseJ17-Feb-05 8:34 
GeneralRe: Puzzling Runtime Error Pin
Bob Ciora18-Feb-05 2:35
Bob Ciora18-Feb-05 2:35 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ18-Feb-05 5:08
LighthouseJ18-Feb-05 5:08 
GeneralRe: Puzzling Runtime Error Pin
Ryan Binns16-Feb-05 17:45
Ryan Binns16-Feb-05 17:45 
GeneralRe: Puzzling Runtime Error Pin
LighthouseJ16-Feb-05 18:34
LighthouseJ16-Feb-05 18:34 
Questionhow to plot graph? Pin
gaurangjanodia16-Feb-05 8:17
gaurangjanodia16-Feb-05 8:17 
AnswerRe: how to plot graph? Pin
rocky_pulley16-Feb-05 8:22
rocky_pulley16-Feb-05 8:22 
AnswerRe: how to plot graph? Pin
Andrew Walker16-Feb-05 11:56
Andrew Walker16-Feb-05 11:56 
Questionsave options using registry or file? Pin
Mohammad Tarik16-Feb-05 8:17
Mohammad Tarik16-Feb-05 8:17 
AnswerRe: save options using registry or file? Pin
rocky_pulley16-Feb-05 8:26
rocky_pulley16-Feb-05 8:26 
AnswerRe: save options using registry or file? Pin
Ravi Bhavnani16-Feb-05 9:23
professionalRavi Bhavnani16-Feb-05 9:23 

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.