Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

"Property read-only" warning appears when program starts

I'm receiving a "Property is read-only" warning message when my program starts executing. The main screen that appears when the program start uses ComponentWorks++ button, numeric edit, and graph controls only. What control does this warning refer to?

I'm running Visual C++ 6.0, Measurement Studio 1.0.1 and Windows 2000.

Thank you.
0 Kudos
Message 1 of 4
(3,535 Views)
Hello ldo,
This warning is most likely the result of trying to set a ComponentWorks++ property that is read only. I would recommend setting a breakpoint near the beginning of your application and single stepping through your code until you locate the line that causes the warning. If you have many lines of code, then you may want to put several breakpoints in your code and jump from breakpoint to breakpoint to isolate the section in which the warning occurs. When you find the property, look it up in the ComponentWorks++ Reference and it should explain how that property is determined (possibly by calling another method or setting another property).

Jeremiah Cox
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 4
(3,535 Views)
The problem has become more serious. First, the debugger generates the "Property is read-only" warning message when the "GetParentFrame()->RecalcLayout();" line is executed in the void CTargetView::OnInitialUpdate() function. See code below.

Further, when accessing the variables inserted by the ClassWizard for the Numeric Edit control, such as the "Control" variable associated with the Numeric Edit box, the program generates an exception breakpoint in WINOCC.CPP, line 360, in the void CWnd::GetProperty() function
ASSERT(m_pCtrlSite!=NULL). Is this a bug?

Thank you for any help you can provide.

void CTargetView::OnInitialUpdate() {
CFormView::OnInitialUpdate();
GetParentFrame()->RecalcLayout();
ResizeParentToFit();
}
0 Kudos
Message 3 of 4
(3,535 Views)
To anyone interested,
Ido reposted this question as "accessing numberic edit variable causes ASSERT error" which should be found at the following link: "accessing numberic edit variable causes ASSERT error"
0 Kudos
Message 4 of 4
(3,535 Views)