Site hosted by Angelfire.com: Build your free website today!
NaN Title


I dunno how many people are interested (if any), but i figured out the source for
basic resoured text. I will post the code for anyone else who is looking 
for some example like this in the future:

THE RESOURCE FILE (data.rc)

TESTDATA RCDATA
BEGIN
        "Lets see what happens....",0x0a0d, /* 0x0a0d == ",13,10,"
        "Hope Jaymeson Can get it right!!"
END


The compile line for the resource (create data.dll):

> Resource.bat data.rc
> Link /SUBSYSTEM:WINDOWS /DLL /NOENTRY data.res


Needed code fragment in WinProc (or where ever)

     szText libname,"data.dll"
     invoke LoadLibraryEx, addr libname, NULL, LOAD_LIBRARY_AS_DATAFILE
     mov hDll, eax  ; store the module handle

     szText rsrcName, "TESTDATA"
     invoke FindResource, eax, addr rsrcName, RT_RCDATA
     mov hData, eax  ; store the resource handle
     invoke LoadResource, hDll, eax
     mov lpData, eax ; store the Global Memory pointer

     ; Test it's effective use...
     invoke MessageBox,hWin,lpData,ADDR szDisplayName,MB_OK
     invoke SetWindowText, hEdit, lpData

     ; NOTE to other newbie's, lpData will destroy after this call
     invoke FreeLibrary, hDll                              


Well There it is... i hope it helps someone, Personally im quite happy with how 
it turned out, thanx again Ernie and Umbongo for your assistance.

Go Back?