|
The Managed DirectX 9 SDK is seperate from the DirectX 9 SDK. See here[^]. If installed correctly, the MDX9 assemblies will be added to the GAC.
#include "witty_sig.h"
|
|
|
|
|
For tutorials see an article called Managed DirectX Tutorial Part 2
This part talks about AudioPlayback and may be able to help you get started.
Kev Pearman MCP
|
|
|
|
|
id seen the tutorial but couldnt get it to run as i didnt have managed directx it would seem, but i cant find the download for managed direct x, anyone able to point me in the right place?
|
|
|
|
|
I just downloaded the latest version of directX from microsoft. In your project's you then have to add a reference to each DirectX Dll you are going to use.
Do a search on your machine for DirectX.dll and then add a reference to it (any other directx dll's should be in the same folder), this worked for me.
Kev Pearman MCP
|
|
|
|
|
i do this but i dont have any reference to audiovideo.
ive got latest directx runtime but oviously not managed?
|
|
|
|
|
Do you hve this folder
C:\WINNT\Microsoft.NET\Managed DirectX\v9.00.1126\
The version number at the end might be different.
If you don't then make sure you get the latest version of directX (230+mb i think) from Microsoft, thats the version i used.
In the folder v9.xx.xxxx\ you should find all the managed directx dll's that you need, including directx.dll and the audivideo dll that your after.
Kev Pearman MCP
|
|
|
|
|
no i dont have that, i looked for the latest dirext x all i could find was the new runtime, but looking at the latest SDK with teh runtime in its 230mb+ so i started to download that, is that what u meant?
its gona take me couple hrs on my partents con so ill post when its done
thx dudes
|
|
|
|
|
Thats the version i have installed. When you have installed it you should have the driectory i specified in the previous post with all your dll's in it.
Let me know how it goes.;)
Kev Pearman MCP
|
|
|
|
|
Thx dude yer its got what i need
|
|
|
|
|
Ok,
I am going to write a Wizard for a new project that I am doing at work. Depending on where you are in the Wizard the screen will have different controls. My problem is that if I re-use the same form I will have to change the size and mess around with the posision of controls..
My question is when creating a Wizard is it better to use more then one form or re-use the same Form and just re-size it as needed..
Thanks
Will
|
|
|
|
|
|
thank you very much for the quick reply. The link that you provided is great and I will be sure to take some notes from that. As always I try to do a little research before I do anything. I guess I will try to use the same form and just adjust it as I need to, not sure how that will look yet..
thanks again
Will
|
|
|
|
|
I would also study how current property sheets / wizards work in the Platform SDK. Both the Shell APIs and MFC contain implementations (MFC is most often a wrapper around the common APIs) of the property sheets and pages and offer good idea to implementing your own. For example, by simply setting a single variable your property sheet is not a wizard. Perhaps this isn't important to you, but what should be is the implementation.
Through interface support, the property sheet (hosts the tab control and buttons, or simply controls the paging of wizard pages) can determine whether a page should allow the user to go back or forward, or cancel, etc. In a property sheet, this wizard-like behavior often corresponds to the Apply button being enabled (i.e., data has changed to either Apply is enabled (for property sheets) or the Next button is enabled (data has been provided).
Even if you completely ignore the property sheet implementation, the power is still in the interface. Your wizard could accept an list or collection of Control , UserControl , or whatever basic class that implements a particular interface (for example, IWizardPage ), or simply an abstract class (for example, WizardPage ). The pages determine what buttons are enabled and how pages are cycled (depending on their own internal state). You don't really need to worry about resizing the dialog: always maintain a particular order of buttons. If a button is needed, squeeze the buttons down (like if no Next button is needed, a Back button may shift over to where the Next button is, and a Done button should replace a Next button on the final step. The recommended and consistent order of buttons is Back, Next/Finish, Cancel. Sometimes a Help button may be shoved way over to the left corner or be found in the far right after (in a LTR reading order) the Cancel button.
A good wizard control would also make it easy for pages to communicate by implementing a property bucket (a place where pages can store information used by other pages).
Again, many of these concepts are supported by the Shell API for property pages (the very ones you see in the file Properties dialog, etc.).
For a starting point, look-up IPropertyPage in the Platform SDK in the MSDN Library[^].
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Awsome.. thank you for the reply.
This wizard is being created to giude users throught the complex process of creating a Bill OF Material or Assembly.
I have a Windows Form all ready setup to allow for the basic functionality
Enter the Top Level Number
if Not Exists
Create New Part
else
Get the Parts Record Number
Add Components to the Bill Of Material by using a TreeView and Context Menu
Bill Of Material -- Component Status
Bill Of Material -- Component Effectivity
.... ect ..
I am just thinking that I would like the process to be more (hand held) then it is now. That is why I have choosen to create a Wizard type of interface. This way I can give a very easy to use Navigation system to get through the process..
well thank you again
Will
|
|
|
|
|
anyone know the easiest way to play a wav file with direct x maybe a link to a tutorial or summet?
|
|
|
|
|
Hi,
I need to hold a string, int and a boolean in a class or struct. However I want to override the ToString() method and use it in a listbox. As Listbox Items are objects if I use a struct a lot of boxing and unboxing will be involved.
As I only have 3 vairables and accessor methods plus ToString I swing towards a struct, but would a class be better to avoid all the boxing and unboxing operations?
Thanks.
|
|
|
|
|
How many properties you have and whether or not you override ToString should not be a deciding factory for using a struct or a class.
Here are some of the factors:- Will it be short-lived? (y: struct, n: class)
- Must the item be instantiated quickly (y: struct (alloc'd on the stack), n: class (alloc'd on the heap))
- Will a lot of boxing/unboxing be required? (y: class, n: struct - which you obviously already know)
- Are small in size (.NET Framework recommends 16 bytes) (y: struct, n: class)
This is by no means a comprehensive list, but it does contain the things you should consider. Both classes and struct can define fields, properties, and methods, and both can implement interfaces. Classes can extend another class and define events. Both can also contain nested types.
If you feel you'll incur a big performance penalty from boxing and unboxing, then use a class. But if your structs are seldomly accessed as struct (i.e., you read in a bunch of structs once and don't deal with them again in your ListView or whatever), then I wouldn't worry about it.
If you want to take advantage of the fact that structs can be destroyed and memory on the stack can be reused ASAP, I would use the disposable pattern and implement IDisposable on a class. While instantiate does take only slightly longer (negligible in most cases), it probably won't affect you any.
So, here are some of the things you have to ask yourself. You know the scenario so you're really the only one that can answer them. More information is needed in order for anyone that doesn't already understand your project to draw any decent conclusion.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I have a treeview which I'm loading with various types of nodes, some with long text strings. If the last node to be loaded has a long string, the treeview scrolls horizontally to the right, so you can't see any of the nodes.
Is there any way to scroll the treeview back to the left in code, or can you think of any other way around this situation?
Thanks,
---Selden McCabe
|
|
|
|
|
You need to P/Invoke SetScrollInfo (user32.dll) to set the scrollbar positon.
In case you need further assistance, please revert back.
Regards,
Jay.
|
|
|
|
|
I have a VSS setup project that will copy files into a remote web server location.
In the View/UI I added a textbox dialog for the 3 key folders that can be created. The first is the path to the server. default is C:\Inetpub\wwwroot\yourwebsitedir and what I typed in was D:\Junk. The variable name (Property Name) was WEBSITEDIR.
In my View..FileSystem my ApplicationFolder is set to the property of [WEBSITEDIR] so it should pick up whatever is typed into the box.
When I type in D:\Junk and then do the setup, all files get sent to the C:\... directory instead of the overridden name (D:\Junk). I am stumped and cannot figure out why it is not setting the property to the new EditValue.
|
|
|
|
|
Hi all,
I got a problem with Return key in my C++/C# application.
On CView dilalog I put my C# control. This C# control has couple
other controls nested. I have problem with RichTextBox control which
is at the bottom of my control hierarchy. It does not process
VK_RETURN key down. So I can not create new line. All other keys work
in RichTextBox. Of course I made it Multiline. I used Spy++ tool to
figure out what is going on. I managed to see that RichTextBox window
receives ON_KEYDOWN message with VK_RETURN. But there is no WM_CHAR message which normally should follow WM_KEYDOWN. As a result no new line is created in RichTextBox.
Tried to catch WM_KEYDOWN in WndProc and OnKeyDown. But they are hit for all keys except of RETURN
I would greatly appreciate any hints.
Thanks in advance,
Roman
Roman
|
|
|
|
|
I over came this problem by using the ASCII value for the return key (13). Here's how it works in code:
<br />
private void YouCallBackMethod(object sender, System.Windows.Forms.KeyPressEventArgs e)<br />
{<br />
if (e.KeyChar == (char)13)<br />
{<br />
}<br />
else<br />
{<br />
}<br />
}<br />
Hope this helped...
|
|
|
|
|
Peter Vertes wrote:
if (e.KeyChar == (char)13)
You could also do the following:
if(e.KeyChar == Keys.Return)
- Nick Parker My Blog | My Articles
|
|
|
|
|
Thanks guys for the reply.
But my problem is a little deeper.
I can't hit WndProc or OnKeyPressed method at all when I press Return.
For other keys I can hit methods. Of course everething works fine if I put .Net control on c# Windows.Form. But if I reside .Net control on C++ CView form something goes wrong. System messaging works differently in these two cases. In Spy++ I can see that C# RichTextbox got message WM_KEYDOWN for VK_RETURN and then WM_KEYUP.
Normally WM_CHAR should follow WM_KEYDOWN which I can see when work in C# environment. Looks like ::TranslateMessage(msg) failed.
Roman
|
|
|
|
|
Is it a CFormView ? CFormView calls IsDialogMessage , which assumes that you're trying to press the default button on the form, or raises WM_COMMAND for IDOK if there is no default.
IsDialogMessage first probes the control with focus to see if it wants to handle this character. It does this by sending the control the WM_GETDLGCODE message. IIRC, the control has to return a code including the flag DLGC_WANTALLKEYS or DLGC_WANTMESSAGE in order to swallow the RETURN keypress. You'll need to experiment a little.
In your C# code, you'll probably have to override WndProc . The reason it works on a C# form is that the C# form manager doesn't use the pre-existing Windows dialog manager code - it's a new implementation.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|