Click here to Skip to main content
15,909,325 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: SAFEARRAY Pin
Vijjuuu.27-Nov-08 1:49
Vijjuuu.27-Nov-08 1:49 
AnswerRe: SAFEARRAY Pin
Roger Stoltz27-Nov-08 4:04
Roger Stoltz27-Nov-08 4:04 
GeneralRe: SAFEARRAY Pin
Vijjuuu.27-Nov-08 4:23
Vijjuuu.27-Nov-08 4:23 
Question[Message Deleted] Pin
AnithaSubramani26-Nov-08 23:19
AnithaSubramani26-Nov-08 23:19 
QuestionRe: ReadData() in serialport communication Pin
CPallini26-Nov-08 23:26
mveCPallini26-Nov-08 23:26 
AnswerRe: ReadData() in serialport communication Pin
Cedric Moonen27-Nov-08 0:15
Cedric Moonen27-Nov-08 0:15 
Questioni want make an mfc applicatio for screen capturing Pin
Dhiraj kumar Saini26-Nov-08 23:15
Dhiraj kumar Saini26-Nov-08 23:15 
AnswerRe: i want make an mfc applicatio for screen capturing Pin
Code-o-mat26-Nov-08 23:44
Code-o-mat26-Nov-08 23:44 
You could try something like this, don't know if this actually works or not, didn't try it, but it can be a starting point for you, good luck:

CDC ScreenDC;
ScreenDC.Attach(::GetDC(NULL));

CBitmap Capture;
CSize   Dimensions(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
Capture.CreateCompatibleBitmap(&ScreenDC, Dimensions.cx, Dimensions.cy);

CDC MemDC;
MemDC.CreateCompatibleDC(&ScreenDC);

CBitmap *OldBitmap = MemDC.SelectObject(&Capture);

MemDC.BitBlt(0, 0, Dimensions.cx, Dimensions.cy, &ScreenDC, 0, 0, SRCCOPY);

MemDC.SelectObject(OldBitmap);
MemDC.DeleteDC();

::ReleaseDC(NULL, ScreenDC.Detach());
//At this point the bitmap 'Capture' should contain an image of the desktop


> The problem with computers is that they do what you tell them to do and not what you want them to do. <

Question[Message Deleted] Pin
AnithaSubramani26-Nov-08 23:02
AnithaSubramani26-Nov-08 23:02 
QuestionRe: Doubt in serial port communication Pin
CPallini26-Nov-08 23:22
mveCPallini26-Nov-08 23:22 
QuestionLinking Error Pin
john563226-Nov-08 20:08
john563226-Nov-08 20:08 
AnswerRe: Linking Error Pin
CPallini26-Nov-08 21:07
mveCPallini26-Nov-08 21:07 
Questioncopy data from memory Pin
samira forooghi26-Nov-08 19:56
samira forooghi26-Nov-08 19:56 
QuestionRe: copy data from memory Pin
CPallini26-Nov-08 21:09
mveCPallini26-Nov-08 21:09 
QuestionOpen Application through shoutcutkey [modified] Pin
MsmVc26-Nov-08 19:05
MsmVc26-Nov-08 19:05 
AnswerRe: Open Application through shoutcutkey Pin
_AnsHUMAN_ 26-Nov-08 19:25
_AnsHUMAN_ 26-Nov-08 19:25 
AnswerRe: Open Application through shoutcutkey Pin
SandipG 26-Nov-08 19:52
SandipG 26-Nov-08 19:52 
GeneralRe: Open Application through shoutcutkey Pin
MsmVc26-Nov-08 20:11
MsmVc26-Nov-08 20:11 
GeneralRe: Open Application through shoutcutkey Pin
SandipG 26-Nov-08 20:14
SandipG 26-Nov-08 20:14 
QuestionSleep() Pin
anilaabc26-Nov-08 18:23
anilaabc26-Nov-08 18:23 
AnswerRe: Sleep() Pin
_AnsHUMAN_ 26-Nov-08 18:36
_AnsHUMAN_ 26-Nov-08 18:36 
AnswerRe: Sleep() Pin
ThatsAlok26-Nov-08 19:31
ThatsAlok26-Nov-08 19:31 
AnswerRe: Sleep() Pin
CPallini26-Nov-08 21:08
mveCPallini26-Nov-08 21:08 
AnswerRe: Sleep() Pin
Jijo.Raj26-Nov-08 21:22
Jijo.Raj26-Nov-08 21:22 
QuestionSleep() blacken the screen Pin
220826-Nov-08 18:19
220826-Nov-08 18:19 

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.