![]() |
#1
|
|||
|
|||
![]()
Hello!
I am automating CorelDraw by using the Variant class, i.e. in Delphi: var vCorelApp: Variant; [...] vCorelApp := CreateOleObject('CorelDraw.Automation.8'); vCorelApp.SetVisible(0); or in C++Builder: Variant vCorelApp; [...] vCorelApp = CreateOleObject("CorelDraw.Automation.8"); vCorelApp.OleFunction("SetVisible", 0); and so on. Now I need to get data from Corel`s script function GetSize which has this declaration in Corel Help: .GetSize .XSize = long*, .YSize = long* i.e. GetSize returns datas by function arguments. How can I receive XSize and YSize from GetSize function? Any code example will be appreciated. TIA, Elie |
#2
|
|||
|
|||
![]()
.GetSize w, h
the w and h variables have the dimensions of the object or in your code example: .GetSize XSize, YSize the variables XSize and YSize would hold the dimensions, simply refer to the variables as you would normally. |
#3
|
|||
|
|||
![]()
Thank You Bill!
In C++ code it looks like: long XSize, YSize; vCorelApp.OleFunction("GetSize", &XSize, &YSize); and GetSize fills args with values, but now I have another problem. I cannot understand these values ![]() vCorelApp.OleFunction("CreateRectangle", 10000, 0, 0, 20000, 0); vCorelApp.OleFunction("GetSize", &XSize, &YSize); then I expected to receive XSize = 20000 and YSize = 10000, but I get XSize = 20762 and YSize = 10762. I do not understand this difference 762. What it is? TIA, Elie |
#4
|
|||
|
|||
![]() Quote:
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to use getpixel() to get the Image color? | lees | CorelDRAW/Corel DESIGNER VBA | 6 | 17-10-2004 00:13 |
Printing Raw Prn Files | Mark | Code Critique | 2 | 16-09-2004 16:15 |
Function names | Lev | Oberon Function Plotter | 1 | 29-08-2003 11:04 |
takes Draw a long time to start a new document! | bbolte | CorelDRAW/Corel DESIGNER VBA | 5 | 14-05-2003 09:09 |
SaveAs function not working in PP11 | Aneurysm | Corel Photo-Paint VBA | 2 | 03-03-2003 17:31 |