Scaling Printer Device Context between Visual Basic 4.0 and Visual C++ Problem 
Author Message
 Scaling Printer Device Context between Visual Basic 4.0 and Visual C++ Problem

  Scaling Printer Device Context between Visual Basic 4.0 and Visual C++ Problem
-----------------------------------------------------------------------------------------------

After trying the following stuff, I realize that the specified scale was not used by the dll function
                                        -------------------------------------
for the drawing of the rectangle.

VB:     Declare Sub FctTestPrinter lib "test.dll" ( ByVal hdcPrinter As Long )
        Printer.ScaleHeight=2000
        Printer.ScaleWidth=2000
        FctTestPrinter( Printer.hdc )

VC++:   ( test.dll )
        void FctTestPrinter( HDC hdcPrinter )
        {       CDC *pDC=CDC::FromHandle(hdcPrinter);
                pDC->StartDoc( ...);
                pDC->StartPage();
                pDC->Rectangle(500,500,1500,1500);
                pDC->EndPage();
                pDC->EndDoc();
        }

It's the same when the scale is modified directly from VC++ ( SetWindowExt and SetViewPortExt ).
It's the same when the default printer is also get directly from VC++ ( EnumPrinters, createDC ... ).
When all printing is done with VC++ there is no problem ( test.dll called by an main C program ).
As soon as VB is involved, no more printing scalings and Pen type modifications are available !?
Did someone encounter such a problem or could solve it ?




Tue, 06 Apr 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. FS: Mastering Microsoft Visual Basic 4.0 and Visual C++ 4.0 CD-ROMs

2. Visual Basic 4.0 usage of DLLs written in Visual C++ 4.0

3. Visual Basic 4.0 usage of DLLs written in Visual C++ 4.0

4. [Fwd: Visual Basic 5.0 to Visual C++ 4.0]

5. Visual C++/Visual Basic/COM problem

6. Visual C++ and Visual Basic and Visual J++

7. ActiveX created in Visual C++ 6 gives problems in Visual Basic 6

8. VB 4.0 calling Visual C++ 4.0 problem.

9. VB 4.0 calling Visual C++ 4.0 problem.

10. need some basic information on visual basic and visual c++

11. need some basic information on visual basic and visual c++

12. Visual Basic 3.0 vs Visual Basic 4.0

 

 
Powered by phpBB® Forum Software