I saw the comments about static, looked up and read about static, but evidently did not understand it fully. On the other hand, it is still a constant and there was nothing about how static is initialized before the constructor.
Using the static constants does work.
Tried the enum version and it does work.
It still strikes me as strange that a declared constant is not valid until after the constructor has been run.
Ran a few more tests. The non-static declarations were activated along with this modification:
dialog_base::dialog_base(const wxString& title)
: wxFrame(
NULL, // parent
wxID_ANY, // identifier
title, // title
wxPoint( 10, 10 ), // position
// wxSize( 635, 400 ) // this works as expected
wxSize(c_initial_width, c_initial_height) // causes panel size to be about 60 x 30
)
{
int x = c_initial_width; // check these with the debugger
int y = c_initial_height; …}
The dialog was open in the minimized state. A break point was added just after those lines, run it again, and variable x and y had the correct value. This is within the constructor for my object. I presume they are initialized within the wxFrame constructor. But, evidently again, the wxFrame constructor had already passed a critical point and the constants were not available.
This continues to strike be as bad behavior.
Regardless, that is the way it works and I will adapt.
Thank you for your time and patience.
Edit: I do not see anything that looks like a button to accept the above answer. The only rating is below my response and not below the reply. Having added this caveat, I will rate this as good.
Edit again: After doing the above, the first reply is no longer visible to me. That is strange.