Click here to Skip to main content
15,881,413 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Get CListCtrl scrollbar rectangle Pin
_Flaviu23-Jan-15 2:26
_Flaviu23-Jan-15 2:26 
QuestionRetreive AFX_MODULE_STATE Pin
Member 1139405922-Jan-15 0:16
Member 1139405922-Jan-15 0:16 
QuestionDesiging in C Pin
Member 1138854120-Jan-15 3:00
Member 1138854120-Jan-15 3:00 
AnswerRe: Desiging in C Pin
CPallini20-Jan-15 3:49
mveCPallini20-Jan-15 3:49 
AnswerRe: Desiging in C Pin
Richard Andrew x6420-Jan-15 4:24
professionalRichard Andrew x6420-Jan-15 4:24 
GeneralRe: Desiging in C Pin
CPallini20-Jan-15 4:37
mveCPallini20-Jan-15 4:37 

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.