Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi guys,
I developed one MFC/GUI based application in visual studio 2005(c++) . I need to add one logo or image to my application.Pls let me know some tutorial or site to check for this ....pls Help me it is some what urgent ..Thanks in advance'
Posted

Hi,

If your requirement is to change the GUI application ICON, here is you answer

Change ICON of MFC Application and Dialog[^]
 
Share this answer
 
Comments
Member 9102753 20-Jun-12 1:00am    
No actually like one button in the GUI the picture or image should be there permanently .it may be of 3cm x3cm size is good enough
Binu MD 20-Jun-12 1:18am    
then you can use a MFC picture control for loading image and you can set its size too. This link may be useful

http://www.functionx.com/visualc/controls/picture.htm
What we used to do for a MDI application to draw our company logo on the background of the main frame background, was to create a simple CWnd derived class and override the OnEraseBkgnd(CDC* pDC) method to draw our stuff.

The way we link that class to the current main frame class :

C++
class CMainFrame : public CMDIFrameWndEx
{
///  ...
  CMDIClient m_MDIClient; // CMDIClient is there to draw on the Application background.
/// ...
}


C++
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
// ... lot of code...

	// Install the view of this main frame.
	VERIFY( m_MDIClient.mbSubclassWindow(this) );

// ... lot of code...
}


As I wrote, the drawing is done in the CMDIClient::OnEraseBkgnd() method.

If you are doing a dialog based application, you should be able to adapt (or get inspiration) from the above.


THis should get you started.

Good luck.
 
Share this answer
 
Comments
Sandeep Mewara 20-Jun-12 1:44am    
5!
Where do you want to add your logo ?

As a splash screen ? in the about box ? as icons in the title bar ? somewhere else
?
 
Share this answer
 
Comments
Member 9102753 19-Jun-12 10:31am    
Just i need to add my Company logo on the top of my application .some thing like icon
nv3 19-Jun-12 10:48am    
No need to downvote the friendly person who is trying to help you.
Maximilien 19-Jun-12 10:49am    
What is the "top" of your application? the title bar ?

Have a look at the application resources, you can change a lot of things there (application icons, bitmaps, ... )

Are you talking about a splash screen? or display the logo as part of the background of the application ?

Please, look up the definition of a "splash screen", is that what you want ?
Member 9102753 19-Jun-12 13:43pm    
just to make that logo in the background of the GUI application ....not like splash screen.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900