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 and Folders // Code assumes you have a worksheet active (default after new project) void Folder_Move_Ex1() { Worksheet wks = Project.ActiveLayer(); if(wks) { Folder root = Project.RootFolder; Folder subfld_1 = root.AddSubfolder("sub1"); Folder subfld_2 = root.AddSubfolder("sub2"); // Move the active worksheet into the new "sub1" folder if( !root.Move(wks.GetPage().GetName(), "/"+subfld_1.GetName()+"/") ) // move the current window to folder "sub1". printf("Can't move this window!"); // Move the new "sub2" folder into the new "sub1" folder if( !root.Move(subfld_2.GetName(), "/"+subfld_1.GetName()+"/", true) ) // move subfolder "sub2" to folder "sub1". 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