Thread: Display a .jpg

  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,268
    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, 08:39 AM
  3. how to display a .jpg
    By Noobie in forum C++ Programming
    Replies: 10
    Last Post: 02-23-2003, 07: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