eXpress++ DCREAD GUI PARENT @oDlg

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
slobodan1949
Posts: 82
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

eXpress++ DCREAD GUI PARENT @oDlg

#1 Post by slobodan1949 »

Roger,
what is the function does: DCREAD GUI PARENT @oDlg ?
what is the function does: DCREAD GUI PARENT oDlg ?
Both of these commands work but the behavior of the program is not the same.
Attachments
BUG.zip
(886 Bytes) Downloaded 205 times

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

Re: eXpress++ DCREAD GUI PARENT @oDlg

#2 Post by rdonnay »

.. PARENT @oDialog is used when DCREAD GUI automatically creates the dialog window for you, which is almost always.
@oDialog is used to create a pass-by-reference pointer to store a variable to the DC_XbpDialog1() object for use later in the program.

If you don't use @oDialog, but use only oDialog, then DCREAD GUI is expecting that you already have a pointer to a dialog window that will be used for all the DC* objects that will be created.

This may sound complicated to you but it really isn't as long as you always let DCREAD GUI create your dialog window.
As a habit, you can use DCREAD GUI PARENT @oDialog all the time, but then you should have LOCAL oDialog at the beginning of the function.
The eXpress train is coming - and it has more cars.

User avatar
slobodan1949
Posts: 82
Joined: Mon Apr 25, 2011 8:57 am
Location: SERBIA
Contact:

Re: eXpress++ DCREAD GUI PARENT @oDlg

#3 Post by slobodan1949 »

Thanks Roger,
now everything is clear.

Post Reply