Click here to Skip to main content
       

C / C++ / MFC

 
GeneralRe: I am Bemused about std::list<> PinmemberDavidCrow14-Nov-12 3:16 
GeneralRe: I am Bemused about std::list<> PinmvpRichard MacCutchan14-Nov-12 3:32 
GeneralRe: I am Bemused about std::list<> Pingroupyu-jian13-Nov-12 6:25 
GeneralRe: I am Bemused about std::list<> PinmvpRichard MacCutchan13-Nov-12 6:43 
QuestionRe: I am Bemused about std::list<> PinmemberDavidCrow13-Nov-12 8:05 
AnswerRe: I am Bemused about std::list<> PinmemberStephen Hewitt13-Nov-12 15:13 
QuestionPDF Accessing problem PinmemberBianChengNan12-Nov-12 17:22 
QuestionSendMessage(...) MFC is not working in win 7 enterprise edition Pinmembervikuseth12-Nov-12 8:02 
Here is my source code for locking my computer screen (Generally we do by pressing win+L)But Here in the below code what i am trying to do is , when user run the exe created by this application 1st the screen will be invisible (which is not happening in case of win+L) then next time when the user interact with the system it will show the user that the screen is locked .
 
<pre lang="c++">
#include "stdafx.h"
 
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// Turn off monitor

Sleep(500); // Eliminate user's interaction for 500 ms
ret =SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, (LPARAM) 2);
}
 
LockWorkStation();

return 0; }
AnswerRe: SendMessage(...) MFC is not working in win 7 enterprise edition PinmvpRichard MacCutchan12-Nov-12 9:11 
GeneralRe: SendMessage(...) MFC is not working in win 7 enterprise edition Pinmembervikuseth12-Nov-12 9:29 
GeneralRe: SendMessage(...) MFC is not working in win 7 enterprise edition PinmvpRichard MacCutchan12-Nov-12 9:35 
GeneralRe: SendMessage(...) MFC is not working in win 7 enterprise edition Pinmembervikuseth12-Nov-12 9:39 
GeneralRe: SendMessage(...) MFC is not working in win 7 enterprise edition PinmvpRichard MacCutchan12-Nov-12 23:01 
QuestionRe: SendMessage(...) MFC is not working in win 7 enterprise edition PinmemberDavidCrow12-Nov-12 10:18 
AnswerRe: SendMessage(...) MFC is not working in win 7 enterprise edition Pinmembervikuseth12-Nov-12 22:07 
AnswerRe: SendMessage(...) MFC is not working in win 7 enterprise edition Pinmembervikuseth14-Nov-12 1:04 
QuestionDoes this way to clear all item from std::map have problem? Pingroupyu-jian11-Nov-12 1:47 
AnswerRe: Does this way to clear all item from std::map have problem? PinmvpRichard MacCutchan11-Nov-12 6:18 
GeneralRe: Does this way to clear all item from std::map have problem? Pingroupyu-jian11-Nov-12 19:50 
GeneralRe: Does this way to clear all item from std::map have problem? PinmvpRichard MacCutchan11-Nov-12 21:35 
GeneralRe: Does this way to clear all item from std::map have problem? PinmemberStephen Hewitt12-Nov-12 1:43 
GeneralRe: Does this way to clear all item from std::map have problem? Pingroupyu-jian12-Nov-12 3:06 
QuestionGetting pasted test PinmemberHadi Dayvary10-Nov-12 4:20 
AnswerRe: Getting pasted test PinmvpRichard MacCutchan10-Nov-12 6:05 
GeneralRe: Getting pasted test PinmemberHadi Dayvary10-Nov-12 20:29 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.140916.1 | Last Updated 19 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid