Display a .jpg

This is a discussion on Display a .jpg within the Windows Programming forums, part of the Platform Specific Boards category; Hi, In a separate thread my program brings up a second window where it displays a rectangle then destroys the ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    20

    Display a .jpg

    Hi,

    In a separate thread my program brings up a second window where it displays a rectangle then destroys the window.
    Code:
    	CFrameWnd *pSecondWin = new CFrameWnd;
    	pSecondWin->Create(NULL, "Second Window", WS_OVERLAPPEDWINDOW, SECONDWINDOWDIM);
    	pSecondWin->ShowWindow(SW_SHOW);
    	CDC *pDC = pSecondWin->GetDC();
    	CBrush brush1;
    	brush1.CreateSolidBrush(RGB(255,255,0));
    	CRect rFlash = RECTANGLESTIMDIM;
    	pDC->SelectObject(&brush1);
    	pDC->Rectangle(rFlash);
    	Sleep(dwPictureDuration);
    	pSecondWin->ReleaseDC(pDC);
    	pSecondWin->DestroyWindow();
    	_endthread();
    Instead of displaying a simple geometric object how do I display a .jpg file from a directory in the computer

    Thanks
    Matt

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,246
    I posted code on how to do this in this thread

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. display character size...(quite urgent..)
    By karthi in forum C Programming
    Replies: 10
    Last Post: 07-11-2007, 09:42 PM
  2. new problem with class
    By jrb47 in forum C++ Programming
    Replies: 0
    Last Post: 12-01-2006, 07:39 AM
  3. how to display a .jpg
    By Noobie in forum C++ Programming
    Replies: 10
    Last Post: 02-23-2003, 06:09 PM
  4. Need a Code to display .jpg files
    By arvindkr in forum C++ Programming
    Replies: 4
    Last Post: 08-31-2002, 05:43 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

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