How do I get the name of a duplicated or created control and add a reminder

Hi all

According to the number of entry points I need, I duplicate a digital or an input string to the DuplicateCtrl function. My question is, how do I get the name and id of the control that has been created, and how can I assign a callback to it? Alternatively, it would be better to create a fresh ctrl instead of duplicate?

Thanks in advance!

Hi TurboMetrologist,

Why are you trying to get the name of constant control? Remember that you cannot use this name to address control; control names are in fact simply the macros in the file associated with the UIR, include in other words, the preprocessed compiler code and everywhere where the names of PANEL_CONTROL replaces the digital value as parameters to functions (and therefore 'control' parameter is an int value and not a char *)

That's why NewCtrl () or DuplicateCtrl () functions return a control ID: this is the handle to the new object, the only way to handle it. You will need to store this handle in a nonvolatile memory so that you can access durng life program.

In addition, there are other ways to assign a meaning to a control to pass on the name of constant control. For example, you can use the callbackData parameter to differentiate the different copies of a control.

Let me explain with an example. You said that you need several entries (dynamically created that you don't know in advance how many of them use); a solution could be:

  • Design a master copy of a control in the IUR Editor, where it is easy to customize; also assign a callback function, if it must be common to all copies of the control
  • Assign a value to this control callbackData, programmatically for example SetCtrlAttribute (...,..., ATTR_CALLBACK_DATA, (void *) 1);
  • Duplicate the control, and then assign a different callbackData
    for (i = 2; I have< 5;="" i++)="">
    handle = DuplicateCtrl (...);
    SetCtrlAttribute (..., handle, ATTR_CALLBACK_DATA, (void *) I);
    }

By operating this way, whenever the reminder of control is triggered by any control, it will receive the callbackData assigned, and you will be able to differentiate your code with a simple switch:

switch (callbackData (int)) {}

case 1: / / the master controls

break;

case 2: / / first dual control

break;

}

Tags: NI Software

Similar Questions

  • How to get the name of a class private data controls?

    How can I get the names of the controls within a class private data?

    I use the framework of the actor and try to create a tha method will be executed when run the actor. This method should an o list all names of control inside the data class to find the initial value within a configuration file (config.ini file), the key to the configuration file will be the name of the control.

    Thank you.

    You already do the substitution method just because you write for the bundle by name.  And then how are you going to respond to all types of data might be the key.  You do more difficult things that it takes to really very few benefits.

  • How can I get the name of the song to appear in Windows Live Messenger "show what I'm listening to '?"

    How can I get the name of the song I am listening, to see where it says show comes into contact with the song I listen to, it worked before but not now

    Please make sure that show what I'm listening is also enabled in Live Messenger itself. See the following screenshot:

    http://static.commentcamarche.NET/en.kioskea.NET/FAQ/images/0-BeQo7AgV-John-s-.PNG

  • How do I get the name of the caller (no contacts) that displays on the incoming call screen?

    Hi all
    1. work on the version of BB storm (9500/9530 Simulator) is v4.7.0.75
    2 opportunity BB JDE v4.7

    3. signed request

    4. the request is:

    I need to get the name of the appellant on the screen programmatically incall.
    I have observed that there are some providers will provide some default/a name on-screen incall.

    Note: I am not match the number of incall in contacts and look for the name.

    How do I get the name of the caller (no contacts) that displays on the incoming call screen?

    can any body help on this.

    Thanks in advance

    Ratna-

    There is no API that provides this information.  You can get the number of incoming callers, but not the name of caller ID.

  • How can I get the name of the procedure

    Hello

    With the help of our application, we update a table (P_Balance) in the statement of account and date thanks to certain procedures.

    in some column of status situation alone expects to obtain the correct value, but the date column with the value NULL.

    Now, we have decided to follow this through which procedure to get this updated value null date column.

    To do this, I decided to write a trigger for the table 'P_BALANCE' by what procedure, this update going on.

    How can I get the name of the procedure.

    Hello

    You can write the call stack in a log whenever the value of the column is null. See

    DBMS_UTILITY. FORMAT_CALL_STACK

    This will give you the name of the object and the line numbers of the update program.

    Concerning

    Marcus

  • How can we get the names of police of every text layer in a document?

    Hi all!

    I wanted to know how we can get the names of fonts applied in each text layer in a psd file. I tried the following,

    NumLayers Int32 = 0;

    calculate the number of text layers.

    error = PIUGetInfo (classTextLayer, keyCount and numLayers, NULL);

    for (int i = numLayers - 1; i > 0;--i)

    {

    char * fontName = new char [100];

    Int32 len = 100;

    get the name of the font of each layer by index.

    error = PIUGetInfoByIndex (I, classTextLayer, keyFontName, fontName and len);

    }

    Suppose I have a document that has 2 layers of text and 2 layers of solid color as shown in the screenshot. Note that this document does not have a background layer. So, number of layers is 4.

    Forum.JPG

    If the layer is a layer of solid color, then I get the number of layers 0. But, if the selection of the layer is at all layers of text, I get number of layers 4. Why not get the number of layers 2 I requested info in the instruction text layers, PIUGetInfo (classTextLayer, keyCount and numLayers, NULL).

    In addition, I get error =-25922 to PIUGetInfoByIndex (I, classTextLayer, keyFontName, fontName and len).

    which is errReferenceNotFoundDefine.

    How can I go about it?

    Thank you!

    Hello

    I usually have "remember" United in what image is and then start working on it. This allowes me to iterate through layers when draft information or perform an action, and then set the document (in the previous state, with this wantsof user change course). Using this approach I am using index layers, but I don't know as I work on the layer is curently active layer.

    Now

    Getting the numbers of layer in a document:

    SPErr AMAutoPlugin::GetLayNum()

    {

    SPErr error = kSPNoError;

    numLayers Int32;

    Result PIActionDescriptor = NULL;

    Reference PIActionReference = NULL;

    error = sPSActionReference-> Make (& reference);

    If (error) goto returnError;

    error is sPSActionReference-> PutEnumerated(reference,classDocument,typeOrdinal,enumTarget);.

    If (error) goto returnError;

    error is sPSActionControl-> Get (& result, reference);.

    If (error) goto returnError;

    error = sPSActionDescriptor-> GetInteger (result, keyNumberOfLayers, & numLayers);

    If (error) goto returnError;

    stDocData.iNumLayers=numLayers;// is just my overall

    returnError:

    If (result! = NULL) sPSActionDescriptor-> Free (result);

    If (reference! = NULL) sPSActionReference-> Free (reference);

    error return;

    }

    Here is a part of the code (I hope you can understand that I have cut out a lot of)

    code that is not necessary in order to shorten the post) that retrieves the names of fonts.

    I used this approach since I have to get a lot more detailed information about text layers (not prsented here)

    I guess bu using routines from PIUGetInfoByIndex to aproprite, you can do much shorter.

    SPErr AMAutoPlugin::GetTextLayerAttributes(int index, TxtLayerInfo* info)

    {

    In order to clarify

    'info' is my structure that I filled with the data I need you can use somethong that suites you

    //

    UInt32 stringLength = 0;

    UInt32 STRL = 0;

    "" fontName char [255] = "";

    "" chariot of fontStyle [255] = "";

    "" char fontPSname [255] = "";

    HasKey Boolean = false;

    SPErr error = kSPNoError;

    DescriptorTypeID runtimeKeyID;

    DescriptorTypeID runtimeClassID;

    DescriptorTypeID runtimeTypeID;

    DescriptorTypeID runtimeUnitID;

    DescriptorTypeID runtimeEnumID;

    DescriptorClassID descClass;

    DescriptorEnumID enumValue.

    PIActionList listTextStyle = NULL;

    PIActionDescriptor descLayer = NULL; / / *

    PIActionDescriptor descPosition = NULL;

    PIActionDescriptor descTextLayer = NULL;

    PIActionDescriptor descTextStyle = NULL;

    PIActionDescriptor descFont = NULL;

    PIActionDescriptor descFontColor = NULL;

    PIActionDescriptor descClickPoint = NULL;

    PIActionDescriptor desclayerLocking = NULL;

    PIActionDescriptor descEFFECTS = NULL;

    error = sPSActionDescriptor-> Make (& descLayer);

    If (error) goto returnError;

    error = sPSActionDescriptor-> Make (& descTextLayer);

    If (error) goto returnError;

    error = sPSActionDescriptor-> Make (& descTextStyle);

    If (error) goto returnError;

    error = sPSActionList-> Make (& listTextStyle);

    If (error) goto returnError;

    error = sPSActionDescriptor-> Make (& descFont);

    If (error) goto returnError;

    error = PIUGetInfoByIndex(index,classLayer,0,&descLayer,);

    If (error) goto returnError;

    text

    error is PIUGetSingleItemFromDescriptor (descLayer, keyText, & descTextLayer, & descClass);.

    If (error) goto returnError;

    //

    get the police handle

    error = sPSActionDescriptor-> GetList (descTextLayer, keyTextStyleRange, & listTextStyle);

    If (error) goto returnError;

    error = sPSActionList-> GetObject (listTextStyle, 0, & descClass, & descTextStyle);

    If (error) goto returnError;

    error is PIUGetSingleItemFromDescriptor (descTextStyle, keyTextStyle, & descFont, & descClass);.

    If (error) goto returnError;

    font size

    error = sPSActionDescriptor-> GetFloat (descFont, keySizeKey, & dFontSize);

    If (error) goto returnError;

    Info-> dFontSize = dFontSize;

    name of the font

    error = sPSActionDescriptor-> GetStringLength (descFont, keyFontName, & stringLength);

    If (error) goto returnError;

    stringLength += 2;

    error = sPSActionDescriptor-> GetString (descFont, keyFontName, fontName, stringLength);

    If (error) goto returnError;

    Info-> sFName = fontName;

    NAME OF FONT PS

    error = sPSActionControl-> StringIDToTypeID ("fontPostScriptName", & runtimeKeyID);

    If (error) goto returnError;

    error = sPSActionDescriptor-> GetStringLength (descFont, runtimeKeyID, &STRL);)

    If (error) goto returnError;

    STRL += 2;

    error = sPSActionDescriptor-> GetString (descFont, runtimeKeyID, fontPSname, STRL);

    If (error) goto returnError;

    Info-> sPSName = fontPSname;

    font name style

    error = sPSActionDescriptor-> GetStringLength (descFont, keyFontStyleName, & stringLength);

    If (error) goto returnError;

    stringLength += 2;

    error = sPSActionDescriptor-> GetString (descFont, keyFontStyleName, fontStyle, stringLength);

    If (error) goto returnError;

    Info-> sFStyle = fontStyle;

    etc...

    Hope this helps,

    Kind regards

    Momir

  • How can I get the name of rulefiles in application with the help of custom java code.

    Hello.
    I want to get the names of rulefiles of analytical service with the help of java api.
    How can I get the name of rulefiles. What api should I use for this problem?

    Hello

    IEssCube.getOlapFileObjects () api allows you to retrieve files of rules.
    Insert this code snipid in your code, it will list all the rules files.

    IEssCube cube = olapSvr.getApplication("Sample").getCube ("Basic");
    ITR IEssIterator = cube.getOlapFileObjects (IEssOlapFileObject.TYPE_RULES);
    RFS [] IEssBaseObject = itr.getAll ();
    System.out.println ("rule file count:" + rfs.length);
    for (int i = 0; i)< rfs.length;="" i++)="">
    System.out.println ("RuleFile" + i + ":" + ((EssOlapFileObject)rfs). getName() ' ");
    }

    You can also list the data files and other objects in file by changing the IEssOlapFileObject.TYPE in getOlapFileObjects()

    Concerning
    Rajeev Singh

  • How can I get the tabs to go on a single line and a menu of Firefox?

    Firefox allows to have 2 lines above - Firefox menu with tabs and more and another line of the navigation toolbar. during the installation of some programs online, Firefox now have 3 lines at the top, with the Firefox menu on an entire line, the 2nd line of tabs and 3rd line of navigation toolbar. How can I get the tabs to go on a single line and a menu of Firefox?

    With the current versions of Firefox, you can choose to use the menu of Firefox (orange in windows; gray Linux) button at the left end of the Windows title bar or bar menus familiar as in earlier versions. The Firefox button is displayed by default only in Windows Vista and Windows 7, but you can turn on or off or switch between the two or temporarily show the menu bar when the Firefox button is displayed.

    If you chose to use the Firefox button and you use the default tabs on top, the tab bar will move to the title bar with the Firefox button only when you are to maximize window (the ' square' the middle button in the upper right corner of the Windows standard application window). Other selected toolbars will be displayed below that (bar Navigation, Bookmarks Toolbar and the toolbars you add via Add - ons).

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You must update some plug-ins:

  • Gmail button (in internet explorer) keeps having moved to the right in my taskbar when I wasn't staying on the left (that's why I first open). How can I get the taskbar buttons to stop randomly to reorganize and stay in order?

    Gmail button (in internet explorer) keeps having moved to the right in my taskbar when I want to keep it on the left (that's why I first open).  How can I get the taskbar buttons to stop randomly to reorganize and stay in order?  I'm talking about the buttons on list of my open applications and documents in Windows Vista.  The bar tasks are "locked", but the button of the window open with gmail in internet explore reappears suddenly in the good moments apparently random.

    It is in the middle part of the taskbar (what I found online so far is on the start menu, the quick launch area or area/system tray of notification, the location of the taskbar in full, either about grouping taskbar - I disabled because I would like to separate).  Can anyone help?  I don't understand why this is happening (or why microsoft would never do).

    Lock the taskbar that it prevents to be moved elsewhere on the office and maintains the different sections where they are - it does not block the tabs showing what is open where they were when they were opened.  There is no control for this function.  Maybe if you uncheck similar taskbar buttons group it will help, but I honestly don't know (and fear he won't make any difference - it may even make things worse).  This also happens to me and I was unable to find an answer.  I think that there are more than just random, but I can't telll you why he moves the legs periodically (sometimes it works fine all day and other days it happens almost immediately).  But still, there is no control for this function, so there is no way to tell him to keep a specific order or to lock an established order, once it has been created.  I suspect that it happens because the notification area icons appear and hide and new programs open and close and which changes the amount of space available and so he rearranges things so that they match and apparently does not always consider the original sequence in which the elements have been added.  Maybe if you remove the Quick Launch toolbar and then add again, the order will reset (but that I know not - probably not in the original sequence, which I doubt is logged nowhere - it did not work when I tried it).

    Unfortunately, I don't have a solution to this problem (and I spend a little time looking for even before myselff posed the question) and do not believe that there is a.  It is also unfortunate that you can't move them so they can be put back in the right order if they change.  I don't think that there is nothing wrong with your system or that it is something that can be repaired or fixed - it's just the way it is and we just have to live with it.  I don't know any 3rd party software that controls the order of tabs open in the taskbar program (but you can check out Bing, Gooogle,www.tucows.comand www.download.com to see if I'm wrong on this - here n "t all when I looked trying to solve this problem for my own system).

    I'm sorry it wasn't what you wanted to hear, but it's like that.  I don't know if it's different in Windows 7.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How can I get the name of the images in my package of res?

    Hello

    I have a lot of images in the "res" my project package. I need to get the names of these files and save them in a table. How can I do?

    Thank you.

    There is no API to do this, your application must "know" the names of the images.

  • How can I get the name of Contact? ~

    now, I opened a list of contacts,

    Contact list BlackBerryContactList = (BlackBerryContactList) BlackBerryPIM.getInstance () .openPIMList (BlackBerryPIM.CONTACT_LIST, BlackBerryPIM.READ_ONLY);
    Contact BlackBerryContact = (BlackBerryContact) contactList.choose ();

    I want to get the name of the contact that I choose, how can I do?

    I use

    String contactName = contact.getString (BlackBerryContact.NAME, 0);

    but can not have, how to use these Field summary FORMATTED_NAME ,NAME ?

    final String[] name = contact.getStringArray(Contact.NAME, 0);
            final String firstName = name[Contact.NAME_GIVEN];
            final String lastName = name[Contact.NAME_FAMILY];
    

    Check this link below.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800363/How_To _...

  • How can I get the name of the package where a table is used

    Hello... Hello...

    How can I know the name of the package or procedures where a particular table is used?

    is there a such sql query, I can get the names?

    It should work. Not tested.

    SELECT *
      FROM USER_DEPENDENCIES
     WHERE     TYPE LIKE 'PACKAGE%'
           AND REFERENCED_TYPE = 'TABLE'
           AND REFERENCED_NAME = 'YOUR_TABLE_NAME'  --Replace with the table name you are looking for
    

    G.

    Edited by: g. on February 23, 2011 12:42 AM

  • How can I get the name of an instance of the applied effect?

    We have a plug-in effects after (written using the SDK), and we would like to get the name of an instance of an effect applied. For example, if my name of the installed effect is "FoofooBerry", and the customer applied two effects of FoofooBerry, it would be named "FoofooBerry" and the other named "FoofooBerry 2".

    In the documentation, it is said:


    «To get the name of the instance of the effect (as renamed by the user), get the AEGP_StreamRef for the effect itself and call AEGP_GetStreamName.»

    Which seems to be what I want to do, but how we "get the AEGP_StreamRef for the effect itself" escapes me.

    I have tried iterating over all flow on the effect and control of these devices, but I don't see anything useful. Someone knows how to get the ref to flow for effect (not a stream on this effect)?

    I also asked this question on StackOverflow, but unsurprisingly, had no luck (not a bunch of AE experts out there).

    Thank you.

    Hey,.

    You can do this for examlpe of this way:

    get plugin_id with AEGP_RegisterWithAEGP, if you probably already know how to

    then

    AEGP_GetNewEffectForEffect

    AEGP_GetNewEffectStreamByIndex, say for the parameter index 1

    AEGP_GetNewParentStreamRef

    AEGP_GetStreamName

    AEGP_LockMemHandle - This is your wchar_t instance name!

    welcome them

  • How do I get the name of the file that is read by the file adapter

    Hello

    I read the file using the file adapter that I also want to pass the name of the file with the contents of the file
    How can I do this, or how to get the name of the file that is read by the process.

    Please advice

    Thank you
    Yatan

    Hi Yatan,

    You can use the file in/out header WSDL to get the name of the file.
    http://download.Oracle.com/docs/CD/B31017_01/integrate.1013/b28994/adptr_file.htm#CIAFJCCE

    Kind regards
    Yohanna.

  • How can I get the name of the current page and the number?

    Hello world!

    Anyone know how to get the name of the current page and the number? What variable I should he request?

    Thanks in advance!

    The question of the application defined by the system: APP_PAGE_ID is the page number. For the name of the page, you will need to query the view of Apex with something like this:

    Select PAGE_NAME
    of APEX_APPLICATION_PAGES
    where PAGE_ID =: APP_PAGE_ID

    Good luck

    Stew

    PS Feel free to mark this reply as being correct, so it is.

Maybe you are looking for

  • How to stop Firefox Sync synchronization Personas?

    Firefox Sync keeps syncing my characters between browsers, which is a bit frustrating because I prefer to keep separate personas on different computers. I can't find an option to turn it off. Does anyone know how to do this?

  • IOS and Echo from Amazon

    IM thinking if the Echo of Amazon, but information is scarce. The echo can be synchronized with the iPhone 6. I would like to play my music, make appointments and add contacts using the echo.

  • How can I convert a 3 mV/V to a load cell signal to something I can read using a field point AIO-600?

    I use an external powere supply 12V to supply voltage to the load cell, and I'm reading data using AIO-600. There is a separate module that can do this, but is it possible to do it with the current material?

  • See the domain admins

    Hello I want to know if there is anyway that I can see when an account has become a member of the domain admins group? on windows server 2012 r2 Thank you

  • How to disable automatic playback.

    When I insert a CD in the drive to install it on my computer, AutoPlay appears a clipart image.  How can I prevent that to happen? OT: Auto Play