Click here to Skip to main content
15,891,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiongetting pixel color values by GetDiBit function Pin
inayathussaintoori21-Oct-10 2:01
inayathussaintoori21-Oct-10 2:01 
AnswerRe: getting pixel color values by GetDiBit function Pin
Sauro Viti21-Oct-10 2:18
professionalSauro Viti21-Oct-10 2:18 
GeneralRe: getting pixel color values by GetDiBit function Pin
inayathussaintoori21-Oct-10 2:32
inayathussaintoori21-Oct-10 2:32 
GeneralRe: getting pixel color values by GetDiBit function Pin
Sauro Viti21-Oct-10 2:50
professionalSauro Viti21-Oct-10 2:50 
AnswerRe: getting pixel color values by GetDiBit function Pin
GAJERA21-Oct-10 2:57
GAJERA21-Oct-10 2:57 
QuestionOverlap A Bitmap using DeviceContext Pin
002comp21-Oct-10 0:38
002comp21-Oct-10 0:38 
AnswerRe: Overlap A Bitmap using DeviceContext Pin
GAJERA21-Oct-10 1:05
GAJERA21-Oct-10 1:05 
GeneralRe: Overlap A Bitmap using DeviceContext Pin
Sauro Viti21-Oct-10 1:11
professionalSauro Viti21-Oct-10 1:11 
GAJERA wrote:
CDC *dc=NULL;
dc->Attach()


There are two big errors in this code:


  1. the CDC::Attach() method wants an HDC as parameter, then this code doesn't compile. To which HDC do you want to attach?
  2. you have initialized dc to NULL and then you use that pointer to call one of its non-static members: this will give you a memory protection fault.

GeneralRe: Overlap A Bitmap using DeviceContext Pin
GAJERA21-Oct-10 1:18
GAJERA21-Oct-10 1:18 
GeneralRe: Overlap A Bitmap using DeviceContext Pin
002comp21-Oct-10 18:46
002comp21-Oct-10 18:46 
GeneralRe: Overlap A Bitmap using DeviceContext Pin
GAJERA21-Oct-10 21:33
GAJERA21-Oct-10 21:33 
GeneralRe: Overlap A Bitmap using DeviceContext Pin
002comp22-Oct-10 1:22
002comp22-Oct-10 1:22 
GeneralRe: Overlap A Bitmap using DeviceContext Pin
GAJERA22-Oct-10 4:26
GAJERA22-Oct-10 4:26 
QuestionAbout the CWinThread object creation / deletion Pin
federico.strati20-Oct-10 22:38
federico.strati20-Oct-10 22:38 
AnswerRe: About the CWinThread object creation / deletion Pin
Sauro Viti20-Oct-10 22:44
professionalSauro Viti20-Oct-10 22:44 
GeneralRe: About the CWinThread object creation / deletion Pin
federico.strati20-Oct-10 22:52
federico.strati20-Oct-10 22:52 
GeneralRe: About the CWinThread object creation / deletion Pin
Sauro Viti20-Oct-10 23:07
professionalSauro Viti20-Oct-10 23:07 
GeneralRe: About the CWinThread object creation / deletion Pin
federico.strati20-Oct-10 23:32
federico.strati20-Oct-10 23:32 
GeneralRe: About the CWinThread object creation / deletion Pin
Sauro Viti21-Oct-10 0:12
professionalSauro Viti21-Oct-10 0:12 
QuestionProject Integration Problem Pin
AmbiguousName20-Oct-10 22:32
AmbiguousName20-Oct-10 22:32 
AnswerRe: Project Integration Problem Pin
Cedric Moonen20-Oct-10 23:16
Cedric Moonen20-Oct-10 23:16 
QuestionHow can I give write access to a file to all users? [modified] Pin
sashoalm20-Oct-10 21:54
sashoalm20-Oct-10 21:54 
AnswerRe: How can I give write access to a file to all users? Pin
«_Superman_»20-Oct-10 22:59
professional«_Superman_»20-Oct-10 22:59 
QuestionC++ CStatusBar, Tool Tips and Dynamic PaneText Pin
ggoutam720-Oct-10 18:41
ggoutam720-Oct-10 18:41 
AnswerRe: C++ CStatusBar, Tool Tips and Dynamic PaneText Pin
«_Superman_»20-Oct-10 19:09
professional«_Superman_»20-Oct-10 19:09 

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.