I want to give the user the opportunity to adjust the dpi before printing. I have overridden CPrintInfo and can get my CMyPrintInfo to display instead. I'm confused with the dpi in the DEVMODE structure. Is dmPrintQuality just the horizontal resolution? Can I set dmYResolution to be any value between 1 and pDC->GetDeviceCaps(LOGPIXELSY) or are there specific hardware dependant values? When I do a "GetDevMode()->dmPrintQuality = DMRES_DRAFT", nothing changes on the output. If anyone can shed some light on any of these issues, I'd be very grateful.
Kristian Nilssen
Posts
-
Adjusting dpi for printer -
OnOpenDocument same file?I see where you are going with this. I found a call to EnableCompoundFile() in my document class, which I changed to EnableCompoundFile(FALSE). Now everything is groovy. Thanks. :-D
-
OnOpenDocument same file?That's right, in COleDocument::OnOpenDocument() the call to StgIsStorageFile() fails. I guess I could work around this by copying every document I intend to open to a temporary file but that sucks.
-
OnOpenDocument same file?BOOL CSaturn2Doc::OnOpenDocument(LPCTSTR lpszPathName) { // the following line fails. The serialize function is empty. if (!COleServerDoc::OnOpenDocument(lpszPathName)) return FALSE; blah blah blah... } My document is derived from COleServerDoc.
-
OnOpenDocument same file?Hi, I have an MFC MDI app. If one user, running one instance of the app opens a file using OnOpenDocument then another user, running another instance of the same app opens the same file, MFC reports "Failure to open document". The app does not edit the file, it's just a viewer, so I don't care if many people are opening the document. How can I tell this to MFC? thanks, Kristian.
-
OpenGL and black borderWhen I stretch the OpenGL MFC window past a certain point, my OpenGL rendered scene gets a black border. The border tends to grow as I increase the client area of the window. The bug happens most of the time, not always. Any ideas?
-
CHtmlView OnSize exceptionI have an appwizard generated SDI app. The one and only change is that my CView is a CHtmlView. The code generates an exception in the 2nd iteration of CHtmlView::OnSize() - so the program crashes immediately. I have a clean windows 2000 SP2 installation, visual studio 6 SP6 and IE5.5.2. Thought it might be a problem with whatever dll contains CHtmlView so I have tried reinstalling IE, etc. I'm going nuts. Anyone got any ideas?
-
When is m_wndToolBar initially sized inplace?My CMainFrame class has code to position my docking control bars in OnCreate(). When my app is activated as an active document server, the control bars are created in OnCreateControlBars(). The code to dock each control bar requires m_wndToolBar.GetWindowRect(). The result of GetWindowRect()is silly when called from OnCreateControlBars(). Does anyone know where I should create and position docking control bars when activated as an active doc server?
-
CHtmlView - load html from memoryCall me stupid, but how do you Navigate to html stored in RAM, rather than a file or URL? Am I going to have to create a temporary cache file first?