Click here to Skip to main content
15,914,642 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionScreensaver: keyboard and mouse hook and kill screensaver Pin
Drugodrf7-May-14 7:34
Drugodrf7-May-14 7:34 
In a application i writing, i want:
- read if the user enabled system screen saver
- read screen saver timeout
- disable screen saver
- the computer is connected to a external device: when this device is "sleeping", i starts to counts time and when it arrives to screen saver timeout, starts the screen saver.
Until here i don't have problems: they start from here:
- if the user move mouse or hit key, screen saver has to stop: is used this:
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/3d9bb875-8e79-4c1e-b2ef-b24503e6abbd/how-to-create-a-keyboard-and-mouse-hook-in-visual-c-2005?forum=windowssdk[^]
but it works only if the focus is on my application, don't works if focus it's on another window.
- when the device "wake-up", the screen saver have to stop: i used this:
http://msdn.microsoft.com/en-us/magazine/cc301462.aspx[^]
but it's works only the first time: if the screen saver starts another time it don't works no more; i have to exit and starts again my application and then it works again only one time.

Thanks

Drugo
AnswerRe: Screensaver: keyboard and mouse hook and kill screensaver Pin
Drugodrf9-May-14 11:20
Drugodrf9-May-14 11:20 
GeneralRe: Screensaver: keyboard and mouse hook and kill screensaver Pin
Drugodrf10-May-14 5:18
Drugodrf10-May-14 5:18 
QuestionDocumentProperties() cause a First-chance exception Pin
Drugodrf7-May-14 7:17
Drugodrf7-May-14 7:17 
QuestionRe: DocumentProperties() cause a First-chance exception Pin
Richard MacCutchan7-May-14 22:06
mveRichard MacCutchan7-May-14 22:06 
AnswerRe: DocumentProperties() cause a First-chance exception Pin
Drugodrf7-May-14 23:13
Drugodrf7-May-14 23:13 
GeneralRe: DocumentProperties() cause a First-chance exception Pin
Richard MacCutchan7-May-14 23:21
mveRichard MacCutchan7-May-14 23:21 
GeneralRe: DocumentProperties() cause a First-chance exception Pin
Drugodrf9-May-14 2:04
Drugodrf9-May-14 2:04 
GeneralRe: DocumentProperties() cause a First-chance exception Pin
Richard MacCutchan9-May-14 2:19
mveRichard MacCutchan9-May-14 2:19 
GeneralRe: DocumentProperties() cause a First-chance exception Pin
Drugodrf9-May-14 3:03
Drugodrf9-May-14 3:03 
QuestionSendMessageCallback() - what is execution context of callback function Pin
Derell Licht7-May-14 7:07
professionalDerell Licht7-May-14 7:07 
AnswerRe: SendMessageCallback() - what is execution context of callback function Pin
CPallini8-May-14 0:04
mveCPallini8-May-14 0:04 
GeneralRe: SendMessageCallback() - what is execution context of callback function Pin
Derell Licht8-May-14 5:02
professionalDerell Licht8-May-14 5:02 
QuestionCompiling C and C++ files together Pin
AmbiguousName7-May-14 6:59
AmbiguousName7-May-14 6:59 
AnswerRe: Compiling C and C++ files together Pin
Richard MacCutchan7-May-14 7:15
mveRichard MacCutchan7-May-14 7:15 
AnswerRe: Compiling C and C++ files together Pin
leon de boer15-May-14 4:44
leon de boer15-May-14 4:44 
QuestionWSACleanup delays when called how can I get around this? Pin
Member 43367557-May-14 6:18
Member 43367557-May-14 6:18 
AnswerRe: WSACleanup delays when called how can I get around this? Pin
Gisle Vanem8-May-14 23:30
Gisle Vanem8-May-14 23:30 
GeneralRe: WSACleanup delays when called how can I get around this? Pin
Member 433675510-May-14 5:50
Member 433675510-May-14 5:50 
QuestionMCI QUESTION!!! Is it different file extension name and codec? Pin
AmissU6-May-14 21:00
AmissU6-May-14 21:00 
QuestionCompiling VLC in Visual Studio 2013 Pin
Django_Untaken5-May-14 5:32
Django_Untaken5-May-14 5:32 
AnswerRe: Compiling VLC in Visual Studio 2013 Pin
leon de boer5-May-14 7:10
leon de boer5-May-14 7:10 
AnswerRe: Compiling VLC in Visual Studio 2013 Pin
Richard MacCutchan5-May-14 20:18
mveRichard MacCutchan5-May-14 20:18 
Questiongood algorithm to determine if there are overlapping in multiple rectangles Pin
Falconapollo3-May-14 19:46
Falconapollo3-May-14 19:46 
AnswerRe: good algorithm to determine if there are overlapping in multiple rectangles Pin
Software_Developer3-May-14 20:52
Software_Developer3-May-14 20:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.