Click here to Skip to main content
15,911,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BitBlt() function performance question Pin
econy26-Jan-15 3:48
econy26-Jan-15 3:48 
AnswerRe: BitBlt() function performance question Pin
Nitin K. Kawale26-Jan-15 17:36
professionalNitin K. Kawale26-Jan-15 17:36 
GeneralRe: BitBlt() function performance question Pin
econy27-Jan-15 7:18
econy27-Jan-15 7:18 
AnswerRe: BitBlt() function performance question Pin
Mike Nordell2-Feb-15 9:44
Mike Nordell2-Feb-15 9:44 
QuestionCompatibleDC parameter question Pin
econy23-Jan-15 4:36
econy23-Jan-15 4:36 
QuestionRe: CompatibleDC parameter question Pin
Richard MacCutchan23-Jan-15 5:35
mveRichard MacCutchan23-Jan-15 5:35 
AnswerRe: CompatibleDC parameter question Pin
econy23-Jan-15 5:52
econy23-Jan-15 5:52 
GeneralRe: CompatibleDC parameter question Pin
Richard MacCutchan23-Jan-15 6:32
mveRichard MacCutchan23-Jan-15 6:32 
GeneralRe: CompatibleDC parameter question Pin
econy23-Jan-15 6:38
econy23-Jan-15 6:38 
GeneralRe: CompatibleDC parameter question Pin
Richard MacCutchan23-Jan-15 6:45
mveRichard MacCutchan23-Jan-15 6:45 
QuestionCDC bitblt function with HDC parameter? Pin
econy23-Jan-15 4:17
econy23-Jan-15 4:17 
SuggestionRe: CDC bitblt function with HDC parameter? Pin
Albert Holguin23-Jan-15 4:28
professionalAlbert Holguin23-Jan-15 4:28 
GeneralRe: CDC bitblt function with HDC parameter? Pin
econy23-Jan-15 4:38
econy23-Jan-15 4:38 
AnswerRe: CDC bitblt function with HDC parameter? Pin
Albert Holguin23-Jan-15 5:15
professionalAlbert Holguin23-Jan-15 5:15 
HDC is a handle not an object....

You can use CDC::FromHandle() to get a temporary object for immediate use. Alternatively, you can CDC::Attach() to keep a more permanent CDC object around. You should make sure you release a device context (DC) when you're done using it (FromHandle sort of automatically handles this situation by going out of scope).

If you have CWnds, you can also get a pointer to an existing CDC with CWnd::GetDC().

There is a lot of info on drawing in GDI online, I suggest you read up on it.
Question""Object reference not set to an instance of an object" when creating new project with VS Pin
jeff623-Jan-15 0:04
jeff623-Jan-15 0:04 
AnswerRe: ""Object reference not set to an instance of an object" when creating new project with VS Pin
Richard MacCutchan23-Jan-15 0:57
mveRichard MacCutchan23-Jan-15 0:57 
GeneralRe: ""Object reference not set to an instance of an object" when creating new project with VS Pin
jeff623-Jan-15 1:16
jeff623-Jan-15 1:16 
GeneralRe: ""Object reference not set to an instance of an object" when creating new project with VS Pin
Richard MacCutchan23-Jan-15 1:31
mveRichard MacCutchan23-Jan-15 1:31 
QuestionGet CListCtrl scrollbar rectangle Pin
_Flaviu22-Jan-15 22:55
_Flaviu22-Jan-15 22:55 
AnswerRe: Get CListCtrl scrollbar rectangle Pin
Jochen Arndt22-Jan-15 23:10
professionalJochen Arndt22-Jan-15 23:10 
GeneralRe: Get CListCtrl scrollbar rectangle Pin
_Flaviu22-Jan-15 23:45
_Flaviu22-Jan-15 23:45 
GeneralRe: Get CListCtrl scrollbar rectangle Pin
Jochen Arndt22-Jan-15 23:59
professionalJochen Arndt22-Jan-15 23:59 
GeneralRe: Get CListCtrl scrollbar rectangle Pin
_Flaviu23-Jan-15 1:14
_Flaviu23-Jan-15 1:14 
GeneralRe: Get CListCtrl scrollbar rectangle Pin
_Flaviu23-Jan-15 1:38
_Flaviu23-Jan-15 1:38 
GeneralRe: Get CListCtrl scrollbar rectangle Pin
Jochen Arndt23-Jan-15 2:08
professionalJochen Arndt23-Jan-15 2:08 

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.