LabWindows/CVI

Table of Contents
  • LabWindows/CVI Fundamentals
  • Creating Applications
  • Distributing Applications
  • Library Reference
  • Programmer Reference
  • Hardware Information

Referencing User Interface Objects Programmatically

When building a GUI programmatically, reference objects and assign callbacks as shown in the following table.

Note Note  When building a GUI in the User Interface Editor, you reference objects and callbacks differently.
User Interface Object How to Reference the Object How to Assign a Callback to the Object
Panel Use the handle returned by one of the following functions:

NewPanel

LoadPanel

LoadPanelEx

DuplicatePanel

DuplicatePanelTree

GetActivePanel

GetSharedMenuBarEventPanel

GetCtrlArrayPanel

GetPanelHandleFromTabPage

GetActiveXCtrlFromObjHandle

GetGlobalMouseState

GetUserEvent
Call InstallPanelCallback.
Control Use the ID returned by one of the following functions:

NewCtrl

DuplicateCtrl

GetActiveCtrl

GetCtrlArrayItem

NewActiveXCtrl

NewActiveXCtrlFromFile

GetActiveXCtrlFromObjHandle

GetUserEvent
Call InstallCtrlCallback.
Menu bar Use the handle returned by one of the following functions:

NewMenuBar

LoadMenuBar

LoadMenuBarEx

NewMenuBar

GetPanelMenuBar

GetUserEvent
Call InstallMenuCallback.
Menu Use the ID returned by NewMenu. Call InstallMenuCallback.
Submenu Use the ID returned by NewSubMenu. Call InstallMenuCallback.
Menu item Use the ID returned by one of the following functions:

NewMenuItem

RunPopupMenu

InsertSeparator

NewCtrlMenuItem

NewCtrlMenuSeparator

ShowBuiltInCtrlMenuItem

GetUserEvent
Call InstallMenuCallback.

Log in to get a better experience