From a73c7f58e6a0bb4b4eab922396500c25c118a18b Mon Sep 17 00:00:00 2001
From: Michael R Sweet Note: you must call
+Fl_Window::show(argc, argv) for the icon to be used. The
+Fl_Window::show() method does not bind the icon to the window.
+
Note: you must call
+Fl_Window::show(argc, argv) for the icon to be used. The
+Fl_Window::show() method does not bind the icon to the window.
+
Setting the Icon of a Window
- FLTK currently supports setting a window's icon *before* it is shown
+FLTK currently supports setting a window's icon *before* it is shown
using the Fl_Window::icon() method.
void Fl_Window::icon(char *)
- Sets the icon for the window to the passed pointer. You will need to
+Sets the icon for the window to the passed pointer. You will need to
cast the icon Pixmap to a char * when calling this
method. To set the icon using a bitmap compiled with your application
use:
@@ -249,6 +249,11 @@ Pixmap p = XCreateBitmapFromData(fl_display, DefaultRootWindow(fl_display),
window->icon((char *)p);
+
+WIN32-Specific Interface
@@ -330,6 +335,14 @@ application use:
window->icon((char *)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON)));
+
+You can also use the LoadImage() and related functions to load
+specific resolutions or create the icon from bitmap data.
+
+How to Not Get a MSDOS Console Window
WIN32 has a really stupid mode switch stored in the executables that
controls whether or not to make a console window.
@@ -360,4 +373,4 @@ feature, not a bug.
SetCapture (used by Fl::grab()) doesn't work, and the main window title bar turns gray while menus are popped up.
FLUID does not support BMP files yet.
-