|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Using LoadImage in VB6Using the following function call to load a bitmap but I get error 1814 - The
specified resource name cannot be found in the image file. GetBitmap = LoadImage(0, "mybitmap.bmp", _ IMAGE_BITMAP, 16, 16, _ LR_LOADFROMFILE Or LR_LOADMAP3DCOLORS) How can I get this to work? > Using the following function call to load a bitmap but I get error 1814 - Try specifying the full path to the file, also the LR_LOADMAP3DCOLORS flag > The > specified resource name cannot be found in the image file. > > GetBitmap = LoadImage(0, "mybitmap.bmp", _ > IMAGE_BITMAP, 16, 16, _ > LR_LOADFROMFILE Or LR_LOADMAP3DCOLORS) > > How can I get this to work? will only work on paletted images however this should just be ignored on higher bit-depth images. Hope this helps, Mike - Microsoft Visual Basic MVP - E-Mail: ED***@mvps.org WWW: Http://EDais.mvps.org/ On Wed, 12 Oct 2005 01:05:01 -0700, =?Utf-8?B?ZGF2aWRz?=
<dav***@discussions.microsoft.com> wrote: >Using the following function call to load a bitmap but I get error 1814 - The Post the Declaration - maybe that is wrong>specified resource name cannot be found in the image file. > >GetBitmap = LoadImage(0, "mybitmap.bmp", _ > IMAGE_BITMAP, 16, 16, _ > LR_LOADFROMFILE Or LR_LOADMAP3DCOLORS) > >How can I get this to work? Using declaration
Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, ByVal lpsz As String, ByVal iType As Long, ByVal cx As Long, ByVal cy As Long, ByVal fOptions As Long) As Long Have removed the parameter LR_LOADMAP3DCOLORS from my function call. Have changed the filename to the full pathname. Still the same error! Application I am developing calls for a returned HBITMAP of a 16X16 bitmap so I believe that LoadImage is the best man for the job. Show quoteHide quote "J French" wrote: > On Wed, 12 Oct 2005 01:05:01 -0700, =?Utf-8?B?ZGF2aWRz?= > <dav***@discussions.microsoft.com> wrote: > > >Using the following function call to load a bitmap but I get error 1814 - The > >specified resource name cannot be found in the image file. > > > >GetBitmap = LoadImage(0, "mybitmap.bmp", _ > > IMAGE_BITMAP, 16, 16, _ > > LR_LOADFROMFILE Or LR_LOADMAP3DCOLORS) > > > >How can I get this to work? > > Post the Declaration - maybe that is wrong > > > Worked out that the constants used in my function call were not defined.
(:<|) Show quoteHide quote "davids" wrote: > Using declaration > Private Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal > hInst As Long, ByVal lpsz As String, ByVal iType As Long, ByVal cx As Long, > ByVal cy As Long, ByVal fOptions As Long) As Long > > Have removed the parameter LR_LOADMAP3DCOLORS from my function call. > Have changed the filename to the full pathname. > Still the same error! > > Application I am developing calls for a returned HBITMAP of a 16X16 bitmap > so I believe that LoadImage is the best man for the job. > > "J French" wrote: > > > On Wed, 12 Oct 2005 01:05:01 -0700, =?Utf-8?B?ZGF2aWRz?= > > <dav***@discussions.microsoft.com> wrote: > > > > >Using the following function call to load a bitmap but I get error 1814 - The > > >specified resource name cannot be found in the image file. > > > > > >GetBitmap = LoadImage(0, "mybitmap.bmp", _ > > > IMAGE_BITMAP, 16, 16, _ > > > LR_LOADFROMFILE Or LR_LOADMAP3DCOLORS) > > > > > >How can I get this to work? > > > > Post the Declaration - maybe that is wrong > > > > > > On Thu, 13 Oct 2005 21:24:36 -0700, =?Utf-8?B?ZGF2aWRz?=
<dav***@discussions.microsoft.com> wrote: >Worked out that the constants used in my function call were not defined. Put this at the top of EVERY module>(:<|) Option Explicit : DefObj A-Z You'll be amazed at what it flushes out
Is there a more elegant way to do this?
Command Button Sequence populating combobox Update Workstations with new executable Compile, Save, Exit, ReStart, big trouble Problem connecting to remote MySQL DB from VB6 How many ORs can you have in ADODB Need to know when a process is exited Best way to have a subroutine modify more than one variable Expot datas in to excel sheet |
|||||||||||||||||||||||