printing and graphics help needed- willing to pay 
Author Message
 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



Sat, 30 Jan 1999 03:00:00 GMT  
 printing and graphics help needed- willing to pay

Quote:

>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)

Nina:

Your main problem is that the declarations between 16 bit and 32 bit
are different. I have listed a couple below to show you. The primary
differences are the integers have been changed to longs and as you can
see the libraries are different    "gdi"  vs  "gdi32"    etc......
This should fix most of your problems. If not all of them.

From WinAPI32.txt

Declare Function CreatePatternBrush Lib "gdi32" Alias
"CreatePatternBrush" (ByVal hBitmap As Long) As Long

Declare Function GetWindowRect Lib "user32" Alias "GetWindowRect"
(ByVal hwnd As Long, lpRect As RECT) As Long

****************************
From WinAPI16.txt

Declare Function CreatePatternBrush Lib "GDI" (ByVal hBitmap As
Integer) As Integer

Declare Function GetWindowRect Lib "User" (ByVal hWnd, lpRect As
RectType)

Best Regards

P.S. If you were using VB4.0 16 bit you could use the compilations
constructs of IfWin32#  or IfWin16# but since you are using VB3.0 for
you six{*filter*} bit you will have to have two copies of your program... :(
Jim Huguley

* Those who sit and think *
* Mostly sit              *



Mon, 01 Mar 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB Mentor needed to assist me, willing to pay $$$

2. In need of a programmer. Willing to pay

3. I need someone to teach my VB willing to pay

4. need a script willing to pay

5. Help wanted - willing to pay fair hourly rate

6. Willing to pay for a searchable Internet Database

7. Willing to pay for a searchable Internet Database

8. Crystal Reports Licensing - Willing to Pay for Expertise

9. HELP NEEDED : How do I PRINT GRAPHICS !!!!!

10. Help needed in finding Excel add-on or stand-alone program. Am willing to pay !

11. Help needed in finding Excel add-on of stand-alone program. Am willing to pay !

12. Help needed in finding Excel add-on or stand-alone program. Am willing to pay !

 

 
Powered by phpBB® Forum Software