Click here to Skip to main content
16,010,876 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Memory leak Pin
ThatsAlok5-Apr-05 19:00
ThatsAlok5-Apr-05 19:00 
GeneralRe: Memory leak Pin
S. Senthil Kumar5-Apr-05 22:40
S. Senthil Kumar5-Apr-05 22:40 
GeneralRe: Memory leak Pin
David Crow6-Apr-05 2:04
David Crow6-Apr-05 2:04 
GeneralRe: Memory leak Pin
lvantin7-Apr-05 15:14
lvantin7-Apr-05 15:14 
GeneralRe: Memory leak Pin
David Crow7-Apr-05 16:06
David Crow7-Apr-05 16:06 
GeneralPlease help with serial communication using Visual C++ Pin
Anonymous5-Apr-05 18:18
Anonymous5-Apr-05 18:18 
GeneralListing down available domains programmatically Pin
alex12055-Apr-05 17:40
alex12055-Apr-05 17:40 
GeneralGraphic stuff Pin
LiYS5-Apr-05 15:22
LiYS5-Apr-05 15:22 
There's a program inside Programming Windows called Blowup
hdc = GetDC (hwnd) ;
hdcMem = CreateCompatibleDC (hdc) ;
hBitmap = CreateCompatibleBitmap (hdc,
abs (ptEnd.x - ptBeg.x),
abs (ptEnd.y - ptBeg.y)) ;

SelectObject (hdcMem, hBitmap) ;

StretchBlt (hdcMem, 0, 0, abs (ptEnd.x - ptBeg.x),
abs (ptEnd.y - ptBeg.y),
hdc, ptBeg.x, ptBeg.y, ptEnd.x - ptBeg.x,
ptEnd.y - ptBeg.y, SRCCOPY) ;

Before entering this snippet the mouse was captured by SetCapture(), ptBegin and ptEnd are the points when the left button was clicked and released, So after a click and release a rectangle was produced, ptBegin lies in the upper-left corner and ptEnd is at right-bottom. "hdc" is the program's window handle

I know even part of this rectangle lies out side of program's window(drag cursor out of the client area), the region created by ptBegin and ptEnd still valid (SetCapture()), but what makes me wonder is how's the image outside the program's client area can be used as a source HDC to be copied to hdcMem.

GeneralSetItemData, GetItemData Pin
elephantstar5-Apr-05 15:19
elephantstar5-Apr-05 15:19 
GeneralRe: SetItemData, GetItemData Pin
Christian Graus5-Apr-05 16:06
protectorChristian Graus5-Apr-05 16:06 
GeneralRe: SetItemData, GetItemData Pin
DasdaDAS5-Apr-05 21:01
DasdaDAS5-Apr-05 21:01 
GeneralRe: SetItemData, GetItemData Pin
elephantstar6-Apr-05 8:14
elephantstar6-Apr-05 8:14 
GeneralRe: SetItemData, GetItemData Pin
toxcct5-Apr-05 21:54
toxcct5-Apr-05 21:54 
GeneralRe: SetItemData, GetItemData Pin
Michael Dunn6-Apr-05 2:03
sitebuilderMichael Dunn6-Apr-05 2:03 
Generalneed help with a simple MFC question Pin
stuckupfool5-Apr-05 14:20
stuckupfool5-Apr-05 14:20 
GeneralRe: need help on the program data structure Pin
Christian Graus5-Apr-05 13:07
protectorChristian Graus5-Apr-05 13:07 
GeneralRe: need help on the program data structure Pin
Anonymous6-Apr-05 9:32
Anonymous6-Apr-05 9:32 
GeneralRe: need help on the program data structure Pin
Cedric Moonen5-Apr-05 20:13
Cedric Moonen5-Apr-05 20:13 
GeneralRe: need help on the program data structure Pin
toxcct5-Apr-05 20:56
toxcct5-Apr-05 20:56 
Generalemessaging client Pin
jessiesrage5-Apr-05 11:28
jessiesrage5-Apr-05 11:28 
GeneralRe: emessaging client Pin
David Crow5-Apr-05 11:39
David Crow5-Apr-05 11:39 
GeneralRe: emessaging client Pin
ThatsAlok5-Apr-05 18:16
ThatsAlok5-Apr-05 18:16 
GeneralChanging ComboBox selection by text editing Pin
Ultimate Newbie5-Apr-05 10:53
sussUltimate Newbie5-Apr-05 10:53 
GeneralRe: Changing ComboBox selection by text editing Pin
David Crow5-Apr-05 11:43
David Crow5-Apr-05 11:43 
Generalemail client Pin
_tasleem5-Apr-05 9:52
_tasleem5-Apr-05 9:52 

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.