winapi - How To CaptureScreen at Virtual Desktop? -


i run test program windows8 or 7 64/32bit

but can't capture screen when running virtual desktop

here code

hwnd h1 = createwindows(....) or dialog.. //if line remove capture code works fine  hdesktopcurrent = null; horiginalinput = null; hdesktopcurrent = getthreaddesktop(getcurrentthreadid()); horiginalinput = openinputdesktop(0, false, desktop_switchdesktop);  hdeskvirtual= null;  attr.nlength = sizeof(attr); attr.lpsecuritydescriptor = null; attr.binherithandle = true;  hdeskvirtual= createdesktopex(     "my_new_desktop_1",     null,     null,     0,     generic_all,     &attr,     0,     null);  switchdesktop(hdeskvirtual); setthreaddesktop(hdeskvirtual);  //capture here  switchdesktop(originaldesktop); setthreaddesktop(originaldesktop); 

ps: when nerver create windows hwnd before switchdesktop (ex:createwindows,creatdialog...) works perfertly capture..

but create windows frame or dialog, didn't work captured blackscreen

plz..help me!


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -