Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to create picture for executable?

funkydude9funkydude9 Member Posts: 48
How would I go about creating a picture for my exe file? Im using MSVC.

Comments

  • rollerolle Member Posts: 115
    : How would I go about creating a picture for my exe file? Im using MSVC.
    :
    [green]
    Can you be more specific. Do you mean an icon for your exe or something else?
    [/green]

  • funkydude9funkydude9 Member Posts: 48
    : : How would I go about creating a picture for my exe file? Im using MSVC.
    : :
    : [green]
    : Can you be more specific. Do you mean an icon for your exe or something else?
    : [/green]

    exactly - an icon for my exe.
    :
    :

  • rollerolle Member Posts: 115
    : : : How would I go about creating a picture for my exe file? Im using MSVC.
    : : :
    : : [green]
    : : Can you be more specific. Do you mean an icon for your exe or something else?
    : : [/green]
    :
    : exactly - an icon for my exe.
    : :
    : :
    :
    :
    [green][b]MFC:[/b]
    In your project, go the Resource View. Then, choose Icon and IDR_MAINFRAME. In the icon editor that pops up, insert or create the icon you need. Note that you can have several version of your icons, like 16X16 and 32X32 (these are used in different situations).

    [b]Non MFC:[/b]
    You need to have an external ICO file containing the icon you want (this icon can be created with the icon editor supplied with MFC or any other ICO capable editor of your choice). Also, you need an RC file. In this file, you have a line like
    RC_MYICON ICON "myicon.ico"
    Where RC_MYICON is a [b][red]#define[/red][/b] (make sure to have this value in a header file) for your icon and "myicon.ico" is the filename representing it.

    In your source code then, you have a code fragment like
    WNDCLASSEX wc;
    ...
    wc.hIcon = LoadIcon(hInstance,MAKEINTRESOURCE(RC_MYICON));
    ...(other line filling in values for wc)
    RegisterClassEx(&wc); // Register class

    Good luck!!!
    [/green]
  • Justin BibJustin Bib USAMember Posts: 0

    ____ \ http://forcoder.org \ free ebooks and video tutorials about \ R PL/SQL Assembly C# Visual Basic C Ruby Python MATLAB Delphi Visual Basic .NET Go JavaScript Perl C++ Java Scratch Objective-C Swift PHP Erlang Clojure FoxPro ABAP Dart COBOL Logo Fortran Prolog ML Alice Rust Bash Julia Awk Ada Lisp LabVIEW Lua F# Scheme Kotlin SAS Scala Crystal VBScript Apex Transact-SQL D Hack \ __

Sign In or Register to comment.