roychoo's Q&A profile
Visual C++ Converting System::String to LPCWSTR
I've been looking for a long time as to how to solve this, and eventually just thought I'd ask. I've been told of A2W, which apparently cannot convert from System::String (so says the compiler error), I've tried converting to a wchar_t first, but the method won't accept it, and I'm running out of luck. Here's what my code looks like now. pin_ptr<const wchar_t> wch = PtrToStringChars(fileName); IAVIFile *aviMedia = NULL; IAVIStream *aviStream = NULL; AVISTREAMINFO *aviSInfo = NULL; AVIFILEINFO aviFInfo; LONG bufferSize = NULL; DWORD length = NULL; wchar_t wcFileLoc; Single vidLength; AVIFileInit(); wcFi ...Show All
Game Technologies: DirectX, XNA, XACT, etc. TargetElapsedTime and Animated Sprites
So I'm looking at the help on Animate a Sprite. It suggests using TargetElapsedTime to set the rate the animation frames play back. Say I have an explosion that is 6 frames and I want them to play back at 4 fps. Well if I set TargetElapsedTime that slows the entire game world down to 4 fps. How do I go about keeping the Game running at the default of 60 fps but my animation running at 4 fps The obvious way is to roll your own solution using elapsed time in the update but then why does the tutorial want you to use TargetElapsedTime I keep feeling like I'm missing something obvious. Thanks for any help. Here is my modified solution but I still keep thinking the help file is trying to get me to do this in a ...Show All
Visual Studio Express Editions form load event
How do i trigger the form load event I want users to click a button and the program runs as if loading for the first time. Thanks tall dude, you're right. I'd reset all my variables & text with a few lines of code as a solution anyway. I'll try your suggestion next time. ...Show All
Visual Basic Reading Bits
I am pulling an 'int' data type out of SQL Server with a length of '4' which I want to read the bits. I have no clue on where to start on this as far as declarations or methods to use...I need to be able to read each bits to see whether it is set or not. Possibly the easiest way I see is to store each byte as an array of bits so then I could just loop through and do my comparisons. I do not need to write, just read. Thanks a ton! EDIT Sry - I screwed up trying the example - It does give a list of boolean values representing the 1s and 0s. I've been looking at this for a while and haven't found any built-in methods for doing this. Most methods that refe ...Show All
Community Chat FAT32? I ish not happy.....
Hello, When my computer turnes on,the screen comes up, and it tells me something about the file, 'FAT32'. I've never heard of it, can anybody tell me whats on this file Thank you, Furby This is not the place to ask such questions...try: http://www.google.com/search hl=en&q=fat32&btnG=Google+Search ...Show All
Windows Forms Explorer file cut/copy and Forms::Clipboard
Any idea how to determine which option was used by user (cut/copy) when I'm getting file list from clipboard: for ( int i=0;i<Clipboard::GetFileDropList()->Count;i++){ MessageBox::Show((String^)Clipboard::GetFileDropList()[ i ]); } This worked well: private void button1_Click(object sender, EventArgs e) { if (!Clipboard.GetDataObject().GetDataPresent("Preferred Dropeffect")) Console.WriteLine("No shell data present"); else { System.IO.Stream strm = (System.IO.Stream)Clipboard.GetData("Preferred Dropeffect"); DragDropEffects value = (DragDropEffects)strm.ReadByte(); if ((value & DragDropEffects.Move) == DragDropEffects.Move) Con ...Show All
Visual C++ TTN_NEEDTEXT notification
I have a class derived from CFrameWnd that calls an update command. It seems that this command(since it is continually being called) is overiding the tooltip notification because when I hover over this toolbar button the tooltip is not displayed but they are displayed for all my other buttons. Is their a way around this Hello Re: TTN_NEEDTEXT notification Such questions are outside the scope of this forum (hence why you are not getting any replies) - for the scope of the VC General forum please look at: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=19445&SiteID=1 The more appropriate place for your question is probably the MFC newsgroup: http://msdn.micros ...Show All
Visual Studio Team System Can I install TFS on my local PC?
Before installing TFS on our server, I wanted to play around with it. Since we don't have an alternate server, can I install TFS on my local PC Or, are there such pre-requisites that must be installed that it's not a good idea Thanks, Ron You need to have a Windows 2003 Server box, IIS 6.0 installed, Windows Sharepoint v 2.0, SQL Server 2005 AND at least 1 GB or RAM (2 GB would be much better). ...Show All
Software Development for Windows Vista frame grabbing via directShow for windows mobile
Can anyone tell me what directShow filter would help me grab frames from a video being captured by a phone camera I use the windows mobile for pocket PC SDK for development. I heard that SampleGrabber is the standard filter used but I cannot find it in the above SDK. Is there an alternative someone has provided this on the net. It seems to be a template which can create a transform filter. But how can I retreive the frame buffer from the filter-graph into my application http://www.ifp.uiuc.edu/~chenyq/research/Utils/DShowFilterWiz/DShowFilterWiz.html ...Show All
Commerce Server CS Authentication Global Resource - Not Required?
Is the "CS Authentication" global resource required when unpacking the CSharp.pup or can we do without this if we are using the new UpmMembershipProvider Hey Jeff, As far as I can tell the CommerceDataWarehouseAuthenticationModule and CommerceDataWarehouseAuthenticationModule still declare a dependency on it. As such if you are using those modules you will likely find a need to deploy it. I haven't seen any need for it with the UpmMembershipProvider to this point. Cheers, Colin ...Show All
Visual C++ Question. Need help.
I have been learning c++ so sooner or later i can learn to program with opengl. I have been learning how to program in c++ from 3dbuzz but I am a little confused. I don't quite understand pointers and I can't figure out how to override operators. Can someone show me example of how to override a operator #include<iostream> using namespace std; main() { /* I kind of know that *Two means it's A operator but don't understand the &, I think It is the memory address but not sure if i'm right */ char One = '1'; char *Two = &One; *Two = '2'; /* Is there a way to print a pointer out The part I really dont get is what is Two with out the * */ cout <&l ...Show All
Visual C# Types and Variables
Is it possible to make a Type into a Variable You must use Combox1 or the name of the variable ... not But is a string property, must return a string. Regards. ...Show All
Software Development for Windows Vista Unresponsive main window during RenderFile
Hello all, I am trying to develop a simple windows media player application. I am able to display the video onto a window that i created. I am unable to control the window (to minimize, maximize, close or move) when a file is playing. However I am able to do the same after the file has stopped playing. Could anybody point to where i am missing anything. Please refer the code below. Thanks and reagrds, Bala #include <dshow.h> #define WM_FGNOTIFY WM_USER+1 char szWinNamw[] = "My Window"; MSG msg; HWND hMainWindow; IGraphBuilder * pGraph = NULL; IMediaControl * pControl = NULL; IMediaEvent * pEvent = NULL; IVideoWindow * pVidWin = NULL; LRESULT CALLBACK WindowFunc(HWND, UINT, WPARAM, LPARAM); DWORD WINAP ...Show All
Visual Studio Tools for Office How to put new column into generated Listobject column
Hi, I got some serious problem stated following: Suppose I have Listobject bound with data and shown in excelsheet as: Col1 Col2 Col3 Col4 Col5 Col6 Col7 Here Col1, Col2,....... Col7 are generated columns into Listobject. Now I want to put two more columns (not generated automatically) into above excelsheet, so that now my above listobject has following columns: Col1 Col2 Col3 Col_new1 Col4 Col_new2 Col5 Col6 Col7 How can I make it possible. Thank you Prashant, To add new non-databound columns through code, you can change the SetDataBinding method call. The last parameter to this method is an array of mapped columns. In this array, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. When will the Content Pipeline be released?
Can any XNA insider tell me the date the content pipeline released or when will the next version XNA GSE be released I think this would be a disaster for the content pipeline since everyone really interested in this will have to build it's own pipeline by then. I would say releasing it within weeks would be ok. But not releasing until christmas will make at least me to go back to my old 3D engine with all this implemented. Not managed in C++ and with all the other problems. But with a working pipeline. ...Show All
