.exe icon in MC++ 
Author Message
 .exe icon in MC++

Hi all, I'm sure this is an old topic but I really can't
find this info:

how can I set the executable icon of my programs developed
in MC++? I mean the icon shown by Explorer.

By the way, is it possible, with Managed C++, to embed
icons and bitmap inside the executable and loading them
like we did in MFC (for example using resource IDs or
something like that) instead of loading from .ICO and .BMP
files?

Any hint is appreciated.

Thanks,
    Max



Sun, 26 Jun 2005 21:57:24 GMT  
 .exe icon in MC++
Hi Max,

The icon shown in Windows Explorer is Win32 resource. You can insert the
Win32 resource by right clicking the project in the Solution Explorer and
choose Add Resource. If there are multiple icons in the resource, the one
with the small ID is shown in Explorer.

Regarding the second question, there two types of resources we can use in
MC++. Win32 resource and managed resource. To insert Win32 resource, use
the steps described above. Then, we can access the resource using Win32
API, such as LoadBitmap, LoadString, etc.

To access managed resource, we will need to use the /ASSEMBLYRESOURCE
linker switch to embed a .resources file to the assembly. This can be done
using VS .NET IDE:

1. Open the project's Property Pages dialog box. For details, see Setting
Visual C++ Project Properties.
2. Click the Linker folder.
3. Click the Input property page.
4 .Modify the Link to Managed Resource File property.

To access the resource via code, please check the article below:

319292 HOW TO: Embed and Access Resources by Using Visual C# .NET
http://support.microsoft.com/?id=319292

Note: You will need to translate the C# code to MC++ code.

For more information about using .NET resources, please check the article
below:

http://msdn.microsoft.com/library/en-us/cptutorials/html/resources_an...
ization_using_the__net_framework_sdk.asp

Note: The URL may wrap.

Hope this helps.

Best Regards,
Leo Chen

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| Content-Class: urn:content-classes:message


| Subject: .exe icon in MC++
| Date: Wed, 8 Jan 2003 05:57:24 -0800
| Lines: 16

| MIME-Version: 1.0
| Content-Type: text/plain;
|       charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcK3Hd7gGEJjuY7PT46K0IksX1aqxg==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.languages.vc
| Path: cpmsftngxa06
| Xref: cpmsftngxa06 microsoft.public.dotnet.languages.vc:19011
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.languages.vc
|
| Hi all, I'm sure this is an old topic but I really can't
| find this info:
|
| how can I set the executable icon of my programs developed
| in MC++? I mean the icon shown by Explorer.
|
| By the way, is it possible, with Managed C++, to embed
| icons and bitmap inside the executable and loading them
| like we did in MFC (for example using resource IDs or
| something like that) instead of loading from .ICO and .BMP
| files?
|
| Any hint is appreciated.
|
| Thanks,
|     Max
|



Sat, 02 Jul 2005 15:18:19 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. .exe Icon is not the same as the application icon

2. MC++ Toolbox Icon - HELP!!!! (X-Post)

3. limitation with MC++, Remoting, CAO, and soapsuds.exe

4. soapsuds and MC++ .exe

5. MC.EXE and VC6

6. MC.exe & FormatMessage

7. mc++ causes designer problems

8. Is const for value references obsolete in mc++?

9. Any chance making ConditionalAttribute work with mc++

10. ngen:ed mc++ dll stops working!

11. mc++ causes designer problems

12. Security for mc++ apps

 

 
Powered by phpBB® Forum Software