Click here to Skip to main content
15,919,879 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUser account lock Pin
Pryabu31-May-10 20:31
Pryabu31-May-10 20:31 
AnswerRe: User account lock Pin
Spawn@Melmac1-Jun-10 1:37
Spawn@Melmac1-Jun-10 1:37 
GeneralRe: User account lock Pin
Pryabu1-Jun-10 19:32
Pryabu1-Jun-10 19:32 
GeneralRe: User account lock Pin
Spawn@Melmac2-Jun-10 6:28
Spawn@Melmac2-Jun-10 6:28 
QuestionNo of Documents and View in SDI and MDI Pin
krishna_CP31-May-10 20:00
krishna_CP31-May-10 20:00 
AnswerRe: No of Documents and View in SDI and MDI Pin
«_Superman_»31-May-10 20:17
professional«_Superman_»31-May-10 20:17 
GeneralRe: No of Documents and View in SDI and MDI Pin
Cedric Moonen31-May-10 20:41
Cedric Moonen31-May-10 20:41 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 3:28
krishna_CP2-Jun-10 3:28 
GeneralRe: No of Documents and View in SDI and MDI Pin
Cedric Moonen2-Jun-10 4:25
Cedric Moonen2-Jun-10 4:25 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 4:28
krishna_CP2-Jun-10 4:28 
AnswerRe: No of Documents and View in SDI and MDI Pin
Aescleal31-May-10 20:39
Aescleal31-May-10 20:39 
AnswerRe: No of Documents and View in SDI and MDI Pin
Niklas L1-Jun-10 3:49
Niklas L1-Jun-10 3:49 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 3:29
krishna_CP2-Jun-10 3:29 
GeneralRe: No of Documents and View in SDI and MDI Pin
krishna_CP2-Jun-10 4:34
krishna_CP2-Jun-10 4:34 
Questionserver emulator code help Pin
zeroKo31-May-10 15:31
zeroKo31-May-10 15:31 
AnswerRe: server emulator code help Pin
Stephen Hewitt31-May-10 16:07
Stephen Hewitt31-May-10 16:07 
GeneralRe: server emulator code help Pin
zeroKo31-May-10 17:04
zeroKo31-May-10 17:04 
GeneralRe: server emulator code help Pin
Stephen Hewitt31-May-10 20:21
Stephen Hewitt31-May-10 20:21 
GeneralRe: server emulator code help Pin
zeroKo31-May-10 23:56
zeroKo31-May-10 23:56 
GeneralRe: server emulator code help Pin
Stephen Hewitt1-Jun-10 13:55
Stephen Hewitt1-Jun-10 13:55 
GeneralRe: server emulator code help Pin
zeroKo1-Jun-10 14:12
zeroKo1-Jun-10 14:12 
QuestionBackground Color for Bitmap In Crichedtctrl Pin
ForNow31-May-10 8:57
ForNow31-May-10 8:57 
Hi,

I have a Arrow bitmap which has a White background and a Yellow Arrow

The BackGround of My Rich Edit is Gray RGB(125,125,125)

I would like the background of the Yellow Arrow to Match the background of My CRichEdit

I looked at some code from article on The CodeProject By Raja Segar entitled

"Drawing TransParent Bitmaps with ease"

and it seemed to do something close to what I want

I figured I didn't have to make the code that generic rather

I could Load the Bitmap and then create a mask bitmap with a text of white and background of Gray "OR" Orignal Bitmap and get what I went

Aprarently not

below is part of the Code

C#
CBitmap *bm = new CBitmap;           // Bitmap Object

    bm->LoadBitmap((UINT) IDD_BITMAP);             // LOAD THE ARROW

    CDC dcmask;                                              // dcmask

    dcmask.CreateCompatibleDC(NULL);                       // Create a generic DC

    BITMAP bm_struct;

    bm->GetBitmap(&bm_struct);                 // get the demensions of ste arrow

    CBitmap bmask;                                     //  Create mask

   bmask.CreateBitmap(bm_struct.bmWidth,bm_struct.bmHeight,bm_struct.bmPlanes,bm_struct.bmBitsPixel,NULL);

   dcmask.SelectObject(&bmask);                       // Select the bit map in

   dcmask.SetTextColor(RGB(0,0,0));                 // ALL WHITE

   dcmask.SetBkColor(RGB(125,125,125));            // GRAY

   CDC dcarrow;

   dcarrow.CreateCompatibleDC(NULL);

   dcarrow.SelectObject(bm);

   dcarrow.BitBlt(0,0,bm_struct.bmWidth,bm_struct.bmHeight,&dcmask,0,0,SRCPAINT);  // or the bits

   dcmask.DeleteDC();

   dcarrow.DeleteDC();



Afterwards I used OleCreateStaticfromData using the bitmap handle to Display the bitmap

would anyone know why I didn't get a gray background for the yellow arrow

thankx
Questionhow to format numbers with dollar sign in a cell for a CListCtrl Pin
manchukuo31-May-10 8:04
manchukuo31-May-10 8:04 
AnswerRe: how to format numbers with dollar sign in a cell for a CListCtrl Pin
CPallini31-May-10 9:35
mveCPallini31-May-10 9:35 
GeneralRe: how to format numbers with dollar sign in a cell for a CListCtrl Pin
manchukuo31-May-10 11:13
manchukuo31-May-10 11:13 

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.