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
 Copy of a Layoutpage

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
Simulation@Knapp Posted - 04/10/2008 : 07:36:11 AM
Hi!

I''ve a Layoutpage called "LayoutMaster" (short name and long name) with some static text and rectangle on it.
I want make a copy of this page with method "Create", but ORIGIN is unable to find "LayoutMaster".

Any idea what I did wrong?

Here is the code:


int CreateLayoutPage
{
LayoutPage lp;
if(lp.Create("LayoutMaster", CREATE_VISIBLE | CREATE_NO_DEFAULT_TEMPLATE))
return 1;
else
return 0;
}
1   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 04/15/2008 : 05:04:23 AM
Hi,

The interface of PageBase::Create function is:

BOOL Create(LPCSTR lpcszTemplate = NULL, int iOption = CREATE_VISIBLE | CREATE_KEEP_LAYER_NAMES);

The first argument is Template, not name. If want to rename newly created page, can use
int Rename(LPCSTR lpcszNewName, BOOL bAskIfAlreadyUsed = FALSE, BOOL bLongName = FALSE);

So can change this codes to:

int CreateLayoutPage()
{
LayoutPage lp;
if(lp.Create("Origin", CREATE_VISIBLE | CREATE_NO_DEFAULT_TEMPLATE))
{
lp.Rename("LayoutMaster");
return 1;
}
else
return 0;
}


Iris

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