Bm_setimage

This is a discussion on Bm_setimage within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I'm trying to set a image for a button using SetDlgItem() with the BM_SETIMAGE parameter. MSDN says that I ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    362

    Bm_setimage

    Hi, I'm trying to set a image for a button using SetDlgItem() with the BM_SETIMAGE parameter. MSDN says that I must send a handle to a image as the lParam parameter. Is that means a handle to a disk file?

  2. #2
    rEtaRD r HUMANS TOO !!! rEtard's Avatar
    Join Date
    Feb 2005
    Posts
    80
    the handle refers to the BITMAP
    ETC:
    Code:
    HBITMAP bmp;
    bmp = LoadBitmap(GetModuleHandle(NULL),MAKEINTRESOURCE(IDB_BITMAP));
    SendMessage(child.hwnd,BM_SETIMAGE,(WPARAM)IMAGE_BITMAP,(LPARAM)bmp);
    /* Have a nice day */

  3. #3
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    362
    Thanx.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21