Move
Move a folder or window
BOOL Move( LPCSTR lpcszItemName, LPCSTR lpcszPathName, BOOL bMoveFolder = false )
TRUE on success, FALSE on failure
EX1
// Demonstrate moving Windows // Code assumes you have a worksheet active (default after new project) void Folder_Move_Window() { Worksheet wks = Project.ActiveLayer(); if(wks) { Folder root = Project.RootFolder; Folder subfld_1 = root.AddSubfolder("sub1"); // Move the active worksheet into the new "sub1" folder Page pg = wks.GetPage(); if( !pg.GetFolder().Move(pg.GetName(), subfld_1.GetPath()) ) printf("Can't move this window!"); } }
EX2
// Demonstrate moving Folders void Folder_Move_Folder() { Folder root = Project.RootFolder; Folder subfld_1 = root.AddSubfolder("sub1"); Folder subfld_2 = root.AddSubfolder("sub2"); // Move the new "sub2" folder into the new "sub1" folder if( !root.Move(subfld_2.GetName(), "/"+subfld_1.GetName()+"/", true) ) printf("Can't move this subfolder!"); }
Move a window or folder from source path to destination path.
Note that the Move method cannot used on a folder object to move itself
origin.h