[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Microsoft Visual Basic |
|
Moderator: | TAMARA::DFEDOR::fedor |
|
Created: | Thu May 02 1991 |
Last Modified: | Thu Jun 05 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 2565 |
Total number of notes: | 10453 |
2542.0. "Help needed to get ICONWRKS to work under VB4" by NPSS::COOPER () Tue Apr 29 1997 13:21
(also posted to comp.lang.basic.visual.misc)
I'm having trouble getting ICONWRKS to work properly under VB4.0 (16-bit)
either with Win3.1 or Win95. I know that VB 4.0 has some advanced graphics
capabilities over VB 3.0 (which is where ICONWRKS came from) but I'm using
ICONWRKS to understand API programming as described in Appleman's "Visual
Basic Programmer's Guide to the Windows 3.1 API.
A friend of mine still has VB3.0 and ICONWRKS works fine both under Win3.1
and Win95.
I've noticed that after fixing a few initial VB3.0 -to- VB4.0 style bugs
that the programs runs enough to allow me to edit in the pic_edit
picture box (that's the one the user sees) but when the mouse_up event
occurs, the copy of the current icon over in the status area doesn't
update. This copy of the icon is what gets saved to a file using the
SavePicture statement. My problem is that none of my edits make it to the
file (whatever.ICO)
I've traced through the program after pic_edit_mouse_up and have come to a
critical point with the update_icon subroutine.
First I noticed that the source code used integers for the GetBitmapBits
function return when the (Win 3.1) API calls for long.
Also they pass numeric constants without enforcing integer vs.
long but I guess VB takes care of that.
They copy bits from the pic_image and pic_mask to pic_icons(currentIcon)
by BitBlt-ing the monochrome mask bits through a compatible memory
device context (monohdc) and GetBitmapBits & GlobalLock to copy them to
pic_icon(currentIcon).picture_base_address+12. The image bits are copied
by GetBitmapBits from pic_image.image to
pic_icons(currentIcon).picture + 12 + 128. Then they force a paint event on
pic_icons(currentIcon). This all works under 3.0 (even with improper API
function return types) but not for my case. If there's a underlying knowledge
of VisualBasic-specific internal graphics formats, I'd like to get that
information. Then again, it seems a bit to implementation specific to be
the preferred solution to htis kind of problem.
Since the problem moves with VB version and is independent of Win3.1 vs.
Win95 could there have been a change in internal graphics controls' memory
layout from 3.0 to 4.0? Is the internal structure of .picture and .image
detailed anywhere?
Did I miss a release notes file? Should I be taking a different diagnosis
track? IF I missed some obvious VB3-to-VB4 notes would you please give me
some of the note numbers? I apologize if I'm asking one of those FAQ's.
I have pro edition. Is that what "PDK" as used elsewhere in this notes
conference means? I have not yet looked into the CDK.
Thanks for any and all help,
--
Jeff Cooper
Digital Equipment Corp
Networks Engineering
[email protected]
T.R | Title | User | Personal Name | Date | Lines |
---|
2542.1 | suggestion | XSTACY::PATTISON | A rolling stone gets the worm | Thu May 01 1997 13:29 | 6 |
|
For technical info about Icons and VB, I suggest you try the book
"Hardcore Visual Basic" (Microsoft Press) 1-55615-667-7
It might not answer your specific problem but its very informative.
Dave
|