Thread: display a picture in windows dialogue

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    74

    display a picture in windows dialogue

    hi all,
    i need to display a pic on window, i know there's a class CBitmap but i can't find any sample code of it, can anyone teach me how to display a pic? thanks!!

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    58
    it's easy.
    if you create WM_PAINT event and you'll show onpaint function.
    write code using bitblt api function please.
    your dlg name:aa
    Code:
    void aadlg::onpaint()
    {
    CBitmap m_bmp;
    ..
    dc.BitBlt(...);
    }
    ok?

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    74
    thanks for reply,
    but i dun understand the coding, and i need to add the pic in oninitdialog, how to do that? thanks much!!

  4. #4
    Registered User
    Join Date
    Apr 2008
    Posts
    58
    what do you mean?
    are you trying to display pic after creating bitmap in OnInitialDilaog()?
    can i show your screenshot?
    Last edited by sgh; 04-29-2008 at 01:44 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 08:14 AM
  2. how to make a windows application
    By crvenkapa in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2007, 09:59 AM
  3. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 12:19 AM
  5. Manipulating the Windows Clipboard
    By Johno in forum Windows Programming
    Replies: 2
    Last Post: 10-01-2002, 09:37 AM