Author: Mike Williams
Date: May 30, 2008 12:53
... 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...
|
| Show full article (10.36Kb) · Show article thread |
Author: Joseph M. Newcomer
Date: May 29, 2008 00:08
... 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 ...
|
| Show full article (2.35Kb) · Show article thread |
|
|
Author: Joseph M. Newcomer
Date: May 28, 2008 08:19
...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,...
|
| Show full article (5.33Kb) · Show article thread |
Author: Giovanni Dicanio
Date: May 28, 2008 03:20
...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...
|
| Show full article (1.25Kb) · Show article thread |
Author: vorange
Date: May 28, 2008 00:52
...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...
|
| Show full article (1.63Kb) |
Author: Roland
Date: Aug 2, 2007 07:15
...TCHAR szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleDC failed, Error: %%d"),GetLastError()); OutputDebugString(szError); ... szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleBitmap failed, Error: %%d"),GetLastError()); OutputDebugString(szError); ...
|
| Show full article (13.19Kb) · Show article thread |
Author: Joseph M. Newcomer
Date: Aug 2, 2007 06:48
...TCHAR szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleDC failed, Error: %%d"),GetLastError()); OutputDebugString(szError); ...TCHAR szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleBitmap failed, Error: %%d"),GetLastError()); OutputDebugString(szError); }...
|
| Show full article (10.99Kb) · Show article thread |
Author: Roland
Date: Aug 2, 2007 05:12
...TCHAR szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleDC failed, Error: %%d"),GetLastError()); OutputDebugString(szError); }...szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleBitmap failed, Error: %%d"),GetLastError()); OutputDebugString(szError); }...
|
| Show full article (6.57Kb) |
Author: Roland
Date: Aug 2, 2007 05:12
...TCHAR szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleDC failed, Error: %%d"),GetLastError()); OutputDebugString(szError); }...szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleBitmap failed, Error: %%d"),GetLastError()); OutputDebugString(szError); }...
|
| Show full article (6.57Kb) |
Author: Roland
Date: Aug 2, 2007 05:11
...TCHAR szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleDC failed, Error: %%d"),GetLastError()); OutputDebugString(szError); }...szError[1024]={0}; wsprintf(szError,_T("CreateCompatibleBitmap failed, Error: %%d"),GetLastError()); OutputDebugString(szError); }...
|
| Show full article (6.57Kb) |
|