CStatic problem! - Programmer

This is a discussion on CStatic problem! - Programmer ; Hello all, MFC is doing something rather strange: I'm trying to set the bitmap of a CStatic bitmap that I put in a dialog using the resource editor in Visual Studio. Unfortunately the SetBitmap call is only working when I ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: CStatic problem!

  1. CStatic problem!

    Hello all,

    MFC is doing something rather strange:

    I'm trying to set the bitmap of a CStatic bitmap that I put
    in a dialog using the resource editor in Visual Studio.
    Unfortunately the SetBitmap call is only working when I specify
    a monochrome bitmap i.e. 1 plane, 1 bit per pixel.
    When I specify for that data that I have, which is 24 bits
    per pixel, the CStatic does not change at all.

    Does anyone know why this is happening?

    Thanks in advance.

  2. Re: CStatic problem!

    > Hello all,
    >
    > MFC is doing something rather strange:
    >
    > I'm trying to set the bitmap of a CStatic bitmap that I put
    > in a dialog using the resource editor in Visual Studio.
    > Unfortunately the SetBitmap call is only working when I specify
    > a monochrome bitmap i.e. 1 plane, 1 bit per pixel.
    > When I specify for that data that I have, which is 24 bits
    > per pixel, the CStatic does not change at all.
    >
    > Does anyone know why this is happening?
    >
    > Thanks in advance.


    Hi ... 006,

    is the 'CStatic'-resource from type "Bitmap"?
    Look at properties for this resource.

    In your rc-file (view as text) you can find your
    static-bitmap-resource-button
    The entry looks like:
    CONTROL "",IDC_MYBITMAP,"Static",SS_BITMAP,15,60,15,10

    HTH
    Frank



+ Reply to Thread