|
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
|
|
|
|
|
You don't need that much contiguous RAM because the OS does distribute the data using the CPU's paging system. That means that e.g. 100MB of virtual contiguous memory doesn't have to be contiguous in physical memory. That is also a problem for hardware (especially DMA hardware)... see Scatter/Gather.
@manirajesh: Use /3GB as parameter for windows startup (boot.ini), that will enlarge the maximum user-mode memory to 3GB and decrease the max. kernel-mode memory to 1GB.
Don't try it, just do it!
|
|
|
|
|
|
Hi can any one tell me why raw_Login is returning error code to HRESUKT handle.
virtual HRESULT __stdcall raw_Login (
BSTR strUID,
BSTR strPassword,
BSTR strEnviornment,
BSTR strRole,
long * accessNumber ) = 0;
|
|
|
|
|
|
The com component has been initalised and raw_login function in part of IConnector : IDispatch interface
|
|
|
|
|
|
HI ,
I was just trying to create a tool box application but suddenly realised that i have no ideahow to go about doing it.
If somebody could guide me how i can go about implementing it I would be very happy to learn and try it out.
I also wanted to know...
supposing i have a dialogue based application where when i click on a particular choice it should exute some exe.
something like if i click on an option from a list it should execute some application.
how can i do tht in MFC
I know how to write the onselect part. wht should i write inside tht func n how is wht i wanted to know.
Thanks.
U get wht u Give
|
|
|
|
|
If you want to start an executable (or open a file) use this
<br />
HINSTANCE nResult = ::ShellExecute(NULL,_T("open"),strPath,strParameters,NULL, SW_SHOW );<br />
where strPath is your document or the path of your executable
and strPath are the parameters you may want to send to your executable.
|
|
|
|
|
Hi , can anybody give me a little explanation on what things like : 0x0001,0x48,0xFF,...... mean?
m0n0
|
|
|
|
|
This means you are in base 16 : it goes like this 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,10,11,12,...
so A actually means 10
0x10 means: 1 * 16 + 0 = 16
0xFF means: 15*16 + 15 = 255
...
The reason hexadecimal is used is because 16 is a power of 2, so it is extremely easy to transform hexadecimal numbers into binary (and computers kinda like binary)
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111
Therefore let say the following number 0x9AD has got the following binary value
1001 1010 1100
I hope this helps,
Jerome
|
|
|
|