Annoying problem with FWPPC - Forms and dialogs

Post Reply
JoaquimC
Posts: 16
Joined: Fri Feb 09, 2007 6:43 pm
Location: Porto - Portugal

Annoying problem with FWPPC - Forms and dialogs

Post by JoaquimC »

I got into this problem:

From a form i call a dialog. Then i close the dialog and go back to the form. For some time it all works fine, but at the 3rd or 4th time (it varies) when i go back to the form, i continue to see the lines and the buttons of the dialog beyond the lines of the form, and the form is so confusing that i have to close the program and open it again to continue the work.
I tried to refresh the form but it didn't solve the problem.

Did anyone got this problem and solved it? How did you do it?

TIA,
Joaquim
User avatar
Antonio Linares
Site Admin
Posts: 37485
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Joaquim,

Are you using fonts, bitmaps, or other GDI objects ? If so, how are you using them ?

Could you post a small and self contained sample that reproduces the problem ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
JoaquimC
Posts: 16
Joined: Fri Feb 09, 2007 6:43 pm
Location: Porto - Portugal

Post by JoaquimC »

Antonio,

I send you the full code to your mail box.

Many thanks,

Joaquim
User avatar
Antonio Linares
Site Admin
Posts: 37485
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Joaquim,

Solved. You can not reuse a dialog because its brush gets destroyed when the ACTIVATE DIALOG ends. Everytime you are going to use a dialog you have to do:

DEFINE DIALOG oDlg ...

ACTIVATE DIALOG oDlg ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
JoaquimC
Posts: 16
Joined: Fri Feb 09, 2007 6:43 pm
Location: Porto - Portugal

Post by JoaquimC »

thank you Antonio.

but, as you noticed in the code i send you, i need to populate a combo in the dialog with the contents of a table, it would take a long time if i need to do it every time i call the dialog.
Can i replace the dialog with a modal window? Or windows will need to be defined from scratch every time i call them, as on dialogs?

Joaquim
Post Reply