Changing the Image in Microsoft Forms 2.0 Image control
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Changing the Image in Microsoft Forms 2.0 Image control

  1. #1
    Join Date
    Mar 2009
    Posts
    55

    Changing the Image in Microsoft Forms 2.0 Image control

    Hi all,

    I want to change the image dynamically in Microsoft Forms 2.0 Image control in dialog box according to the action selected.

    Help me,How can i do that...
    Expecting the reply....

    Thanks and ragards,
    sudha_sakthi

  2. #2
    Join Date
    Jul 2005
    Location
    Louisville, KY
    Posts
    201

    Re: Changing the Image in Microsoft Forms 2.0 Image control

    Maybe this can lead you in the right direction? Let me know...

    http://msdn.microsoft.com/en-us/libr...8VS.60%29.aspx

  3. #3
    Join Date
    Sep 2011
    Posts
    3

    Re: Changing the Image in Microsoft Forms 2.0 Image control

    first of all include
    #include <afxctl.h>

    now make a variable of image type control by clicking add variable on that control.
    Here m_pic is the variable of that control.

    CImage img;
    img.Load(L"C:\\Users\\Public\\Pictures\\Sample Pictures\\Desert.jpg");
    CPictureHolder pictholder;
    pictholder.CreateFromBitmap(img.Detach()); // a new bitmap that I created.utref_Picture();
    m_pic.putref_Picture(pictholder.GetPictureDispatch());

    After that redraw the window.

    RedrawWindow();


    Now enjoy!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center