Bitmaped and transparent dialogs

Postby Enrico Maria Giordano » Thu Feb 02, 2006 7:44 am

If you issue oDlg:End() then you will have to recreate the DIALOG (DEFINE DIALOG etc.) again. You can't reuse an ended DIALOG.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby don lowenstein » Thu Feb 02, 2006 5:16 pm

I have done this in the past. Each control needed to be "refreshed" in the initialization of the ::activate()

The reason I did this was due to many controls / folder pages, etc, which were created from data driven applications. The computers were much slower ( 386 speed ) and this saved lots of overhead.

Upon 're-activation' the controls worked fine, but, my dialog's background was "transparent".

Not an issue anymore - computers are much faster and no problem saving data-driven parms in an array and define / activate each time needed.

Things have come a long way, haven't they?
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Postby Enrico Maria Giordano » Thu Feb 02, 2006 5:22 pm

I think it is not correct to reuse an ended DIALOG. You can hide it instead.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby James Bott » Thu Feb 02, 2006 5:38 pm

Enrico,

I agree, but I think he is just saying that he is storing the parameters in an array, then reusing the parameters to define and acitvate the dialog each time. I guess this would be no different than rereading them from a resource file.

Don, am I right?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby don lowenstein » Thu Feb 02, 2006 6:53 pm

Exactly -

For me, easier to store dialog parms in a database and build dynamically vs. create resource, manually code controls to variables. etc. Using a data dictionary for me, is cleaner - only one input program, only one browse/update program, etc.
Don Lowenstein
www.laapc.com
User avatar
don lowenstein
 
Posts: 197
Joined: Mon Oct 17, 2005 9:09 pm

Postby James Bott » Thu Feb 02, 2006 7:05 pm

Don,

I am curious as to how you design the dialogs in the first place. Do you design them in Workshop or other, then read the resource file to create your database, or how?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Enrico Maria Giordano » Thu Feb 02, 2006 7:09 pm

James Bott wrote:Enrico,

I agree, but I think he is just saying that he is storing the parameters in an array, then reusing the parameters to define and acitvate the dialog each time. I guess this would be no different than rereading them from a resource file.

Don, am I right?

James


It is still not correct. Ending a dialog means that the DialogBox Windows object is released and you can't use its handle anymore. If you want to use the dialog again you have to instantiate a new TDialog object.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Enrico Maria Giordano » Thu Feb 02, 2006 7:14 pm

don lowenstein wrote:Exactly -

For me, easier to store dialog parms in a database and build dynamically vs. create resource, manually code controls to variables. etc. Using a data dictionary for me, is cleaner - only one input program, only one browse/update program, etc.


Are you saying that you issued DEFINE DIALOG etc. again with the same parameter of the first one? If yes then it's ok to do so. What you can't do is to end a dialog and then activate it again without defining it.

Regarding your main problem, try to build a reduced and self-contained sample.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 67 guests