The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 ResizeDialog- derived classes and dimensions

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
cdrozdowski111 Posted - 08/17/2013 : 4:41:12 PM
OriginPro 9.0.0 SR2 64-bit, Win7 64-bit/32-bit, running in VMware Fusion 5.0.3

I created a basic custom dialog class derived from ResizeDialog. I then created some derived classes For example (pseudocode):

class Base_Dlg : public ResizeDialog
...
class Child1_Dlg : public Base_Dlg
...
class Child2_Dlg : public Base_Dlg
...

When I create objects of the various classes, they all share the same postion and dimensions when resized. The resizing code is in the base class. How can I make it such that each class retains its own postion and dimensions?
1   L A T E S T    R E P L I E S    (Newest First)
cdrozdowski111 Posted - 08/18/2013 : 9:02:17 PM
I figured it out. I think. It does work. I can implement these two events in my base class overriding the noted string variable in my derived classes.


BOOL OnInitSize()
{
	return FALSE;
}


BOOL OnRestoreSize(ODWP dwSizeInfo)
{
	void * p = (void*)dwSizeInfo;
	DLGSIZEINFO *pSz = (DLGSIZEINFO*)p;
	lstrcpyn(pSz->szDialogName, m_strDlgID, MAXLINE); // m_strDlgID is a string property I can change in derived classes
	
	...
	
	return TRUE;
}

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000