Click here to Skip to main content
15,895,848 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCTreeCtrl questions... custom draw ,setting fonts. ... Pin
Maximilien2-Mar-07 6:59
Maximilien2-Mar-07 6:59 
Questionradio button mfc Pin
deeps_cute2-Mar-07 4:23
deeps_cute2-Mar-07 4:23 
AnswerRe: radio button mfc Pin
CPallini2-Mar-07 4:56
mveCPallini2-Mar-07 4:56 
AnswerRe: radio button mfc Pin
Hamid_RT2-Mar-07 6:01
Hamid_RT2-Mar-07 6:01 
QuestionHeader File #ifndef Pin
vibindia2-Mar-07 4:14
vibindia2-Mar-07 4:14 
AnswerRe: Header File #ifndef Pin
Cedric Moonen2-Mar-07 4:18
Cedric Moonen2-Mar-07 4:18 
GeneralRe: Thanks Pin
vibindia2-Mar-07 4:23
vibindia2-Mar-07 4:23 
QuestionShow Bitmap handle in Picture Control Pin
priyank_ldce2-Mar-07 3:03
priyank_ldce2-Mar-07 3:03 
Hi all,
I am making simple screen capture win32 application using VC++.NET. I am able to capture it in the memory and getting handle of that bitmap but I am not able to show that bitmap in Picture Control in dialog box. Can I know what wrong with my code??
I am pasting my code here.

int nScreenWidth = GetSystemMetrics(SM_CXSCREEN);
int nScreenHeight = GetSystemMetrics(SM_CYSCREEN);
HWND hDesktopWnd = GetDesktopWindow();
HDC hDesktopDC = GetDC(hDesktopWnd);
HDC hCaptureDC = CreateCompatibleDC(hDesktopDC);

HBITMAP hCaptureBitmap =CreateCompatibleBitmap(hDesktopDC, nScreenWidth, nScreenHeight);

SelectObject(hCaptureDC,hCaptureBitmap); 

BitBlt(hCaptureDC,0,0,nScreenWidth,nScreenHeight,hDesktopDC,0,0,SRCCOPY|CAPTUREBLT); 

::SendMessage(::GetDlgItem(hDlg, IDC_BITMAP_CONTROL), STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hCaptureBitmap);
		
ReleaseDC(hDesktopWnd,hDesktopDC);
DeleteDC(hCaptureDC);
DeleteObject(hCaptureBitmap);


Thanks,
Priyank
AnswerRe: Show Bitmap handle in Picture Control Pin
Hamid_RT2-Mar-07 6:21
Hamid_RT2-Mar-07 6:21 
AnswerRe: Show Bitmap handle in Picture Control Pin
prasad_som2-Mar-07 17:54
prasad_som2-Mar-07 17:54 
QuestionResizing a borderless CMainFrame Pin
_Stilgar_2-Mar-07 2:39
_Stilgar_2-Mar-07 2:39 
AnswerRe: Resizing a borderless CMainFrame Pin
kanduripavan6-Mar-07 19:58
kanduripavan6-Mar-07 19:58 
GeneralRe: Resizing a borderless CMainFrame Pin
_Stilgar_7-Mar-07 10:49
_Stilgar_7-Mar-07 10:49 
QuestionHow to handle changes to a Slider bar by Keyboard Pin
reza matinnejad2-Mar-07 2:20
reza matinnejad2-Mar-07 2:20 
QuestionRe: How to handle changes to a Slider bar by Keyboard Pin
David Crow2-Mar-07 2:39
David Crow2-Mar-07 2:39 
AnswerRe: How to handle changes to a Slider bar by Keyboard Pin
reza matinnejad2-Mar-07 2:46
reza matinnejad2-Mar-07 2:46 
QuestionRe: How to handle changes to a Slider bar by Keyboard Pin
David Crow2-Mar-07 2:55
David Crow2-Mar-07 2:55 
AnswerRe: How to handle changes to a Slider bar by Keyboard Pin
reza matinnejad2-Mar-07 3:06
reza matinnejad2-Mar-07 3:06 
GeneralPlease Some Body HELP!!!!!!!!! Pin
reza matinnejad2-Mar-07 4:20
reza matinnejad2-Mar-07 4:20 
QuestionRe: How to handle changes to a Slider bar by Keyboard Pin
David Crow2-Mar-07 4:24
David Crow2-Mar-07 4:24 
AnswerRe: How to handle changes to a Slider bar by Keyboard Pin
reza matinnejad2-Mar-07 4:55
reza matinnejad2-Mar-07 4:55 
AnswerRe: How to handle changes to a Slider bar by Keyboard Pin
Iain Clarke, Warrior Programmer2-Mar-07 5:46
Iain Clarke, Warrior Programmer2-Mar-07 5:46 
QuestionHow to set display resolution Pin
reza matinnejad2-Mar-07 1:27
reza matinnejad2-Mar-07 1:27 
AnswerRe: How to set display resolution Pin
prasad_som2-Mar-07 2:02
prasad_som2-Mar-07 2:02 
AnswerRe: How to set display resolution Pin
vibindia2-Mar-07 4:18
vibindia2-Mar-07 4:18 

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.