-
November 19th, 2003, 04:19 PM
#1
Picture control
Hi,
i'm trying to use an picture control, but i couldn't open a bitmap from an especified folder without include it in the resource view...
Thanks in advance,
Diego
My history: QB->VB->TC++->VB->VC++->VC#
-
November 19th, 2003, 06:39 PM
#2
To use bitmaps at design time, you have to include all bitmaps in your resource file, because of how Windows .EXEs work. If you want to load the bitmap at runtime, look into the GDI+ library, specifically the Image class and the Image::FromFile function, which loads a picture from a file via code rather than loading from a resource.
-
November 19th, 2003, 06:43 PM
#3
Or look at the ::LoadImage function
Wakeup in the morning and kick the day in the teeth!! Or something like that.
"i don't want to write leak free code or most efficient code, like others traditional (so called expert) coders do."
-
November 19th, 2003, 06:48 PM
#4
Originally posted by souldog
Or look at the ::LoadImage function
Yes, but ::LoadImage only applies to bitmaps which are already in the app's resource table.
-
November 19th, 2003, 07:25 PM
#5
Originally posted by Apoch
Yes, but ::LoadImage only applies to bitmaps which are already in the app's resource table.
No, by using the LR_LOADFROMFILE flag, ::LoadImage() will load bitmaps from files.
-
November 19th, 2003, 09:02 PM
#6
Originally posted by gstercken
No, by using the LR_LOADFROMFILE flag, ::LoadImage() will load bitmaps from files.
Interesting... learn something new every day
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|