
printing and graphics help needed- willing to pay
I have a DOS graphics program that I have been marketing for the past
eight years. I am currently upgrading the program for Windows and am
nearly finished but need help with the following two graphic questions.
Because I am eager to get this out to my users as soon as possible I am
willing to pay for graphics consulting or code. My current needs are:
1. I need to print the bitmap the users are drawing. I can use the
Printform method but it is not elegant and I cannot size it the way I
want. I have tried the code in the Knowledge Base Article # Q85978-
I get stopped in the PrintClient function at this line:
r = GetWindowRect(hWnd_SrcWindow, Rect)
The error message is:
"Bad DLL calling convention"
This is the code in the declarations:
Declare Function GetWindowRect Lib "User" (ByVal hWnd, lpRect As RectType)
What I am trying to do is print a picture box in which the user will have
many polygon shapes drawn (it is actually a quilt design). The user will
want to print these frequently and easily and quickly. I can print using
the graphic methods except in two cases- where I use the API calls to fill
the shapes e.g. CreatePatternBrush, FillRgn, or Floodfill. The Printer
doesn't respond to these commands so I am looking for another way to print
these designs out. I am using VB3 to create a 16 bit program and VB4 to do
the 32 bit program.
2. I am using the following code to paint the shapes the user draws with
an 8 X 8 pattern created from a bitmap. The code seems to work fine in the
16 bit version of the program but causes all sorts of weird problems in
the 32 bit version. The main problem is loss of resources every time I use
the code.
DrawScreen.Image2(1).Picture = DrawScreen.Picture1(whichpat).Image
hBitbrush% = DrawScreen.Image2(1).Picture
hbrush% = CreatePatternBrush(hBitbrush%)
hOldBrush% = SelectObject(DrawScreen.Block1.hDC, hbrush%)
r = SetPolyFillMode(DrawScreen.Block1.hDC, WINDING)
r = Polygon(DrawScreen.Block1.hDC, POINTS(1), PolyPts)
hrgn% = CreatePolygonRgn(POINTS(1), PolyPts, WINDING)
If hrgn% Then bool% = FillRgn(DrawScreen.Block1.hDC, hrgn%, hbrush%)
r = SelectObject(DrawScreen.Block1.hDC, hOldBrush%)
trash% = DeleteObject(hbrush%)
trash% = DeleteObject(hBitbrush%)
trash% = DeleteObject(hrgn%)
Again let me repeat, I am working against a deadline and I am willing to
pay for consultation. If possible please e-mail me. Thank you.
Nina Antze
AOL- NinaA
compuserve-72407,3550