CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    32

    Angry Displaying image

    How can i open and display the image(like jpg, tiff, bmp files) by opening through FileDialog;

  2. #2
    Join Date
    Jun 2005
    Location
    Tirunelveli-Tamil Nadu-India
    Posts
    354

    Re: Displaying image

    CString filename;
    TCHAR szFilters[] = _T("bmp files (*.bmp)");
    CFileDialog dlg(TRUE,_T("bmp"), _T("*.bmp"),OFN_FILEMUSTEXIST,szFilters);
    if (dlg.DoModal () == IDOK)
    {
    filename = dlg.GetPathName ();
    }

    this code display only bmp files u can add to other files also into szFilters.

    Don't forget to rate
    Guna

  3. #3
    Join Date
    May 2005
    Posts
    4,954

    Re: Displaying image

    If a post helped you dont forget to "Rate This Post"

    My Article: Capturing Windows Regardless of Their Z-Order

    Cheers

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

Featured