Re: custom menu tear off?
| Date : Tue, 4 Apr 2006 13:13:42 +0200 |
| To : XSI(at)Softimage.COM |
| From : "Reinhard Claus" <rclaus(at)gmail.com> |
| Subject : Re: custom menu tear off? |
here's something I recently put together... To make it contextual you could use something like the following ('pseudocode'):
if selection(0) <> nothing
d = DisplayPopup("Copy selection;Cut selection;Duplicate Selection;---;Exit XSI");
if d==1 then
selection.cut(....);
else if d==2 ...
........
else
d = DisplayPopup("Paste;---;Exit XSI");
if d==1 then
selection.paste(.....)
... etc
end ifownloadable at http://www.nycg.org/xpop.htm
rr
On 11/30/05, Juan Brockhaus <Juan(at)glassworks.co.uk> wrote:
Hi,thanks, but my c++ knowledge isn't that advanced... still with jscript. will have a look at it, though.I was hopoing there's a parameter in the RegisterMenu-Command which I probably missed.REQUEST:- parameter for tear off in the RegisterMenu-Command- add anchorpoints to be able to register menus in the right menu bars (Select, Edit, Transform, etc.Juan-----Original Message-----
From: Andrea Padovan [mailto:xsi(at)fastwebnet.it]
Sent: 30 November 2005 02:25
To: XSI(at)Softimage.COM
Subject: Re: custom menu tear off?Hi Juan,If your goal is to create your custom contextual menu inside XSI, it is very simple with C++.#include <windows.h>HINSTANCE __g__hInstance = NULL;BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}__g__hInstance = (HINSTANCE)hModule;
return TRUE;
}// Command_ExecuteApplication app;POINT GlobalMousePosition;
GetCursorPos(&GlobalMousePosition);HMENU MyMenu = CreatePopupMenu();
AppendMenu(MyMenu,MF_STRING,0,"Item zero");
AppendMenu(MyMenu,MF_STRING,1,"Item one");
AppendMenu(MyMenu,MF_STRING,2,"Item two");SetMenu((HWND)__g__hInstance,MyMenu);int retval = TrackPopupMenuEx( MyMenu,
TPM_RETURNCMD,
GlobalMousePosition.x,
GlobalMousePosition.y,
GetForegroundWindow(),NULL);app.LogMessage(L"Global Cursor Position : ");
app.LogMessage(CValue(GlobalMousePosition.x).GetAsText());
app.LogMessage(CValue(GlobalMousePosition.y).GetAsText());app.LogMessage(L"Returned Value : " + CValue((long)retval).GetAsText() );And you could call command for to show menu...I don't Know in linux.アンドレア パドヴァン
Andrea Padovan
Tool Designer (at)
SEGA CORPORATION
AM R&D Dept.#1 Arcade Team
AM R&D Div.
http://www.sega.co.jp/
Blr. Founder
http://www.borderliner.it
Actually located in Tokyo Japan----- Original Message -----From: "Juan Brockhaus" <Juan(at)glassworks.co.uk >To: <XSI(at)Softimage.COM >Sent: Tuesday, November 29, 2005 9:23 PMSubject: custom menu tear off?> Hi,
>
> probably this was asked before, but is it possible to create your custom
> menus as tear off menus?
> couldn't find it in the manuals.
> ...and it's still not possible to embed them into the right menus like edit,
> select, etc...?
>
> thanks,
>
> Juan
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: (*.hdr) environment shader questions
- Next by Date: (*.hdr) environment shader questions
- Previous by Thread: (*.hdr) environment shader questions
- Next by Thread: (*.hdr) environment shader questions
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |