Results 1 to 5 of 5

Thread: Dialog box manipulation...

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    BC, Canada
    Posts
    5

    Dialog box manipulation...

    Hi, I have a dialog box I designed with a "Picture Control" that has a picture in it. I want to know if there is a function or a message that will change what image is in the control. Is this possible?
    Joel Kitching - [email protected]

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Depending on what kind of control that is, you can look it up in the help.
    Usually pictures are displayed in static controls. You can set the image of a static control with the STM_SETIMAGE message.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    BC, Canada
    Posts
    5
    would something like this work?
    SendMessage(hwnd,STM_SETIMAGE,IDC_IMAGE,IDB_MYIMAGE);
    Joel Kitching - [email protected]

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No, this would work:
    SendDlgItemMessage(hDlg, IDC_IMAGE, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hBitmap);

    You get the hBitmap from a previous call to LoadImage or LoadBitmap or other functions that return a HBITMAP.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Location
    BC, Canada
    Posts
    5
    ah thank you very much
    Joel Kitching - [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width