Thread: HBITMAP and the rest...

  1. #1
    Registered User DutchStud's Avatar
    Join Date
    Oct 2001
    Posts
    43

    Question HBITMAP and the rest...

    I'm trying to make a bitmap smoothing program for myself, and I believe I know how to do it, but my problem is, well, number 1 when i load the bitmap using LoadImage and then use GetBitmapDimensionEx, i get 0's for my cx and cy. How can I get the true width and height? and two, i have a working bitmap and a reference bitmap selected into two different dc's, and i GetPixel from one dc and SetPixel on the working dc, but then i can't copy the working bitmap to the loaded bitmap in the reference dc when i'm done. any ideas? i hope this isn't a confusing description, if it is, ask me to explain something. thanks in advance.

  2. #2
    of Zen Hall zen's Avatar
    Join Date
    Aug 2001
    Posts
    1,007
    You can use GetObject() to fill a BITMAP struct with info about the bitmap -

    GetObject(hBitmap,sizeof(BITMAP), &bitmap);

    How are you trying to copy the bitmap between the dc's?
    zen

  3. #3
    Registered User DutchStud's Avatar
    Join Date
    Oct 2001
    Posts
    43
    Thanks for the help, yeah, i got the copying thing figured out, but i never would have figured out the get object, so thanks.

Popular pages Recent additions subscribe to a feed