Lines Matching refs:pd
453 PRINTDLG pd;
457 memset(&pd, 0, 66);
458 pd.lStructSize = 66;
460 memset(&pd, 0, sizeof(PRINTDLG));
462 pd.cbStruct = sizeof(PRINTDLG);
464 pd.lStructSize = sizeof(PRINTDLG);
468 pd.hwndOwner = (HWND)NULL;
469 pd.hDevMode = NULL; // Will be created by PrintDlg
470 pd.hDevNames = NULL; // Ditto
471 //pd.hInstance = (HINSTANCE) wxGetInstance();
473 pd.Flags = PD_RETURNDEFAULT;
474 pd.nCopies = 1;
478 if (!PrintDlg(&pd))
480 if ( pd.hDevMode )
481 GlobalFree(pd.hDevMode);
482 if ( pd.hDevNames )
483 GlobalFree(pd.hDevNames);
484 pd.hDevMode = NULL;
485 pd.hDevNames = NULL;
495 hDevMode = pd.hDevMode;
497 pd.hDevMode = NULL;
500 if ( pd.hDevNames )
501 GlobalFree(pd.hDevNames);
502 pd.hDevNames = NULL;
504 // hDevNames = pd->hDevNames;
506 // pd->hDevnames = NULL;
733 PRINTDLG *pd = (PRINTDLG *) m_printDlg;
734 if (pd && pd->hDevMode)
735 GlobalFree(pd->hDevMode);
736 if ( pd )
737 delete pd;
747 PRINTDLG *pd = (PRINTDLG*) m_printDlg;
750 pd->hwndOwner = (HWND) m_dialogParent->GetHWND();
752 pd->hwndOwner = (HWND) wxTheApp->GetTopWindow()->GetHWND();
754 pd->hwndOwner = 0;
756 bool ret = (PrintDlg( pd ) != 0);
758 pd->hwndOwner = 0;
760 if ( ret && (pd->hDC) )
762 wxPrinterDC *pdc = new wxPrinterDC( (WXHDC) pd->hDC );
790 PRINTDLG *pd = (PRINTDLG*) m_printDlg;
793 if (pd)
796 pd = new PRINTDLG;
797 memset( pd, 0, sizeof(PRINTDLG) );
798 m_printDlg = (void*) pd;
802 pd->lStructSize = 66;
804 pd->lStructSize = sizeof(PRINTDLG);
806 pd->hwndOwner = (HWND)NULL;
807 pd->hDevMode = NULL; // Will be created by PrintDlg
808 pd->hDevNames = NULL; // Ditto
810 pd->Flags = PD_RETURNDEFAULT;
811 pd->nCopies = 1;
815 if (pd->hDevMode)
816 GlobalFree(pd->hDevMode);
820 if (pd->hDevNames)
821 GlobalFree(pd->hDevNames);
823 pd->hDevMode = (HGLOBAL)(DWORD) native_data->GetDevMode();
827 //wxASSERT_MSG( (pd->hDevMode), wxT("hDevMode must be non-NULL in ConvertToNative!"));
829 pd->hDevNames = (HGLOBAL)(DWORD) native_data->GetDevNames();
833 pd->hDC = (HDC) NULL;
834 pd->nFromPage = (WORD)data.GetFromPage();
835 pd->nToPage = (WORD)data.GetToPage();
836 pd->nMinPage = (WORD)data.GetMinPage();
837 pd->nMaxPage = (WORD)data.GetMaxPage();
838 pd->nCopies = (WORD)data.GetNoCopies();
840 pd->Flags = PD_RETURNDC;
843 pd->lStructSize = 66;
845 pd->lStructSize = sizeof( PRINTDLG );
848 pd->hwndOwner=(HWND)NULL;
849 // pd->hDevNames=(HANDLE)NULL;
850 pd->hInstance=(HINSTANCE)NULL;
851 pd->lCustData = (LPARAM) NULL;
852 pd->lpfnPrintHook = NULL;
853 pd->lpfnSetupHook = NULL;
854 pd->lpPrintTemplateName = NULL;
855 pd->lpSetupTemplateName = NULL;
856 pd->hPrintTemplate = (HGLOBAL) NULL;
857 pd->hSetupTemplate = (HGLOBAL) NULL;
860 pd->Flags |= PD_ALLPAGES;
862 pd->Flags |= PD_SELECTION;
864 pd->Flags |= PD_COLLATE;
866 pd->Flags |= PD_PRINTTOFILE;
868 pd->Flags |= PD_DISABLEPRINTTOFILE;
870 pd->Flags |= PD_NOSELECTION;
872 pd->Flags |= PD_NOPAGENUMS;
874 pd->Flags |= PD_PAGENUMS;
876 pd->Flags |= PD_SHOWHELP;
879 pd->Flags |= PD_PRINTSETUP;
887 PRINTDLG *pd = (PRINTDLG*) m_printDlg;
888 if ( pd == NULL )
895 if (pd->hDevMode)
902 native_data->SetDevMode( (void*)(long) pd->hDevMode );
903 pd->hDevMode = NULL;
907 if (pd->hDevNames)
914 native_data->SetDevNames((void*)(long) pd->hDevNames);
915 pd->hDevNames = NULL;
922 data.SetFromPage( pd->nFromPage );
923 data.SetToPage( pd->nToPage );
924 data.SetMinPage( pd->nMinPage );
925 data.SetMaxPage( pd->nMaxPage );
926 data.SetNoCopies( pd->nCopies );
928 data.SetAllPages( (((pd->Flags & PD_PAGENUMS) != PD_PAGENUMS) && ((pd->Flags & PD_SELECTION) != PD_SELECTION)) );
929 data.SetSelection( ((pd->Flags & PD_SELECTION) == PD_SELECTION) );
930 data.SetCollate( ((pd->Flags & PD_COLLATE) == PD_COLLATE) );
931 data.SetPrintToFile( ((pd->Flags & PD_PRINTTOFILE) == PD_PRINTTOFILE) );
932 data.EnablePrintToFile( ((pd->Flags & PD_DISABLEPRINTTOFILE) != PD_DISABLEPRINTTOFILE) );
933 data.EnableSelection( ((pd->Flags & PD_NOSELECTION) != PD_NOSELECTION) );
934 data.EnablePageNumbers( ((pd->Flags & PD_NOPAGENUMS) != PD_NOPAGENUMS) );
935 data.EnableHelp( ((pd->Flags & PD_SHOWHELP) == PD_SHOWHELP) );
937 data.SetSetupDialog( ((pd->Flags & PD_PRINTSETUP) == PD_PRINTSETUP) );
973 PAGESETUPDLG *pd = (PAGESETUPDLG *)m_pageDlg;
974 if ( pd && pd->hDevMode )
975 GlobalFree(pd->hDevMode);
976 if ( pd && pd->hDevNames )
977 GlobalFree(pd->hDevNames);
978 if ( pd )
979 delete pd;
986 PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageDlg;
988 pd->hwndOwner = (HWND) m_dialogParent->GetHWND();
990 pd->hwndOwner = (HWND) wxTheApp->GetTopWindow()->GetHWND();
992 pd->hwndOwner = 0;
994 BOOL retVal = PageSetupDlg( pd ) ;
995 pd->hwndOwner = 0;
1013 PAGESETUPDLG *pd = (PAGESETUPDLG*) m_pageDlg;
1016 if (pd)
1019 pd = new PAGESETUPDLG;
1020 pd->hDevMode = NULL;
1021 pd->hDevNames = NULL;
1022 m_pageDlg = (void *)pd;
1028 if (pd->hDevMode)
1030 GlobalFree(pd->hDevMode);
1031 pd->hDevMode = NULL;
1033 pd->hDevMode = (HGLOBAL) native_data->GetDevMode();
1037 //wxASSERT_MSG( (pd->hDevMode), wxT("hDevMode must be non-NULL in ConvertToNative!"));
1043 if (pd->hDevNames)
1045 GlobalFree(pd->hDevNames);
1046 pd->hDevNames = NULL;
1048 pd->hDevNames = (HGLOBAL) native_data->GetDevNames();
1051 // pd->hDevMode = GlobalAlloc(GMEM_MOVEABLE, sizeof(DEVMODE));
1053 pd->Flags = PSD_MARGINS|PSD_MINMARGINS;
1056 pd->Flags |= PSD_DEFAULTMINMARGINS;
1058 pd->Flags |= PSD_DISABLEMARGINS;
1060 pd->Flags |= PSD_DISABLEORIENTATION;
1062 pd->Flags |= PSD_DISABLEPAPER;
1064 pd->Flags |= PSD_DISABLEPRINTER;
1066 pd->Flags |= PSD_RETURNDEFAULT;
1068 pd->Flags |= PSD_SHOWHELP;
1071 pd->Flags |= PSD_INHUNDREDTHSOFMILLIMETERS;
1073 pd->lStructSize = sizeof( PAGESETUPDLG );
1074 pd->hwndOwner=(HWND)NULL;
1075 // pd->hDevNames=(HWND)NULL;
1076 pd->hInstance=(HINSTANCE)NULL;
1078 pd->ptPaperSize.x = data.GetPaperSize().x * 100;
1079 pd->ptPaperSize.y = data.GetPaperSize().y * 100;
1081 pd->rtMinMargin.left = data.GetMinMarginTopLeft().x * 100;
1082 pd->rtMinMargin.top = data.GetMinMarginTopLeft().y * 100;
1083 pd->rtMinMargin.right = data.GetMinMarginBottomRight().x * 100;
1084 pd->rtMinMargin.bottom = data.GetMinMarginBottomRight().y * 100;
1086 pd->rtMargin.left = data.GetMarginTopLeft().x * 100;
1087 pd->rtMargin.top = data.GetMarginTopLeft().y * 100;
1088 pd->rtMargin.right = data.GetMarginBottomRight().x * 100;
1089 pd->rtMargin.bottom = data.GetMarginBottomRight().y * 100;
1091 pd->lCustData = 0;
1092 pd->lpfnPageSetupHook = NULL;
1093 pd->lpfnPagePaintHook = NULL;
1094 pd->hPageSetupTemplate = NULL;
1095 pd->lpPageSetupTemplateName = NULL;
1098 if ( pd->hDevMode )
1100 DEVMODE *devMode = (DEVMODE*) GlobalLock(pd->hDevMode);
1105 GlobalUnlock(pd->hDevMode);
1113 PAGESETUPDLG *pd = (PAGESETUPDLG *) m_pageDlg;
1114 if ( !pd )
1121 if (pd->hDevMode)
1128 native_data->SetDevMode( (void*) pd->hDevMode );
1129 pd->hDevMode = NULL;
1136 if (pd->hDevNames)
1143 native_data->SetDevNames((void*) pd->hDevNames);
1144 pd->hDevNames = NULL;
1149 pd->Flags = PSD_MARGINS|PSD_MINMARGINS;
1151 data.SetDefaultMinMargins( ((pd->Flags & PSD_DEFAULTMINMARGINS) == PSD_DEFAULTMINMARGINS) );
1152 data.EnableMargins( ((pd->Flags & PSD_DISABLEMARGINS) != PSD_DISABLEMARGINS) );
1153 data.EnableOrientation( ((pd->Flags & PSD_DISABLEORIENTATION) != PSD_DISABLEORIENTATION) );
1154 data.EnablePaper( ((pd->Flags & PSD_DISABLEPAPER) != PSD_DISABLEPAPER) );
1155 data.EnablePrinter( ((pd->Flags & PSD_DISABLEPRINTER) != PSD_DISABLEPRINTER) );
1156 data.SetDefaultInfo( ((pd->Flags & PSD_RETURNDEFAULT) == PSD_RETURNDEFAULT) );
1157 data.EnableHelp( ((pd->Flags & PSD_SHOWHELP) == PSD_SHOWHELP) );
1161 data.SetPaperSize( wxSize(pd->ptPaperSize.y / 100, pd->ptPaperSize.x / 100) );
1163 data.SetPaperSize( wxSize(pd->ptPaperSize.x / 100, pd->ptPaperSize.y / 100) );
1165 data.SetMinMarginTopLeft( wxPoint(pd->rtMinMargin.left / 100, pd->rtMinMargin.top / 100) );
1166 data.SetMinMarginBottomRight( wxPoint(pd->rtMinMargin.right / 100, pd->rtMinMargin.bottom / 100) );
1168 data.SetMarginTopLeft( wxPoint(pd->rtMargin.left / 100, pd->rtMargin.top / 100) );
1169 data.SetMarginBottomRight( wxPoint(pd->rtMargin.right / 100, pd->rtMargin.bottom / 100) );