| View previous topic :: View next topic |
| Author |
Message |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 1:10 pm Post subject: |
|
|
Hi Joe,
One other thing that you might be able to do is include your buttons
graphic as a resource and then use the LoadBitmap() API.
Replace the LoadImageA() API with the following, please note that this will
only work if your script is compiled into an exe::
| Code: |
REM This assumes your image is name BTNIMG
%%hinst = @lib(user32.dll, GetModuleHandleA, INT:, INT: 0)
REM For bitmaps use ...
%%bitmap = @lib(user32.dll, LoadBitmapA, INT:, INT: %%hinst, STR: BTNIMG)
REM And for icons use...
%%icon = @lib(user32.dll, LoadIconA, INT:, INT: %%hinst, STR: BTNIMG)
|
That's the only other way. Remember that if the ...A() APIs don't work to
change to ...W() APIs. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 2:09 pm Post subject: |
|
|
One last thought...
You could also make a button image and put a BITMAP in place of the
BUTTON. Only problem to this approach is that it won't work/look exactly
like a BUTTON element. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Tue Jul 12, 2005 5:26 pm Post subject: |
|
|
Thanks Bill for your efforts on this. It is appreciated.
I think I set it up correctly, but I am getting an error 38 at the line that has GetModuleHandleA (or with a "W"). _________________ Joe Floyd |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 8:16 pm Post subject: |
|
|
Sorry Joe.
GetModuleHandleA() is in kernel32.dll.
| Code: |
%%hinst = @lib(kernel32.dll, GetModuleHandleA, INT:, INT: 0)
|
That should fix it, I think. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Tue Jul 12, 2005 8:54 pm Post subject: |
|
|
No luck there, either.
Just to make sure I was doing it right:
I called FREELIB user32.dll, then LOADLIB the kernel .dll, then use the .dll call, then FREELIB that, then LOADLIB user32.
Is that right? _________________ Joe Floyd |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 9:37 pm Post subject: |
|
|
As far as I know you don't need to use FREELIB to call into another library.
I would just call LOADLIB for both libraries at the beginning of your script
and on exit call FREELIB for both dlls.
Call Kernel32.dll for the GetModuleHandleA() API.
And then use user32.dll for all the other API calls. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 10:02 pm Post subject: |
|
|
Try this Joe, there is a small error in my last post ::
| Code: |
%%hinst = @lib(kernel32.dll, GetModuleHandleA, INT:, NIL:)
|
_________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
jwfv Valued Contributor

Joined: 19 Mar 2002 Posts: 422 Location: Beaufort, SC
|
Posted: Tue Jul 12, 2005 10:04 pm Post subject: |
|
|
That didn't seem to produce any effect either. I don't know what the deal is - wish you could test it some way, but we are on different OSes and different VDS versions.
I guess I may just have to live with the "Reports ..." button, etc. for now.
Thanks for all your efforts, Bill - if you think of any other ideas I am game for trying them. _________________ Joe Floyd |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jul 12, 2005 10:08 pm Post subject: |
|
|
VDS is the reason I ventured off to learn C/C++ and a few others. Since
learning them, I don't use VDS much accept for testing dlls, and writing
quick utilities. So I have no need for anything more than VDS 4.5. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
|