|
It's very good, but "Windows 95/98/Me: Unsupported."
I understand that support of these systems is almost stopped, but my customers have all range of systems. Maybe I will emulate this function for Win9X - Anyway thank you very much.
Pavel Sokolov
|
|
|
|
|
Pavel Sokolov wrote:
Maybe I will emulate this function for Win9X
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thank you! Just found it
Pavel Sokolov
|
|
|
|
|
I read that article and he puts the hook handler handles and counter into shared memory:
#pragma data_seg (".IdleUI") // any name you like
HHOOK g_hHookKbd = NULL;
HHOOK g_hHookMouse = NULL;
DWORD g_dwLastInputTick = 0;
#pragma data_seg ()
Why is that? Doesn't that mean that only one thread of a single process can use the hook handler in this DLL? Why aren't those data at least process-specific so multiple applications could have used the functions in the DLL? I recently made a mouse hook handler and I did NOT put anything like this in the shared data segment and it works fine. Do you think that was something specific for the Windows 9X support?
|
|
|
|
|
Blake Miller wrote:
Why aren't those data at least process-specific so multiple applications could have used the functions in the DLL?
That would defeat the purpose of checking for idleness. If these variables were not marked as shared, each process that used the DLL would get its own copy of the variables, thus idle in one process might not be idle in another process.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I have a dialog which contains a CListCtrl to dislplay some information.
two cwinthreads from other dlg keep updating the data of the CListCtrl.
the CListCtrl's handle is passed to the threads and there is a Shared CriticalSection among these 3 objects.
when i close the dlg, i want to set a flg to inform the two threads that the list is destroyed. so i call in the exit event of the dlg:
lock.Lock();
destroyFlg = true; // the threads will check this flg before access the list
//and access to the list is protected by lock & unlock
lock.UnLock();
what happend is that , the dlg is hung. i traced and find it hung at lock.Lock();
there is only one crictical section and i am sure i have paired each lock() with a unlock(). why this still happend?
Some one knows please help me. thanx a lot.
|
|
|
|
|
a_du wrote:
two cwinthreads from other dlg keep updating the data of the CListCtrl.
You can avoid a whole lot of problems by simply having these other two threads post a message back to the main thread (the one that actually owns the GUI). Locking and synchronizing are a headache if not done 100% correctly.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Consider using a wrapper class to lock your object.
See following code:
http://code.axter.com/sync_ptr.h
The above wrapper class will automatically lock and unlock your object, so you don't have to worry about forgetting.
|
|
|
|
|
hi everybody...
i want to make a loop in a function...this loop is endless (except if the user cancel)..in VB i use DoEvents so the window of the program doesn't hang..what's the equivalent of it in VC++...
|
|
|
|
|
happycpp wrote:
DoEvents so the window of the program doesn't hang..what's the equivalent of it in VC++...
what about this :-
while(PeekMessage(&msg,0,0,0))
{
DispatchMessage(&msg);
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
thanx a lot...i'll give it a try..
|
|
|
|
|
when u click on any variable name, we'd find "go to declaration","go to reference".. but if u click on it, its not taking the cursor to the decl or ref, its simply saying "The Symbol 'VAL1' is not defined".. but i've declared everything inside the class n i get no errors.
and code assistance is not coming too... when you type the .(dot) after an object or something, nothing is displayed. should we change any setting in the IDE?
thanks in advance
vivek
|
|
|
|
|
do you use VC++ 6 or VC++.NET 2003 ? (VC6 i think)
you have to make the pdb file when it ask you to...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Did you declare the variable in a header or a code file ?
The class browser only looks in header files, certainly on VC6.0.
Elaine
The tigress is here
|
|
|
|
|
viveking wrote:
code assistance is not coming too... when you type the .(dot) after an object or something, nothing is displayed. should we change any setting in the IDE?
Close down your workspace, Delete the project.ncw file and restart your computer. Next time when you open your project the Intellisense will be working
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
toxcct wrote:
restarting the computer ??
Yap Some time it's needed
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
i've brought my application down to the system tray.. now i wanna pop-up messages in the system tray itself just like yahoo messenger..eg:(1 new mail). please help.
thanks,
vivek..
|
|
|
|
|
viveking wrote:
wanna pop-up messages in the system tray itself just like yahoo messenger..eg1 new mail).
This going to help :-
http://www.codeproject.com/dialog/taskbarnotifier.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
is there anyway to learn, balloon tooltips arrow position ( up or down)?
|
|
|
|
|
What is a "balloon tooltips arrow position?"
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i want to mean the stem. But i solve the problem with another way.
|
|
|
|
|
Hi,
I want to write down the implementation of _stprintf. Can somebody send some source.
Thanks in advance
Abhi Lahare
|
|
|
|
|
Abhi Lahare wrote:
Can somebody send some source.
This article is starting point for your solution :-
http://www.codeproject.com/cpp/argfunctions.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|