Hide Table of Contents
SOLIDWORKS Electrical API 2024.0.0
Electrical API
EwApplicationMenu.idl
Go to the documentation of this file.
1#pragma once
2
3#if (__midl >= 501)
4midl_pragma warning(disable:2111) /* Disable warning MIDL2111 regarding identifier lengths exceeding 31 chars. */
5#endif
6
7import "EnumDefinition.idl";
8
13[
14 object,
15 uuid(C3F6CD37-0C87-4A30-823F-4F2452C59861),
16 dual,
17 oleautomation,
18 nonextensible,
19 helpstring("IEwMenuItemX Interface"),
20 pointer_default(unique)
21]
22interface IEwMenuItemX : IDispatch
23{
32 BSTR getCaption (EwErrorCode* errorCode);
33
34
43 EwErrorCode setCaption (BSTR strCaption);
44
45
54 BSTR getToolTip (EwErrorCode* errorCode);
55
56
65 EwErrorCode setToolTip (BSTR strToolTip);
66
67
76 BSTR getDescription (EwErrorCode* errorCode);
77
78
87 EwErrorCode setDescription (BSTR strDescription);
88
89
98 VARIANT_BOOL isEnabled (EwErrorCode* errorCode);
99
100
110 EwErrorCode setEnabled (VARIANT_BOOL bEnabled);
111
112
121 VARIANT_BOOL isSeparator (EwErrorCode* errorCode);
122
123
132 EwErrorCode setSeparator (VARIANT_BOOL bIsSeparator);
133
134
143 BSTR getShortcut (EwErrorCode* errorCode);
144
145
154 EwErrorCode setShortcut (BSTR strShortcutText);
155
156
167 EwErrorCode setIconFromImage (BSTR strImageFilePath, COLORREF crMask);
168
169
181
182
194
195
200 int getID ();
201
202
211 BSTR getCommand (EwErrorCode* errorCode);
212
213
222 EwErrorCode setCommand (BSTR strCommand);
223
224
233 VARIANT_BOOL getCheck (EwErrorCode* errorCode);
234
235
244 EwErrorCode setCheck (VARIANT_BOOL bCheck);
245
246
255 LONG getIndex (EwErrorCode* errorCode);
256
257
266 VARIANT_BOOL hasSubMenu (EwErrorCode* errorCode);
267
268
280 IEwMenuItemX addMenuItem (EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode* errorCode);
281
282
296 IEwMenuItemX addMenuItemAt (int iIndex, EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode* errorCode);
297
298
310 IEwMenuItemX getMenuItemAt (int iIndex, EwErrorCode* errorCode);
311
312
317 UINT getMenuID ();
318
319
328 VARIANT_BOOL isVisible (EwErrorCode* errorCode);
329
330
339 EwErrorCode setVisible (VARIANT_BOOL bShow);
340
341};
342
347[
348 object,
349 uuid(4E4AF073-F82C-458D-B6C3-E813F7A42241),
350 dual,
351 oleautomation,
352 nonextensible,
353 helpstring("IEwMenuX Interface"),
354 pointer_default(unique)
355]
356interface IEwMenuX : IDispatch
357{
367
368
380 IEwMenuItemX getMenuItemAt (int iIndex, EwErrorCode* errorCode);
381
382
394 IEwMenuItemX getMenuItemByID (int iMenuItemID, EwErrorCode* errorCode);
395
396
408 IEwMenuItemX addMenuItem (EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode* errorCode);
409
410
424 IEwMenuItemX addMenuItemAt (int iIndex, EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode* errorCode);
425
426
438
439
448
449
457 int getXPosition (EwErrorCode* errorCode);
458
459
467 EwErrorCode setXPosition (int iXCoordinate);
468
469
477 int getYPosition (EwErrorCode* errorCode);
478
479
487 EwErrorCode setYPosition (int iYCoordinate);
488
489
494 UINT getID ();
495
496
505
506};
507
512[
513 object,
514 uuid(63FC072D-5597-4B4E-8011-D2909E7D7C1E),
515 dual,
516 oleautomation,
517 nonextensible,
518 helpstring("IEwMenuManagerX Interface"),
519 pointer_default(unique)
520]
521interface IEwMenuManagerX : IDispatch
522{
532
533
542 int getMenuCount (EwErrorCode* errorCode);
543
544
553 VARIANT getMenuArray (EwErrorCode* errorCode);
554
555
567 IEwMenuX getMenuByID (UINT iID, EwErrorCode* errorCode);
568
569
580
581
590
591};
EwMenuStyle
Context Menu Styles.
Definition: EnumDefinition.idl:458
EwErrorCode
All errors codes for this API.
Definition: EnumDefinition.idl:24
Use this interface to manage an EwMenuItemX object.
Definition: EwApplicationMenu.idl:23
EwErrorCode setSeparator(VARIANT_BOOL bIsSeparator)
Set menu item as a separator.
BSTR getDescription(EwErrorCode *errorCode)
Return the description of this menu item.
EwErrorCode setCommand(BSTR strCommand)
Set the name of the command associated with this menu item.
EwErrorCode setCheck(VARIANT_BOOL bCheck)
Check or uncheck the menu item.
LONG getIndex(EwErrorCode *errorCode)
Return the index of the menu item.
IEwMenuItemX addMenuItem(EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode *errorCode)
Add a new sub menu item at the end of the menu.
UINT getMenuID()
Return the ID of the context menu.
EwErrorCode setIconFromImage(BSTR strImageFilePath, COLORREF crMask)
Add an icon from file.
EwErrorCode setShortcut(BSTR strShortcutText)
Set the shortcut string of the menu item.
IEwMenuItemX getMenuItemAt(int iIndex, EwErrorCode *errorCode)
Return the specified sub menu item of this menu item.
EwErrorCode setCaption(BSTR strCaption)
Set a new caption for this menu item.
EwErrorCode setEnabled(VARIANT_BOOL bEnabled)
Set whether the menu item is enabled.
BSTR getShortcut(EwErrorCode *errorCode)
Get the menu item's shortcut.
BSTR getCaption(EwErrorCode *errorCode)
Return the caption of this menu item.
BSTR getCommand(EwErrorCode *errorCode)
Return the text of parameter strCommand used when adding a menu item.
EwErrorCode setDescription(BSTR strDescription)
Set a description for this menu item.
VARIANT_BOOL isVisible(EwErrorCode *errorCode)
Determine if the menu item is visible.
VARIANT_BOOL hasSubMenu(EwErrorCode *errorCode)
Determine if the menu item has sub menu.
EwErrorCode setToolTip(BSTR strToolTip)
Set a new ToolTip for this menu item.
EwErrorCode setVisible(VARIANT_BOOL bShow)
Set whether the menu item is visible.
VARIANT_BOOL isSeparator(EwErrorCode *errorCode)
Determine if the menu item is a separator.
int getID()
Get the ID of menu item.
VARIANT_BOOL isEnabled(EwErrorCode *errorCode)
Determine if the menu item is enabled.
IEwMenuItemX addMenuItemAt(int iIndex, EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode *errorCode)
Add a new sub menu item at a specified position in the sub menu.
BSTR getToolTip(EwErrorCode *errorCode)
Return the ToolTip of this menu item.
EwErrorCode setStyle(EwMenuStyle eMenuStyle)
Set an IEwMenuStyle enum value that could be:
EwMenuStyle getStyle(EwErrorCode *errorCode)
Get an IEwMenuStyle enum value that could be:
VARIANT_BOOL getCheck(EwErrorCode *errorCode)
Determine if the menu item is checked.
Use this interface to manage an EwMenuManagerX object.
Definition: EwApplicationMenu.idl:522
VARIANT getMenuArray(EwErrorCode *errorCode)
Return the array of menu(s).
IEwMenuX getMenuByID(UINT iID, EwErrorCode *errorCode)
Get a menu by ID.
EwErrorCode removeAll()
Remove all menu.
EwErrorCode removeMenuByID(UINT iID)
Remove a menu by ID.
IEwMenuX addMenu(EwErrorCode *errorCode)
Add a new menu to the list of menu.
int getMenuCount(EwErrorCode *errorCode)
Return the number of menu(s) in the list.
Use this interface to manage an EwMenuX object.
Definition: EwApplicationMenu.idl:357
int getXPosition(EwErrorCode *errorCode)
Get the horizontal position in screen coordinates of the popup menu.
EwErrorCode showPopupMenu()
Display the popup menu at specified location defined by X & Y Position in screen coordinates.
IEwMenuItemX getMenuItemAt(int iIndex, EwErrorCode *errorCode)
Return the specified menu item of the menu.
UINT getID()
Get the ID of menu.
EwErrorCode removeAll()
Remove all menu items.
EwErrorCode setYPosition(int iYCoordinate)
Set the vertical position in screen coordinates of the top of the menu on the screen.
EwErrorCode removeMenuItemAt(int iIndex)
Remove a menu item specified by the index in the menu.
int getMenuItemCount(EwErrorCode *errorCode)
Return the number of menu item(s) in the menu.
IEwMenuItemX addMenuItemAt(int iIndex, EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode *errorCode)
Add a new menu item at a specified position in the menu.
IEwMenuItemX addMenuItem(EwMenuStyle eMenuStyle, BSTR strCommand, EwErrorCode *errorCode)
Add a new menu item at the end of the menu.
IEwMenuItemX getMenuItemByID(int iMenuItemID, EwErrorCode *errorCode)
Return the specified menu item of the menu by ID.
int getYPosition(EwErrorCode *errorCode)
Get the vertical position in screen coordinates of the top of the menu on the screen.
EwErrorCode setXPosition(int iXCoordinate)
Set the horizontal position in screen coordinates of the popup menu.


Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   SOLIDWORKS Electrical API: idl_converted/EwApplicationMenu.idl Source File
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:

x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2024 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.