Click here to Skip to main content
16,018,442 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Virtual address to 'physical' address Pin
Nemanja Trifunovic12-Jan-10 4:34
Nemanja Trifunovic12-Jan-10 4:34 
AnswerRe: Virtual address to 'physical' address Pin
Luc Pattyn12-Jan-10 6:16
sitebuilderLuc Pattyn12-Jan-10 6:16 
AnswerRe: Virtual address to 'physical' address Pin
Bram van Kampen12-Jan-10 14:37
Bram van Kampen12-Jan-10 14:37 
GeneralRe: Virtual address to 'physical' address Pin
jbojarczuk15-Jan-10 1:58
jbojarczuk15-Jan-10 1:58 
GeneralRe: Virtual address to 'physical' address Pin
Bram van Kampen17-Jan-10 5:31
Bram van Kampen17-Jan-10 5:31 
QuestionGetlastError() returning 87 when i use EndPage() in my printing application Pin
kir_MFC11-Jan-10 20:51
kir_MFC11-Jan-10 20:51 
QuestionRe: GetlastError() returning 87 when i use EndPage() in my printing application Pin
CPallini11-Jan-10 21:41
mveCPallini11-Jan-10 21:41 
AnswerRe: GetlastError() returning 87 when i use EndPage() in my printing application Pin
kir_MFC11-Jan-10 22:24
kir_MFC11-Jan-10 22:24 
if (!screen_print)
{
//debug(_S("prt line: abort %d '%s'"), fAbort, buf);
/* output current line */

/*
CODE STARTS --> RFC 40589
DATE --> 26/03/2007
*/
//Check if this is House Account Report
if (bIsHouseAccountReport)
{
HFONT m_hNewFont;
LOGFONT m_lfOldFont, m_lfNewFont;


//Get the current font and this will be our old font
::GetObject(hPrinterFont,sizeof(LOGFONT),&m_lfOldFont);

//Copy the oldfont to new font
m_lfNewFont = m_lfOldFont;

//Change the face name of the new font to "Courier New" as this is the only
//font in which all columns are aligned properly
_tcscpy(m_lfNewFont.lfFaceName, "Courier New");

m_hNewFont = CreateFontIndirect(&m_lfNewFont);
::SelectObject(pdc,m_hNewFont);

//Textout with the newly selected font
TextOut(pdc, 0, (CurrentLine - 1) * LineSpace, buf, strlen(buf));

//Select the old font for other reports to print as it is
::SelectObject(pdc,hPrinterFont);
}
/*
CODE ENDS --> RFC 40589
*/
else
TextOut(pdc, 0, (CurrentLine - 1) * LineSpace, buf, strlen(buf));

CurrentLine += 1;

/* check for page breaks */
if (CurrentLine > LinesPerPage)
{
CurrentLine = 1;
CurrentPage += 1;

if ( hPrinterFont != 0 )
{
SelectObject( pdc, hOldFont );
}
prt_set();

IOStatus = EndPage(pdc);
DWORD dw = GetLastError();
if(dw)
MessageBox (NULL, TEXT ("Hello, Windows 98!"), TEXT ("HelloMsg"), 0) ;

if ( hPrinterFont != 0 )
{
SelectObject( pdc, hPrinterFont );
}

if (IOStatus < 0 || fAbort)
{

fAbort = TRUE;
return -1;//RFC 78192
}

StartPage(pdc);
return -1;
}
}
/* screen print */
else
{
FIOW::fprintf(prtfile, _S("%s\n"), buf);
CurrentLine += 1;

if (CurrentLine > LinesPerPage)
{
CurrentLine = 1;
CurrentPage += 1;
return -1;
}
}

kir_MFC

QuestionRe: GetlastError() returning 87 when i use EndPage() in my printing application Pin
CPallini11-Jan-10 22:45
mveCPallini11-Jan-10 22:45 
GeneralRe: GetlastError() returning 87 when i use EndPage() in my printing application Pin
WoutL12-Jan-10 1:08
WoutL12-Jan-10 1:08 
AnswerRe: GetlastError() returning 87 when i use EndPage() in my printing application [modified] Pin
Covean11-Jan-10 21:45
Covean11-Jan-10 21:45 
QuestionNavigating to a folder using CFileDialog Pin
maycockt11-Jan-10 20:46
maycockt11-Jan-10 20:46 
AnswerRe: Navigating to a folder using CFileDialog Pin
KingsGambit11-Jan-10 21:18
KingsGambit11-Jan-10 21:18 
AnswerRe: Navigating to a folder using CFileDialog Pin
Code-o-mat11-Jan-10 22:08
Code-o-mat11-Jan-10 22:08 
QuestionOracle describe Pin
rdop11-Jan-10 19:45
rdop11-Jan-10 19:45 
AnswerRe: Oracle describe Pin
xushih13-Jan-10 1:08
xushih13-Jan-10 1:08 
QuestionDiference between hash_map and hash_multi map. how to implement hash_multimap in VS2008 (for C++) Pin
Nandu_77b11-Jan-10 19:26
Nandu_77b11-Jan-10 19:26 
AnswerRe: Diference between hash_map and hash_multi map. how to implement hash_multimap in VS2008 (for C++) Pin
_AnsHUMAN_ 11-Jan-10 19:32
_AnsHUMAN_ 11-Jan-10 19:32 
GeneralRe: Diference between hash_map and hash_multi map. how to implement hash_multimap in VS2008 (for C++) Pin
Nandu_77b12-Jan-10 0:21
Nandu_77b12-Jan-10 0:21 
QuestionSplit header in clistcontrol Pin
itkid11-Jan-10 19:25
itkid11-Jan-10 19:25 
AnswerRe: Split header in clistcontrol Pin
Rolf Kristensen13-Jan-10 11:52
Rolf Kristensen13-Jan-10 11:52 
QuestionConnectivity with data base Pin
Le@rner11-Jan-10 19:03
Le@rner11-Jan-10 19:03 
AnswerRe: Connectivity with data base Pin
SandipG 11-Jan-10 20:17
SandipG 11-Jan-10 20:17 
AnswerRe: Connectivity with data base Pin
KingsGambit11-Jan-10 20:44
KingsGambit11-Jan-10 20:44 
QuestionMFC - CAsyncSocket class Pin
liz311-Jan-10 17:31
liz311-Jan-10 17:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.