|
From: Per W. <pw...@ia...> - 2006-06-27 05:31:10
|
Why do you bother so much with WIN32 API?
If you had worked with wxWidgets you would have a magnificent application
by now. Besides - with some care it could work on a number of other
architectures too and you wouldn't have to worry about .NET and the
direction future M$ operating systems might take.
/Per W
On Mon, 26 Jun 2006, Noorez Kassam wrote:
> When I try to debugg my print function...I receive the "An access violation(Segmentation Fault) was raised in your prorgram" error at the marked point where the function calls the PrintDlg() function. Can someone tell me if i've missed something initalizing the structure?bool print(HWND hwnd){ PRINTDLG pd; ZeroMemory(&pd, sizeof(PRINTDLG)); pd.lStructSize = sizeof(PRINTDLG); pd.hwndOwner = hwnd; pd.hDevMode = NULL; // Don't forget to free or store hDevMode pd.hDevNames = NULL; // Don't forget to free or store hDevNames pd.Flags = PD_USEDEVMODECOPIESANDCOLLATE | PD_RETURNDC; pd.nCopies = 1; pd.nFromPage = 0xFFFF; pd.nToPage = 0xFFFF; pd.nMinPage = 1; pd.nMaxPage = 0xFFFF; // try to retrieve the printer DC if( !PrintDlg( &pd ) ) // error occurs here { MessageBox( NULL, "PrintDlg( &pd ) failed!", "Fatal Error", MB_OK | MB_ICONERROR ); return -1; ...
> _________________________________________________________________
> Try Live.com - your fast, personalized homepage with all the things you care about in one place.
> http://www.live.com/getstarted
|