Need Autorestore Window in @ .. DCDIALOG

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Need Autorestore Window in @ .. DCDIALOG

#11 Post by rdonnay »

Ok Michael, there are several issues that I corrected in your code:

Your call to DC_AutoRestoreWindow() was incorrect.
Was: DC_AutoRestoreWindow ({HKEY_CURRENT_USER, '\Software\Michael\Demo\Fenster'})
Is: DC_AutoRestoreWindow ({HKEY_CURRENT_USER, 'Software\Michael\Demo\Fenster'})

The parent of the subdialog window was not a drawing area.
Was: ACTION {|o| o:=Thread():new(),o:Start("Test1",oDialog) }
Is: ACTION {|o| o:=Thread():new(),o:Start("Test1",oDialog:drawingArea) }

The GetList was not being saved, therefore DC_GetDestroy() was not working:
Was: DCREAD GUI parent oDialog OPTIONS GetOptions HANDLER _DlgHandler TO lOK
Is: DCREAD GUI parent oDialog OPTIONS GetOptions HANDLER _DlgHandler TO lOK SAVE
The eXpress train is coming - and it has more cars.

edv-rudrich
Posts: 33
Joined: Wed Jan 27, 2010 10:23 pm

Re: Need Autorestore Window in @ .. DCDIALOG

#12 Post by edv-rudrich »

Hi Roger

thanks...

I just did remove the '\' in the reg-entry and it seems to work..

When I use the SAVE clause - could it happen that I run into memory
problems? When every Getlist is kept again and again?

Thks

- Michael

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Need Autorestore Window in @ .. DCDIALOG

#13 Post by rdonnay »

You only need to use the SAVE clause when you use DC_GetDestroy() to destroy your windows.

As long as you use LOCAL variable for GetList, this is not a problem.

The GetList will be released from memory when returning from the procedure.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1169
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Need Autorestore Window in @ .. DCDIALOG

#14 Post by Tom »

If you use the "CODE"-Tag (Button above the edit window, just mark the text and press "Code") of the forum, code snippets are much easier to read:

Code: Select all

#include "dcdialog.ch"

STATIC oDialog

Procedure APPSYS()
RETURN
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply