... hOldBitmap As Long, hMemoryDC As Long hMemoryDC = CreateCompatibleDC(Me.hdc) hOldBitmap = SelectObject(hMemoryDC, p1) ... new document If lret < 0 Then MsgBox "Failed to start document!" Exit Sub End If...new page If lret < 0 Then MsgBox "Failed to start page!" EndDoc MyPrinter.Handle Exit... Long) As Long Public Declare Function CreateCompatibleDC Lib "gdi32" _ (ByVal hdc As Long...
... MS-DOS systems, it would be certain to fail. And I've encountered several library calls that ... news:8vsq34h2m98kc6ejb7in4s7avmu5l5ggju@4ax.com... bool falsetrue = dcMemory.CreateCompatibleDC (&dc); The correct code is bool ok = dcMemory.CreateCompatibleDC(&dc); I think that CreateCompatibleDC returns a BOOL (not 'bool'). So, I would ...
...the DC) when using BitBlt and fails an ASSERT. *** A "crash" and ... line of what module it failed on, and what version of ... method. Which one did you fail on? **** What am I doing ...> CDC dcMemory; bool falsetrue = dcMemory.CreateCompatibleDC (&dc); if(falsetrue == TRUE) **** THIS ... code is bool ok = dcMemory.CreateCompatibleDC(&dc); if(ok) { DrawCompass(IDC_AZIMUTH,...
...it is unable to get a handle to something (i think the DC) when using BitBlt and fails an ASSERT. [...] void ScanDialog::OnPaint() { CPaintDC dc(this); CDC dcMemory; bool falsetrue = dcMemory.CreateCompatibleDC (&dc); if(falsetrue == TRUE) { DrawCompass(IDC_AZIMUTH, &dcMemory); } } Just for test, try...
...get a handle to something (i think the DC) when using BitBlt and fails an ASSERT. What am I doing wrong? Have I fogotten to delete some... void ScanDialog::OnPaint() { CPaintDC dc(this); CDC dcMemory; bool falsetrue = dcMemory.CreateCompatibleDC (&dc); if(falsetrue == TRUE) { DrawCompass(IDC_AZIMUTH, &dcMemory); } } ---------------------------- void ScanDialog...