>Declare Integer CreateDC in Win32API ; > String lpszDriver, ; > String lpszDevice, ; > String lpszOutput, ; > String lpInitData > >lcPrinterName = GetPrinter() > >lnPrinterHDC = CreateDC("WINSPOOL",m.lcPrinterName,.NULL., .NULL.) > >thisform.oleMap.OutputMap(lnPrinterHDC) >>
Public oForm oForm = Createobject('myForm') oForm.Show() Define Class myForm As Form Height = 600 Width = 800 DoCreate = .T. Add Object ComDlg As OleControl With ; Oleclass = "MSComDlg.CommonDialog.1" Procedure ComDlg.Init This.Flags=0x100 Endproc Procedure cmdPrint.Click With Thisform .ComDlg.ShowPrinter .myMo.OutPutMap2(.ComDlg.hdc, _x,_y,_width,_height) Endwith Endproc EnddefinemyMo,_x,_y,... are MO object and variables (not in code). Also I remember MO had ExportMap and PrintMap too (to file?).