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

C / C++ / MFC

 
GeneralRe: SetWindowsHookEx and Callback Pin
AlmightyEdge18-Jun-10 3:00
AlmightyEdge18-Jun-10 3:00 
GeneralRe: SetWindowsHookEx and Callback Pin
Stephen Hewitt21-Jun-10 15:04
Stephen Hewitt21-Jun-10 15:04 
Questionwrap the wininet dll Pin
alto16-Jun-10 7:41
alto16-Jun-10 7:41 
AnswerRe: wrap the wininet dll Pin
ThatsAlok16-Jun-10 23:57
ThatsAlok16-Jun-10 23:57 
GeneralRe: wrap the wininet dll Pin
Moak17-Jun-10 3:43
Moak17-Jun-10 3:43 
Questionvalid date and time Pin
MKC00216-Jun-10 6:01
MKC00216-Jun-10 6:01 
AnswerRe: valid date and time Pin
CPallini16-Jun-10 6:19
mveCPallini16-Jun-10 6:19 
QuestionFloodFill question Pin
ForNow16-Jun-10 5:04
ForNow16-Jun-10 5:04 
Hi,

I got the following code from Niklas Lindquist
C#
CBitmap *bm = new CBitmap; 
          // Bitmap Object
	  bm->LoadBitmap((UINT) IDD_BITMAP);             // LOAD THE ARROW  
         CDC *cdcwindow = this->GetDC(); 
         CDC cdcimage;    
        cdcimage.CreateCompatibleDC(cdcwindow);
	CBitmap *oldbit = cdcimage.SelectObject(bm);
	 cdcimage.SetDCBrushColor(RGB(125,125,125)); 
    	 COLORREF cr = cdcimage.GetPixel(0,0);

          LPVOID bitptr = NULL;
          if (bitptr == NULL)
              bitptr = new char[4000];

          bm->GetBitmapBits(4000,bitptr);
	
         cdcimage.FloodFill(0,0,cr);
	 bm = cdcimage.SelectObject(oldbit);


What I am trying to do is fill the background of a Bitmap with a Gray Color

When I look at what is in the bitmap via bm->GetBitmapBits I see a whole buch of white Color

e.g. FF FF FF 00 FF FF FF 00 this pattern continues for many many bytes

After execution of the Floodfill shouldn't the white be whats in the current brush which is gray so that

FF FF FF 00 is now 80 80 80 00

When I look at that adddress in code it still FF FF FF 00
AnswerRe: FloodFill question Pin
Chris Losinger16-Jun-10 5:39
professionalChris Losinger16-Jun-10 5:39 
AnswerRe: FloodFill question Pin
Niklas L16-Jun-10 6:27
Niklas L16-Jun-10 6:27 
Questionbetter linear algebra Pin
VeganFanatic16-Jun-10 5:03
VeganFanatic16-Jun-10 5:03 
QuestionNew In c and c++. Downloading data from a server Pin
Eli Nurman16-Jun-10 4:26
Eli Nurman16-Jun-10 4:26 
AnswerRe: New In c and c++. Downloading data from a server Pin
Maximilien16-Jun-10 4:46
Maximilien16-Jun-10 4:46 
GeneralRe: New In c and c++. Downloading data from a server Pin
Eli Nurman16-Jun-10 6:14
Eli Nurman16-Jun-10 6:14 
GeneralRe: New In c and c++. Downloading data from a server Pin
Maximilien16-Jun-10 6:56
Maximilien16-Jun-10 6:56 
AnswerRe: New In c and c++. Downloading data from a server Pin
David Crow16-Jun-10 5:10
David Crow16-Jun-10 5:10 
AnswerRe: New In c and c++. Downloading data from a server Pin
Aescleal16-Jun-10 7:48
Aescleal16-Jun-10 7:48 
AnswerRe: New In c and c++. Downloading data from a server Pin
ThatsAlok17-Jun-10 0:00
ThatsAlok17-Jun-10 0:00 
GeneralRe: New In c and c++. Downloading data from a server Pin
Eli Nurman17-Jun-10 1:37
Eli Nurman17-Jun-10 1:37 
Questionimplicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:01
Iosif Murariu16-Jun-10 3:01 
AnswerRe: implicit cast between pointers Pin
Cedric Moonen16-Jun-10 3:06
Cedric Moonen16-Jun-10 3:06 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:11
Iosif Murariu16-Jun-10 3:11 
GeneralRe: implicit cast between pointers Pin
Iosif Murariu16-Jun-10 3:13
Iosif Murariu16-Jun-10 3:13 
GeneralRe: implicit cast between pointers Pin
CPallini16-Jun-10 3:19
mveCPallini16-Jun-10 3:19 
GeneralRe: implicit cast between pointers Pin
Cedric Moonen16-Jun-10 3:20
Cedric Moonen16-Jun-10 3:20 

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.