Page 2 of 2

Re: Buttons under a new window

Posted: Mon Jun 29, 2015 1:22 am
by Andy Edward
rdonnay wrote:I need to see your FORM_BOX command.

I think the issue may be the TEXTOBJ clause.

This may not be actually creating a proper pointer to the object, which would cause the buttons to be children of the dialog drawingArea rather than the FORM_BOX.

To insure that this is correct you can use the DC_ArrayView() function. It will show you the children of oText1Static.

Do this:

DCREAD GUI EVAL {||DC_ArrayView( oText1Static )}

This should show you the child list. You should see a lot of DC_XbpPushButtonXP() objects.
This is from the DC_ARRAYVIEW(oText1Static)
Untitled-1.gif
Untitled-1.gif (28.16 KiB) Viewed 6082 times
Should the buttons not be there?

Regards,

Andy

Re: Buttons under a new window

Posted: Mon Jun 29, 2015 6:50 am
by rdonnay
This looks correct.

The buttons are children of the static.

I don't understand quite what is happening.

It could be something wrong with the ownerdrawing code of your static.

Is it possible to send me code that I can compile and run?

Re: Buttons under a new window

Posted: Mon Jun 29, 2015 7:54 am
by Tom
Looks like "CustomStatic" does not repaint in every situation where repainting is needed.

Re: Buttons under a new window

Posted: Mon Jun 29, 2015 9:14 am
by rdonnay
Looks like "CustomStatic" does not repaint in every situation where repainting is needed.
It should be easy to determine if it is the source of the problem.
Just comment out the SUBCLASS clause.

Re: Buttons under a new window

Posted: Tue Jun 30, 2015 9:15 pm
by Andy Edward
rdonnay wrote:
Looks like "CustomStatic" does not repaint in every situation where repainting is needed.
It should be easy to determine if it is the source of the problem.
Just comment out the SUBCLASS clause.
Roger, we've decided to comment out the "CustomStatic" Subclass command first. It's working for us at the moment.

I've tried to create a sample project for you, but a simple one does not have the 'disappearing' behavior. Which led me to believe that our app's way of handling windows/dialogue can also be the cause.

Until I can replicate this in a sample project, I think we'll just use without the owner drawing of the static and use a recessedbox instead

Thank you

Regards,

Andy