Click here to Skip to main content
15,924,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reading a file into an array Pin
jonsey2984718-Feb-08 11:34
jonsey2984718-Feb-08 11:34 
GeneralRe: Reading a file into an array Pin
jonsey2984718-Feb-08 11:36
jonsey2984718-Feb-08 11:36 
QuestionEmbed a CToolBar within a CDialogBar Pin
jeffb4216-Feb-08 4:45
jeffb4216-Feb-08 4:45 
Questionfunctions with 2d array argument Pin
Adnan Merter16-Feb-08 4:18
Adnan Merter16-Feb-08 4:18 
QuestionRe: functions with 2d array argument Pin
CPallini16-Feb-08 4:39
mveCPallini16-Feb-08 4:39 
GeneralRe: functions with 2d array argument Pin
Adnan Merter16-Feb-08 5:24
Adnan Merter16-Feb-08 5:24 
GeneralRe: functions with 2d array argument Pin
CPallini16-Feb-08 6:46
mveCPallini16-Feb-08 6:46 
Generalsimulate ctrl+alt+delete keys in windows Pin
Abdul_khaliq_16-Feb-08 2:27
Abdul_khaliq_16-Feb-08 2:27 
Hi all

i want to simulate the ctrl + alt + delete keys

I am facing problem with this code. I able to get the reference of the "winlogon" desktop but am unable to simulate the ctrl + alt + delete keys.

can any one help please.


HDESK desktop;
ofstream myfile;

HDESK old_desktop = GetThreadDesktop(GetCurrentThreadId());
myfile.open ("c:\\desktop.txt");
// Attempt to open the named desktop
esktop = OpenDesktop("Winlogon", 0, FALSE,
DESKTOP_CREATEMENU | DESKTOP_CREATEWINDOW |
DESKTOP_ENUMERATE | DESKTOP_HOOKCONTROL |
DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS |
DESKTOP_SWITCHDESKTOP | GENERIC_WRITE);

if(desktop!=NULL){
myfile << "desktop found.\n";
}else{
myfile << "desktop not found.\n";
}
HWND hwndCtrlAltDel = FindWindow("SAS window class", "SAS window");
if (hwndCtrlAltDel == NULL) {
myfile << "SAS window not found.\n";
hwndCtrlAltDel = HWND_BROADCAST;
}
PostMessage(hwndCtrlAltDel, WM_HOTKEY, 0, MAKELONG(MOD_ALT | MOD_CONTROL, VK_DELETE));

HWND logonwindow = FindWindow("", "Log On to Windows");
if (logonwindow == NULL) {
myfile << "logon window not found.\n";
}
myfile.close();
GeneralRe: simulate ctrl+alt+delete keys in windows Pin
Baltoro17-Feb-08 10:13
Baltoro17-Feb-08 10:13 
GeneralBorderless ComboBox Pin
Humayun Kabir Hemoo16-Feb-08 0:24
Humayun Kabir Hemoo16-Feb-08 0:24 
GeneralRe: Borderless ComboBox Pin
Mark Salsbery17-Feb-08 8:47
Mark Salsbery17-Feb-08 8:47 
GeneralRe: Borderless ComboBox Pin
Humayun Kabir Hemoo18-Feb-08 4:15
Humayun Kabir Hemoo18-Feb-08 4:15 
GeneralRe: Borderless ComboBox Pin
Mark Salsbery18-Feb-08 5:54
Mark Salsbery18-Feb-08 5:54 
GeneralRe: Borderless ComboBox Pin
Humayun Kabir Hemoo18-Feb-08 13:55
Humayun Kabir Hemoo18-Feb-08 13:55 
GeneralRe: Borderless ComboBox Pin
Hamid_RT18-Feb-08 7:35
Hamid_RT18-Feb-08 7:35 
GeneralRe: Borderless ComboBox Pin
Humayun Kabir Hemoo18-Feb-08 13:54
Humayun Kabir Hemoo18-Feb-08 13:54 
GeneralRe: Borderless ComboBox Pin
Hamid_RT18-Feb-08 19:35
Hamid_RT18-Feb-08 19:35 
Generalprocess output Pin
bhat15-Feb-08 23:30
bhat15-Feb-08 23:30 
GeneralRe: process output Pin
BadKarma16-Feb-08 0:11
BadKarma16-Feb-08 0:11 
GeneralRe: process output Pin
Rajesh R Subramanian16-Feb-08 4:32
professionalRajesh R Subramanian16-Feb-08 4:32 
GeneralRe: process output Pin
Rajkumar R16-Feb-08 6:49
Rajkumar R16-Feb-08 6:49 
GeneralRe: process output Pin
Rajesh R Subramanian16-Feb-08 4:31
professionalRajesh R Subramanian16-Feb-08 4:31 
GeneralRedirect Output in Edit Box in VC++ Pin
bhat15-Feb-08 20:46
bhat15-Feb-08 20:46 
QuestionRe: Redirect Output in Edit Box in VC++ Pin
Rajkumar R15-Feb-08 20:53
Rajkumar R15-Feb-08 20:53 
GeneralRe: Redirect Output in Edit Box in VC++ [modified] Pin
Rajesh R Subramanian15-Feb-08 20:58
professionalRajesh R Subramanian15-Feb-08 20:58 

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.