PDA

View Full Version : User interface questions (SDK)


SyncViewS
02-28-2009, 11:09 AM
Hi guys,
I'm working on the interface of a plug-in written with the SDK, and I'm trying to reproduce some MaxScript features, but cannot find how.

Modeless Dialog: I'd like to know how to create a modeless dialog. I tried "DialogBoxParam", which works but creates a modal one; and "CreateDialogParam", taking exactly the same parameters, but doesn't seem to work at all.

Docking Dialog: I've searched the "Custom User Interface Controls" and "CUIFrameMgr Class Reference" and how to create CUIFrames, attaching Toolbars and dock them, but I cannot figure how, assuming it is possible, to dock a Dialog Box.

Plugin Type: I'd like to make a plugin which is accessible even if no dialogs are shown. Is it right to create a "Utility Plugin" or should I go for a "Global Utility Plugin (GUP)"?

Mixed Code: If I cannot get a docking Dialog with SDK, is it so bad to generate all the plug-in structure in C++ and build the interface in MaxScript? Is it a mess? (Event handling seems easier too).

Thank you very much for any hint.

- Enrico

SyncViewS
02-28-2009, 02:44 PM
Modeless Dialog: Solved. I managed how to create the modeless dialog. I was simply missing to set the Dialog Template "Behavior: Visible = True" in the Resource View. It was not mandatory for a Modal Dialog, but it is so for a Modeless.

The working function to create modeless dialogs is:HWND CreateDialogParam(
HINSTANCE hInstance, // handle to application instance
LPCTSTR lpTemplateName, // identifies dialog box template
HWND hWndParent, // handle to owner window
DLGPROC lpDialogFunc, // pointer to dialog box procedure
LPARAM dwInitParam // initialization value
);- Enrico

JHN
03-01-2009, 01:29 PM
I am by far a programmer, but If I could I would build my plugins as libraries (gup I think) and build a maxscript frontend for it. I believe that's how frantic and thus Bobo does it, puppetshop same deal. That way you allow your tool to be pretty flexible and customizable. But again I haven't done any SDK (yet) so don't take my word for it!

-Johan

p.s. so will you be publishing a SDK newbie tutorial ;)

ZeBoxx2
03-01-2009, 03:18 PM
semi on-topic...

On ADN, there's a new video that is an introduction to the SDK that might be of interest. I realize not everybody is on ADN (and I do wish ADSK would make more of the material therein public), but you might have somebody in your area that is.

Polimeno
03-01-2009, 03:42 PM
On ADN, there's a new video that is an introduction to the SDK that might be of interest


sounds good, can you post the link, please ?

SyncViewS
03-01-2009, 04:16 PM
@ Johan: Thanks for the hint, I'm still analyzing what's the best option, it is not an impending issue yet, since I got bigger questions marks to answer to. I'd like to keep everything in C++, but I'm not an integralist, if there's a way to achieve the same result in a shorter amount of time and sweat, I'm for it. Even if it seems a little futile starting from the interface, I think it's an important key to succeed. Don't want to reach the point where I find what I like cannot be done, and don't want to build a good engine surrounded by a crappy car, who would buy it? (btw I'm not a programmer either :) ).
About the SDK newbie tutorial, I've been working on it for a while, but is far from being ready, it is an introduction to dlx programming, covering all the details which drove me crazy for about two weeks before having something working. It's on standby right now, since by reading Christopher Diggins (http://area.autodesk.com/index.php/blogs_rick/blog_detail/welcome_to_the_3ds_max_sdk_blog/)' post in the Area forum, it seems he's working on the same matter for the upcoming SDK documentation, and for sure he can do much better than me.

@ Richard: Thanks for the tip, but unfortunately I can't get access to it, and sadly I don't know anyone in my area using 3ds for something more than Arch & Design rendering. :sad:

Docking Dialog: Update. I figured out it's not possible to dock a standard Dialog Box, either modal or modeless. Docking isn't a win32 api feature and must be implemented by the software. 3ds Max does this job with CUIFrames which are special windows, placeholders for toolbars, menus and "generic windows". So the deal is to create a CUIFrame, which is dockable per se, insert a RollupWindow in it, which appears much like a MaxScript subRollout, and then append a Rollup (represented by a child dialog) to it, which is similar to adding a rollout to a subRollout. The RollupWindow takes care of scrolling if the Rollup is too long to fit. I'll post some working code as soon as I have something a little cleaner and understandable.

- Enrico

ZeBoxx2
03-01-2009, 04:44 PM
sounds good, can you post the link, please ?

sure:

DevTV: An Introduction to the 3ds Max SDK

Into The Vortex: A Whirlwind Guide to the 3ds Max SDK (1h, 20min)

http://adnsparks.autodesk.com/adn/servlet/item?siteID=6681818&id=12110378&linkID=6927897
Remember, you'll need an ADN (Sparks) login to get to it.

CGTalk Moderation
03-01-2009, 04:44 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.