Thread: How to place an icon in a window?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,666
    So what does your code look like at the moment?

    FLTK 1.3.8: Fl_RGB_Image Class Reference
    FLTK 1.3.8: Fl_PNG_Image Class Reference
    These allow you to build an image object from data in memory.

    The PNG one would seem to be easy enough to try, since you already load "icon.png".
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  2. #2
    Registered User marcelo.br's Avatar
    Join Date
    Nov 2018
    Posts
    45
    Quote Originally Posted by Salem View Post
    So what does your code look like at the moment?

    FLTK 1.3.8: Fl_RGB_Image Class Reference
    FLTK 1.3.8: Fl_PNG_Image Class Reference
    These allow you to build an image object from data in memory.

    The PNG one would seem to be easy enough to try, since you already load "icon.png".
    As I stated in the question. I want the png written in the source. Not in memory, so there is no icon.png

    Example, below is an image written in source that I can save as a png if I want!

    Creating the image below is easy, but it's not the image I want!
    I want to have my image like the one I wrote in the source!

    Code:
       int my_icon[13][13] = {
       { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 },
       { 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 },
       { 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47 },
       { 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 },
       { 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79 },
       { 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95 },
       { 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111 },
       { 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127 },
       { 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143 },
       { 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159 },
       { 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175, 175 },
       { 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191 },
       { 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, 207 }};
    Image of my_icon above written in source

    How to place an icon in a window?-gfgpgm2-png

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 02-26-2006, 06:29 PM
  2. Title and Icon On Window
    By matth in forum C++ Programming
    Replies: 0
    Last Post: 03-21-2005, 03:53 PM
  3. make window stay in one place
    By space_ in forum Windows Programming
    Replies: 1
    Last Post: 07-12-2004, 02:07 PM
  4. How to place your ICON on the top window
    By myispnet in forum Windows Programming
    Replies: 4
    Last Post: 01-07-2003, 08:49 AM
  5. How to place controls on a window
    By samudrala_99 in forum Windows Programming
    Replies: 5
    Last Post: 12-06-2002, 04:56 PM

Tags for this Thread