Jump to content

CurveEdit Control


 Share

Recommended Posts

I just started to use OLE/COM Objects Viewer and I have some troubles to understand what I need to do with informations got from there. For example I created an control with class name AUDIOCONTROLS2.CurveEditCtrl.1 and I want to know how to use properties and methods for this object. For example how can I use the HorizontalLines property?

Posted Image

This is the code to test if the object is created without problems.

$MAIN = GUICreate("Curve Edit Control",400,400)
$OBJ = ObjCreate("AUDIOCONTROLS2.CurveEditCtrl.1")
GUICtrlCreateObj($OBJ,5,5,390,390)
GUISetState(@SW_SHOW,$MAIN)

While True
    Switch GUIGetMsg()
        Case -3
            Exit
    EndSwitch
    Sleep(10)
WEnd
Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

Andreik, this is how I do it: load the control in a VB6 form, press F2 and look there. Also, if you type in the code window, you can see in the autocomplete properties, methods ...

Link to comment
Share on other sites

You should be able to do this:

$obj.HorizontalLines = 123
$lines = $obj.HorizontalLines

$obj.AddPoint(...)
$obj.Reset()
$number = $obj.GetNumberOfCurves()

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

I tried also "$obj.HorizontalLines = some number" but all time I got this error and I don't know why, because I didn't get any error when I create the object.

The requested action with this object has failed.

Edited by Andreik

When the words fail... music speaks.

Link to comment
Share on other sites

Maybe the property is read-only?

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Andreik, have you checked if the object was created? Put this under $OBJ....

If IsObj($OBJ) Then
    ConsoleWrite("Object created!")
Else
    ConsoleWrite("Not created...")
EndIf
Link to comment
Share on other sites

@taietel ma nu is idiot, stiu daca am un obiect valid sau nu si daca citeai cu atentie tot ce am scris in primul post vedeai ca am un obiect valid fiindca am folosit cu succes obiectul ca sa creez un control pentru GUI.

When the words fail... music speaks.

Link to comment
Share on other sites

1. Andreik, daca rulez scriptul tau pe win7 (FARA Nero instalat) si daca in loc de "AUDIOCONTROLS2.CurveEditCtrl.1" scriu "OBIECT.AIUREA.1", obtin acelasi rezultat (scriptul RULEAZA FARA EROARE): doar form-ul principal! (verifica daca am dreptate sau nu)

2. Am intrat pe XP si acolo am putut sa creez obiectul (NERO=instalat). In VB6 nu am erori, pot sa setez liniile orizontale/verticale, dar in AutoIt formul apare o fractione de secunda si apoi imi apare eroarea incepand de la .HorizontalLines.

3. SUB NICI O FORMA nu am considerat ce ai scris mai sus!!! Respect toti utilizatorii acestui forum, indiferent de experienta pe care o au sau de numarul de postari. Daca ti-am dat de inteles altceva, imi cer scuze!

M.I.

P.S. For Mods: If the this text needs to be translated, just ask.

Link to comment
Share on other sites

The script (as is) gives NO ERRORS (that's why I said working) on object creation, because there isn't any error checking. If you modify that script and try to access the properties/methods of the object, THEN you will have message errors.

That's what I was thinking about...

M.I.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...