|
Thank you!!!
That does exactly what I need.
|
|
|
|
|
You're asking for two different things there. I take "startup folder" to mean the "current directory" of the process, which doesn't have to be the same as the dir where the EXE is. If you want the current directory, call GetCurrentDirectory() .
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
|
I develope a DLL that is loaded with every instance of Internet Explorer. In the DLL, I want to handle something like "BeforeNavigate" event to get the URL user enter in the Adress Bar.
I've written this DLL before in C#. And in C#, handle this event is quite easy, just write something like:
WebBrowser browser;
browser.BeforeNavigate2 += new DWebBrowserEvents2_BeforeNavigate2EventHandle(this.BeforeNavigate);
But now, I have to write it in Visual C++ 6.0. How can I handle this event in Visual C++ 6.0?
Hope to see your replies soon.
Thanks.
|
|
|
|
|
|
Hi,
I have a windows which accepts file names being dragged in (Drag AcceptFiles, OnDropFile..).
Everything works as intended when a file name is dropped from the explorer window or another window which has list of files/folders. However, when the user drags an image from a website, or an attachment from an e-mail and drops it on the Window, OnDropFile is called and a temporary folder/file name is given to the window. I need to recognize when this happens and alert the user - how can I recognize the folder as a temporary one - The location of the TEMP folder is dependent on the OS, but also seems to depend on the application - e.g. Outlook has its own temp folder, the browser uses another etc.
Thanks in advance for any help
|
|
|
|
|
I am not sure there is ANY way to tell whatsoever, but a first good guess, assuming an application followed the proper API would be to call GetFileAttributes and check for this bit set : FILE_ATTRIBUTE_TEMPORARY
Now, granted, I have never checked for this bit, and it would be curious to see if any 'temporary' files actually have it set or not.
|
|
|
|
|
Thanks.
I will try and see what I find.
|
|
|
|
|
I've downloaded and made the lib files of the CxImage library but I can't seem to make it work. I put the .lib in the object/library modules of the link tab in the general and input category but it still doesn't recognise the the CxImage object. Can anyone help me?
Should I write anything else in the code?
|
|
|
|
|
Why do you ask this here? CxImage has it's own article forum for these questions.
Don't try it, just do it!
|
|
|
|
|
Hi Friends
I am developing an application in VC++,wherein i want that if the system remains idle for an X amount of time then some event should be generated
But for that can somebody help me in knowing how to trap System idle time IN MFC
Thanks in Advance
VC++
|
|
|
|
|
Check out GetLastInputInfo() . There's also the idle triggers when working with scheduled tasks.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
You could retrieve the cpu times with a timer function and check what percentage of the increment was for the idle process.
The API for NT/2k/XP is NtQuerySystemInformation.
Don't try it, just do it!
|
|
|
|
|
I have got an application, which changes the resolution of the computer(may sound like spyware etc... but it's just used internally).
The problem is that the Taskbar keeps flowing around in the middle of the screen. Is there any way to get a handle to the taskbar.
With Spy++ I found out that the WndClass is "Shell_TrayWnd". Does this help ?
As I said.. it's no adware / spyware or something I like that.. I hate those programs like we all do.
All the label says is that this stuff contains chemicals "... known to the State of California to cause cancer in rats and low-income test subjects." Roger Wright http://www.codeproject.com/lounge.asp?select=965687&exp=5&fr=1#xx965687xx
|
|
|
|
|
Use FindWindow() or FindWindowEx() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
HWND hTB = ::FindWindow("Shell_TrayWnd", NULL);
SkyWalker
|
|
|
|
|
I want to capture video frames that is played by
Mediaplayer or other players.
Can anyone tell me how to do?
|
|
|
|
|
MCI_CAPTURE - use this command in the mciSendCommand()
this may help. just try that.
Zxczc
|
|
|
|
|
Hi all,
I have a written a DLL that, during initialization, creates an instance of a dialog class derived from CDialog. This dialog contains a third party ActiveX control. If the DLL is loaded by an application, the creation of the dialog instance fails during the CDialog::Create method. If I remove the third party ActiveX from the dialog, everything is fine.
But, when I include the same ActiveX control into a dialog that is used in an application based on CWinApp rather than in a dll, it works perfectly well.
Any ideas?
|
|
|
|
|
Maybe you forgot OleInitialize()
SkyWalker
|
|
|
|
|
That is dangerous because in a DLL, you have no control over what type of apartment your code runs in. AX controls are apartment-threaded, so if the calling thread is in a MTA, or never called CoInitialize() at all, you're SOL.
See this post[^] for more info.
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Hi I am Mani Rajesh Kumar, working as Software Developer. I am currently developing an Image Processing Application
which deals with Large Amount of Data. I require as much as 2.5 GB of memory for my application. My System Configuration is
Microsoft Windows XP with Service Pack 1, 32Bit 2 GB RAM.
As we know By default OS allocates 2 GB memory for any single application.
I would like to know how to increase these 2 GB to 2.5 GB for a
single application.
|
|
|
|
|
In theory, the most an application could get from the heap is 2GB. But since it is highly unliklely that 2GB of contiguous RAM is available, the practical limit will be much lower. Certain OSs support a /3GB startup parameter, but even then there would need to be 2.5GB of contiguous RAM available. Why do you need so much all at once?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
What about virtual memory? Although it would involve heavy thrashing, it is possible to allocate upto 2 GB without having that much RAM with the help of virtual memory. I think the 2 GB limit is because of the size limitation of some internal data structures in the OS.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hopefully these few sites can help to clear this up:
http://blogs.msdn.com/oldnewthing/archive/2004/08/10/211890.aspx
http://www.brianmadden.com/content/content.asp?ID=69
http://blogs.msdn.com/oldnewthing/archive/2004/08/05/208908.aspx
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|