Hello, i've a question to LoadImage: how I could achieve the same in NT or in both platforms? i mean to load and display image in run time. i've found out that this work well in win 9.x

LoadImage   hinst,
            lpszName, ; = szfilename
            uType,    ; = IMAGE_BITMAP
            cxDesired,; = desired width
            cyDesired,; = desired height
            fuLoad    ; = LR_LOADFROMFILE

but it is Now Supported on Windows NT. tnx for help. Hiro says: use the code tags This message was edited by Hiroshimator, on 2/6/2001 12:29:46 AM
Posted on 2001-02-06 00:20:00 by forge
According to my copy of MSDN LoadImage is supported under NT, in fact: Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Posted on 2001-02-06 00:27:00 by Ernie
Thanks a lot Ernie, It helps me as I don't have Win NT to try to run the code, I have Win 98 and want my code to run under NT as well. To me it was a bit confusing as Win32.hlp states clearly - LoadImage - - - Windows NT: LR_LOADFROMFILE is not supported - Oh well whole world is changing - Why not coding. tnx again Ernie for help. forge
Posted on 2001-02-06 01:36:00 by forge
The win32.hlp file doesn't take into acount any of the service packs for windows NT4.0 therefor, it may be supported with a newer service pack installed. But the original WinNT doesn't support that flag LR_LOADFROMFILE. It the same for many of the common controls, lot's of them (Like ListView control, ReBar control, etc...) Are only available with a later service pack or new version (4.01+) of IE. - Ben
Posted on 2001-02-06 20:17:00 by cyberben
Thanks cyberben, It is clear to me now. I have one more question, this time irrelevant to the previous. Here are 3 different code - showing how to alocate memory. I assume the memory will be used locally to the procedure. Which one of then should I use? These three look the same to me or I think they do the same thing.
  
;1--------- zero initialised -------------------------------------
	invoke GlobalAlloc,GMEM_MOVEABLE or GMEM_ZEROINIT,REQ_memsize
		mov  hMemory,eax
	invoke GlobalLock,eax
		mov  pMemory,eax
		;.....my code here.....
	invoke GlobalUnlock,pMemory
	invoke GlobalFree,hMemory

;2--------- not  zero initialised --------------------------------
\    invoke iMalloc, REQ_memsize  ; by Ernie
		mov  pMemory,eax
		;.....my code here.....
    invoke iFree,pMemory

;3---------- local to the proc -----------------------------------
	LOCAL pMemory :BYTE
		;.....my code here.....
    ; no need to free
;-----------------------------------------------------------------
Thanks forge
Posted on 2001-02-07 01:24:00 by forge