12 December 2007 | |
![]() |
|
Expert
portfolio
kenneth turner
Animation supervisor
Freelance
Oxford,
United Kingdom
|
easy way to get listview subitem
I been updating my code to use dotNet, and found an easy way to get the index of the subitem clicked
|
12 December 2007 | |
![]() |
|
Earthling
portfolio
Alex Budovski
Australia
|
Do you mean the documentation for the library? If so, I'm pretty sure either the Platform SDK or the .NET SDK docs come with it. I think the .NET SDK actually comes with the platform SDK, so if you get that, you should get a local copy of all the docs.
(The Platform SDK actually got renamed to Windows SDK recently, so check either search term if you don't find it) RustyKnight, uploading it is a bit big ain't it? 600 or so MB? __________________
|
12 December 2007 | |
![]() |
|
R&D/Technical Director
portfolio
Paul Neale
PEN Productions
Canada
|
K another one that I cant sus out from MSDN, "system.dateTime" I want to be able to create a date time of my choosing.
I can use it to get the .now property but I want to set a dateTime from string values that I have. I would like to build it with year, month, day, hour, min, sec values. Any idea on how I go about that? |
12 December 2007 | |
![]() |
|
Lord of the posts
portfolio
Yannick Puech
Software Engineer
Solid Angle SL
Madrid,
España
|
Originally Posted by PEN:
K another one that I cant sus out from MSDN, "system.dateTime" I want to be able to create a date time of my choosing.
I can use it to get the .now property but I want to set a dateTime from string values that I have. I would like to build it with year, month, day, hour, min, sec values. Any idea on how I go about that? Take a look at all the constructors available for a DateTime value at http://msdn2.microsoft.com/en-us/li...ime(VS.80).aspx. You can build your own date value from these methods. For example, this example uses the constructor DateTime (Int32, Int32, Int32) (year/month/day):
__________________
Last edited by ypuech : 12 December 2007 at 10:20 PM. |
12 December 2007 | |
![]() |
|
Lord of the posts
Shane Whitehead
Technical Artest/Sys Admin/Tools Developer
01 Animation
Frankston,
Australia
|
Originally Posted by PEN:
K another one that I cant sus out from MSDN, "system.dateTime" I want to be able to create a date time of my choosing.
Hi Pen!I can use it to get the .now property but I want to set a dateTime from string values that I have. I would like to build it with year, month, day, hour, min, sec values. Any idea on how I go about that? The typical method I would use would be to parse the string to a date value...obviously, the question is how. I had a quick look at System.DateTime and found a number of parse methods. Unfourtantly, I don't know how to call static methods from inside max, so I took a look at the constructor values. I found the following constructor that would suit your needs:
Quote:
DateTime(year, month, day, hour, minute, second)
And the test code...
Shane __________________
If it's worth doing, it's worth scripting Don't wish for this to be eaiser, wish for you to better |
12 December 2007 | |
![]() |
|
Lord of the posts
portfolio
Yannick Puech
Software Engineer
Solid Angle SL
Madrid,
España
|
Originally Posted by RustyKnight:
I had a quick look at System.DateTime and found a number of parse methods.
Unfourtantly, I don't know how to call static methods from inside max. The Parse static method (http://msdn2.microsoft.com/en-us/li...d40(VS.80).aspx ) from DateTime can be used like that:
I used "8/03/1972 6:30:00 PM" to reverse the date creation from the previous example. __________________
|
12 December 2007 | |
![]() |
|
Lord of the posts
Shane Whitehead
Technical Artest/Sys Admin/Tools Developer
01 Animation
Frankston,
Australia
|
Originally Posted by ypuech:
The Parse static method (http://msdn2.microsoft.com/en-us/library/1k1skd40(VS.80).aspx ) from DateTime can be used like that:
DotNetClass!!! *smacks head against brick wall*
I used "8/03/1972 6:30:00 PM" to reverse the date creation from the previous example. So bloody obvious!! I'm so jelious, you guys get to play with the good stuff. I'm stuck sitting between max 8 and max 9 (32 & 64) and it is driving me crazy... max 8-9 (32) will talk to activex, max9 (32) and max 9 (64) will talk to dotnet but I need to bridge across max 8 to max 9 (64)...I want to die note - max9 (64) will talk to activex, but windows 64 does not, by default, seem to include the all important listview control...on our installs any way... I'm so annoyed I'm even thinking of developing a com server to do my UI work instead...but I think that is just a little over the edge __________________
If it's worth doing, it's worth scripting Don't wish for this to be eaiser, wish for you to better |
12 December 2007 | |
![]() |
|
Earthling
portfolio
Alex Budovski
Australia
|
Originally Posted by RustyKnight:
I'm so annoyed I'm even thinking of developing a com server to do my UI work instead...but I think that is just a little over the edge
Why not just code your UI in Win32 or MFC? That'll save you from doing that, and lets you use all the UI stuff you want. __________________
|
12 December 2007 | |
![]() |
|
R&D/Technical Director
portfolio
Paul Neale
PEN Productions
Canada
|
Thanks guys, I was so close, I kept trying to pass in the date values in an array as that is what is looked like it wanted. I should have looked closer as I do know that is how you pass values to function in other languages ie;(val,val,val) I should have guessed it was just the same as passing values to a function in Max. As for the parse method that might work for me as well. I'm slowely building up a list of dotNet controls in a Doc and will format them with small help tid bits at some point and post it all on my site. I have worked a great deal with XML, listview and treeviews at this point as well as several others.
|
12 December 2007 | |
![]() |
|
R&D/Technical Director
portfolio
Paul Neale
PEN Productions
Canada
|
Originally Posted by scorpion007:
Why not just code your UI in Win32 or MFC? That'll save you from doing that, and lets you use all the UI stuff you want.
How is this done? |
12 December 2007 | |
![]() |
|
R&D/Technical Director
portfolio
Paul Neale
PEN Productions
Canada
|
Yep, dotNetClass got me, it is dotNetObject, that is another reason that I wasn't even getting close.
|
12 December 2007 | |
![]() |
|
Earthling
portfolio
Alex Budovski
Australia
|
Well, simply put, Win32 is the fundamental C API for the windows platform.
.NET stuff (and MFC) is just a wrapper around it, in a higher level language. If Max8 for example doesn't expose some .NET stuff that you need (RustyKnight mentioned a ListView), you can code it using the Win32 API. (MFC is fine apparently, but I don't have experience with it). BTW, MFC is basically a C++ wrapper around Win32 C API. In other words, Win32 can do *everything*, MFC can do *most* stuff, and the stuff it can't you, you can fall-back to Win32. .NET can do whatever things that got implemented in it, provided Max lets you use them, but I don't have any experience with it either. To answer "How to use Win32 API, and the ListView custom control", you'll need some preliminary knowledge with C, and some time to read a Win32 book. I'm not saying you 'should' do it, you may not need to -- if you already know .NET and you can use the ListView, and you're happy with it, great. But if you can't for whatever reason, like what RustyKnight mentioned, you could definitely use Win32 code. PS. I purposely didn't go into too much detail about the "How", because I don't want to overload you with low level details if you're not interested, or don't have the prerequisite knowledge. If you want more details, then let me know. __________________
|
12 December 2007 | |
![]() |
|
R&D/Technical Director
portfolio
Paul Neale
PEN Productions
Canada
|
That is great, just what I was looking for. I don't know C but I have worked with C++. Just wonder where you were going with it. dotNet so far has worked well in Mxs and I'm able to do most of what I would like so far.
|
12 December 2007 | |
![]() |
|
Lord of the posts
Shane Whitehead
Technical Artest/Sys Admin/Tools Developer
01 Animation
Frankston,
Australia
|
Originally Posted by scorpion007:
Well, simply put, Win32 is the fundamental C API for the windows platform.
I think the intention is to develope a cross platform API ... so you could walk from max 8 through max 9 (32 & 64) without tearing you hair out or kill any junior artiests....NET stuff (and MFC) is just a wrapper around it, in a higher level language. If Max8 for example doesn't expose some .NET stuff that you need (RustyKnight mentioned a ListView), you can code it using the Win32 API. (MFC is fine apparently, but I don't have experience with it). BTW, MFC is basically a C++ wrapper around Win32 C API. In other words, Win32 can do *everything*, MFC can do *most* stuff, and the stuff it can't you, you can fall-back to Win32. .NET can do whatever things that got implemented in it, provided Max lets you use them, but I don't have any experience with it either. To answer "How to use Win32 API, and the ListView custom control", you'll need some preliminary knowledge with C, and some time to read a Win32 book. I'm not saying you 'should' do it, you may not need to -- if you already know .NET and you can use the ListView, and you're happy with it, great. But if you can't for whatever reason, like what RustyKnight mentioned, you could definitely use Win32 code. PS. I purposely didn't go into too much detail about the "How", because I don't want to overload you with low level details if you're not interested, or don't have the prerequisite knowledge. If you want more details, then let me know. Would you need to code it as a plugin or can you incorprate these controls directly into max script? I've been working on an idea to use the com functionality of max to setup a server and pass and xml based document between max and my app...this would allow me to do alot of the ui outside of max (and get some OO going), while still getting access to the internals of max. This is obviously for "large" scale apps, not simple ones... __________________
If it's worth doing, it's worth scripting Don't wish for this to be eaiser, wish for you to better |
01 January 2008 | |
![]() |
|
Jack of All Trades
Kevin Mackey
Arlington Hts,
USA
|
Okay, I'm not sure if the problem I am having is DotNet related or not, but it deals with the "Converting ActiveX ... to DotNet ..." tutorials files. Forgive me if the answer is obvious, I am still very new to this stuff. (Thanks Bobo, PEN, RustyKnight for getting me this far).
I am basically creating a split screen that shows a TreeView of objects and modifiers on one side, and a ListView of properties on the other. What I am stuck on is getting properties to update in the ListView from the scene. The code I have so far looks like this:
Of course any general advice is appreciated, but I am trying to focus on one thing at a time until I get this working properly ![]() |
reply share thread |
«
Previous Thread
|
Next Thread
»
|
|
|