From: DanB on

I have a property sheet with three pages. It is old, been around for
many years.

Out of the clear blue sky the second page's OnInitDialog does not get
called when the tab is pressed and the tab disappears. The first and
third tab continue to work properly.

All I did was add a checkbox and bound a bool variable to it. Simple
wizard stuff.

I've traced and checked and some google, but I'm still baffled. Has
anyone seen anything like this?

Note, I had upgraded my app to VC 9.0 from 7.1 just a month ago. But
there was no problem with this tab until tonight that I know of. My wife
has been to that page frequently since the change to take pictures for
the docs. She told me so! :)

Thanks, Dan.

From: David Lowndes on
>I have a property sheet with three pages. It is old, been around for
>many years.
>
>Out of the clear blue sky the second page's OnInitDialog does not get
>called when the tab is pressed and the tab disappears. The first and
>third tab continue to work properly.
>
>All I did was add a checkbox and bound a bool variable to it. Simple
>wizard stuff.

Dan,

If you remove that - does it then work correctly again?

Dave
From: Goran on
On Apr 22, 4:47 am, DanB <a...(a)some.net> wrote:
> I have a property sheet with three pages. It is old, been around for
> many years.
>
> Out of the clear blue sky the second page's OnInitDialog does not get
> called when the tab is pressed and the tab disappears. The first and
> third tab continue to work properly.
>
> All I did was add a checkbox and bound a bool variable to it. Simple
> wizard stuff.

Could it be that dialog control's ID in DDX_Whatever isn't the one you
have in resource.h?

Goran.
From: Joseph M. Newcomer on
Try setting the "ignore creation errors" flag in the dialog properties--I forget its exact
name--and see if the dialog comes up. If a control is missing, that's your culprit
joe

On Wed, 21 Apr 2010 19:47:37 -0700, DanB <abc(a)some.net> wrote:

>
>I have a property sheet with three pages. It is old, been around for
>many years.
>
>Out of the clear blue sky the second page's OnInitDialog does not get
>called when the tab is pressed and the tab disappears. The first and
>third tab continue to work properly.
>
>All I did was add a checkbox and bound a bool variable to it. Simple
>wizard stuff.
>
>I've traced and checked and some google, but I'm still baffled. Has
>anyone seen anything like this?
>
>Note, I had upgraded my app to VC 9.0 from 7.1 just a month ago. But
>there was no problem with this tab until tonight that I know of. My wife
>has been to that page frequently since the change to take pictures for
>the docs. She told me so! :)
>
>Thanks, Dan.
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: DanB on
David Lowndes wrote:
>> I have a property sheet with three pages. It is old, been around for
>> many years.
>>
>> Out of the clear blue sky the second page's OnInitDialog does not get
>> called when the tab is pressed and the tab disappears. The first and
>> third tab continue to work properly.
>>
>> All I did was add a checkbox and bound a bool variable to it. Simple
>> wizard stuff.
>
> Dan,
>
> If you remove that - does it then work correctly again?

Hi Dave,
No. And I have also commented the DDX_Check that got left behind.

Gordon:
Could it be that dialog control's ID in DDX_Whatever isn't the one you
have in resource.h?

I've gone through the numbers from resource.h to ars.rc, they all look
good. There is no overlap of the number with anything else in the sheet
page. The 'title' does show on the tab when the sheet comes up so it is
the right resource.

Joe:
Try setting the "ignore creation errors" flag in the dialog
properties--I forget its exact
name--and see if the dialog comes up. If a control is missing, that's
your culprit

Thanks, but same symptom. And now I've gone so far as to comment most of
the code. I've changed the tab order and it remains that tab.

So I started editing the rc. If I un comment ether of these lines, it
causes the trouble:

CONTROL "",IDC_RTPO_FOOTER,"RichEdit20A",ES_MULTILINE |
ES_READONLY | WS_TABSTOP,5,78,285,30,WS_EX_STATICEDGE

CONTROL "",IDC_RTPO_COVER,"RichEdit20A",ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_VSCROLL |
WS_TABSTOP,5,139,285,73,WS_EX_STATICEDGE


But these controls have been there for many years. And my wife swears
this page was fine after 9.0. I have to go with what she says as I had
not gone to the page until I added the check box.

Now it gets stranger. So I tried to bring up my 'About' box and it won't
come up now. It did just a couple of days ago, I know that for sure. It
has a:

CONTROL "",IDC_COPYRIGHT,"RichEdit20A",ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_VSCROLL |
WS_TABSTOP,8,102,347,88,WS_EX_STATICEDGE

Next dialog with a rich control, this one works!?:

CONTROL "",IDC_RICHEDIT21,"RichEdit20A",ES_MULTILINE |
ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_BORDER | WS_VSCROLL |
WS_TABSTOP,7,7,263,104

So I removed the static edge and added a border to the copyright control
so as to match the good one, it still doesn't work. I have to comment
the rc to get the 'about' dialog to come up just like the property page.

The only other thing I did in the recent past was to remove 7.1 from my
machine. But to keep in mind that my wife patched up on her machine the
problem follows the software. There is no Visual Studio on her machine.

(Why do the weird ones show up every time there is a dead line?)

///time///time///

Found it! So if I bring up any of my 'Views' that use rich text all
these dialogs start working. That is because I make sure msftedit.dll is
loaded, (if available, and it is back to xp sp2 now). It was a very long
time ago I took out the load in the app init, it was when I started
using RichEdit50W2. And it just didn't show as I have a lot of rich
views and the dll gets load early most of the time.

Thanks for the comments and letting me ramble on. It really helped to
solve the problem.
Best, Dan.

 |  Next  |  Last
Pages: 1 2
Prev: Control color skin
Next: MFC Static vs Dynamic Link