RE: Help testing transparentBlt function
- Posted by Derek Parnell <ddparnell at bigpond.com> Apr 03, 2001
- 454 views
> In the app I'm writing Win32Lib's transBlt has become a major > bottleneck, so I'm looking for a better (faster) way to do it. > The TransparentBlt function in MSIMG32.DLL seems perfect for the job, > but I'm not totally sure how will this is supported throughout the > various versions of windows. > I've attached a quick test, could anyone who has the time run this and > tell me the result along with any information you can give about your > system (OS version ect). It requires win32lib for a reason I haven't > been able to figure out yet (i don't use any win32lib > functions but it just > doesn't work if i don't include it). > Hi Thomas, try this instead ... ----------------------- include dll.e constant MSIMG32 = open_dll("msimg32.dll") if MSIMG32 = 0 then puts(1,"Unable to load the msimg32.dll :(\nPress any key to continue...") ? gets(0) abort(1) end if constant funcTransparentBlt = define_c_func(MSIMG32,"TransparentBlt",{C_POINTER,C_INT,C_INT,C_INT,C_INT,C_ POINTER,C_INT,C_ INT,C_INT,C_INT,C_UINT},C_ULONG) if funcTransparentBlt < 0 then puts(1,"Unable to use TransparentBlt function :(\nPress any key to continue...") ? gets(0) abort(1) end if puts(1,"Everything is fine, TransparentBlt can be used :)\nPress any key to continue...") ? gets(0) --------------------- You don't need win32lib if you test the return of define_c_func() correctly. A zero return is valid for this function, because it returns -1 if an error is detected. ----------- cheers, Derek Parnell