![]() |
|
#1
|
|||
|
|||
Display image on box or windowhey all,
i begin with fltk. i would like to know how to display two frames(images) in on window or in two box. i am using fltk 2. my code is : CPP / C++ / C Code:
on window with two boxes and a small gray zone on the right box. i tried to change the link to my frame (i used the real link) i have the same result. thanks to all |
|||
|
#2
|
||||
|
||||
Re: display image on box or windowQuote:
Hello and Welcome to GIDForums™ FLTK Forum montagne. Check out this thread and see if the information helps. Mark __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#3
|
|||
|
|||
Re: display image on box or windowHi,
i saw the thread. i have done the same thing to resolve my problem with no succes. so i explain the situation : i have my code in FTLK directory CPP / C++ / C Code:
(the frame used can be seen at CPP / C++ / C Code:
i use fltk2 and kubuntu thanks all. |
|
#4
|
||||
|
||||
Re: Display image on box or windowI am a bit busy today so here it is without rhyme or reason.
Ask any questions or post comments and I'll get to them later. CPP / C++ / C Code:
Mark BTW, I usually use 1.1.x from subversion. 2.0 was a pain to compile with CygWin... __________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#5
|
||||
|
||||
Re: Display image on box or windowThats what happens when I try and rush something out. Here's a better attempt.
CPP / C++ / C Code:
__________________
"Opportunity is missed by most people because it comes dressed in overalls and looks like work." --Thomas Alva Edison "Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --Benjamin Franklin "A happy person is not a person in a certain set of circumstances, but rather a person with a certain set of attitudes." --Hugh Downs |
|
#6
|
|||
|
|||
Re: Display image on box or windowSorry for the necro, but I was having similar problems and couldn't locate a definitive answer... this was the thread that kept coming up in my searches.
I'm new to FLTK, and I'm starting with 2.0. I like the high-speed, low-drag implementation so far, but it is quite different to what I'm accustomed to (VCL/CLX, Juce). WRT displaying images in FLTK 2.0, I ran into two major issues: #1 -- linker error (undefined reference to xpmImage::fetch), resolved by putting fltk2_images before fltk2 in library link order, and #2 -- empty boxes when trying to display PNG images, resolved by adding libpng to the link (duh) and a call to fltk::register_images() at program start. I resolved #1 through trial and error, and I'm not familiar enough with fltk to explain why rearranging link order fixed it (maybe an initialization dependency in fltk2? less likely, a problem with gcc 4.2.1?). #2 was more frustrating, and it wasn't until I copied and pasted Mark's code and started dissecting that I stumbled across the call to register_images(), which was missing in my code (and in the OP's as well). I have not been able to find this function documented anywhere (the official doxygen links to a missing page at the moment), and the only reference to it that I could find was in SharedImage::add_handler, which made it appear to be some internal thing. I did not bother to look in any of the v1 docs. Payin' it forward... |
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can't display PNG deleted image in MHT | Flavs83 | Web Design Forum | 0 | 17-Apr-2007 10:50 |
| How to create or display an image | Unit1 | C Programming Language | 1 | 27-Sep-2006 02:18 |
| need help with a console menu system | BullBuchanan | C++ Forum | 6 | 20-Aug-2006 14:46 |
| GIM gidedit - a fltk fluid resize project | cable_guy_67 | FLTK Forum | 2 | 01-Jun-2005 15:00 |
| Checking source codes of image, audio and video files | onauc | C Programming Language | 5 | 26-Feb-2005 21:47 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The