Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalhi need help with autorun.exe program!! Pin
gelcoman26-Feb-04 8:26
gelcoman26-Feb-04 8:26 
GeneralRe: hi need help with autorun.exe program!! Pin
pgrohs26-Feb-04 9:13
pgrohs26-Feb-04 9:13 
GeneralRe: hi need help with autorun.exe program!! Pin
gelcoman26-Feb-04 9:26
gelcoman26-Feb-04 9:26 
GeneralQuestion anbout DLLs and heaps... Pin
CherezZaboro26-Feb-04 7:49
CherezZaboro26-Feb-04 7:49 
GeneralRe: Question anbout DLLs and heaps... Pin
Tim Smith26-Feb-04 8:29
Tim Smith26-Feb-04 8:29 
GeneralRe: Question anbout DLLs and heaps... Pin
CherezZaboro26-Feb-04 8:46
CherezZaboro26-Feb-04 8:46 
GeneralRe: Question anbout DLLs and heaps... Pin
Nemanja Trifunovic26-Feb-04 10:59
Nemanja Trifunovic26-Feb-04 10:59 
GeneralDouble Buffering in SDI Pin
hntay26-Feb-04 6:57
hntay26-Feb-04 6:57 
Hi,

I have tried looking at the examples available here but they don't seem to work for me. I have a SDI project on the go and I have a drawing window on the top right corner that I would like refreshed periodically. I want to double buffer it and this is what I have so far in my CDoubleBufferView::OnPaint()

CRect tempRect;
GetClientRect(tempRect); //rect of the window

CPaintDC dc(this);
CBitmap bitmap;
CDC dcMem;

if(m_isDoubleBuffered)
{
if( dcMem.CreateCompatibleDC( &dc ) ) {
bitmap.CreateCompatibleBitmap(&dc, tempRect.Width(), tempRect.Height() );
CBitmap* pOldBitmap = dcMem.SelectObject(&bitmap);
dcMem.FillSolidRect(tempRect, dc.GetBkColor());
Draw(dcMem);
dc.BitBlt( tempRect.left,
tempRect.top,
tempRect.Width(),
tempRect.Height(),
&dcMem,
tempRect.left,
tempRect.top,
SRCCOPY );
dc.SetTextColor(RGB(255, 255, 255));
dc.SetBkMode(TRANSPARENT);
dc.SetTextAlign(TA_LEFT | TA_TOP);
dc.TextOut(m_dwTopLeft.x, m_dwTopLeft.y, "Double Buffer");
}
}
else
{
Draw(dc);
dc.SetTextColor(RGB(255, 255, 255));
dc.SetBkMode(TRANSPARENT);
dc.SetTextAlign(TA_LEFT | TA_TOP);
dc.TextOut(m_dwTopLeft.x, m_dwTopLeft.y, "No Double Buffer");
}

I do not see any difference in either mode. Did I miss something. Btw, I am still new with MFC, thus if a more detailed explanation can be provided, it would be greatly appreciated. Thanks in advance.


GeneralRe: Double Buffering in SDI Pin
alex.barylski26-Feb-04 15:03
alex.barylski26-Feb-04 15:03 
GeneralSetDlgItemText Problem Pin
Caoimh26-Feb-04 5:42
Caoimh26-Feb-04 5:42 
GeneralRe: SetDlgItemText Problem Pin
Prakash Nadar26-Feb-04 5:46
Prakash Nadar26-Feb-04 5:46 
GeneralProgramming in C++ with .NET Pin
Jerome Conus26-Feb-04 5:33
Jerome Conus26-Feb-04 5:33 
GeneralRe: Programming in C++ with .NET Pin
Michael P Butler26-Feb-04 5:48
Michael P Butler26-Feb-04 5:48 
GeneralAutolist member option in VStudio 6 Pin
Jerome Conus26-Feb-04 5:30
Jerome Conus26-Feb-04 5:30 
GeneralRe: Autolist member option in VStudio 6 Pin
Prakash Nadar26-Feb-04 5:43
Prakash Nadar26-Feb-04 5:43 
GeneralMultiple language Pin
Scozturk26-Feb-04 5:30
professionalScozturk26-Feb-04 5:30 
GeneralRe: Multiple language Pin
Prakash Nadar26-Feb-04 5:40
Prakash Nadar26-Feb-04 5:40 
GeneralF1 key for other thing than help! Pin
avallet26-Feb-04 5:16
avallet26-Feb-04 5:16 
GeneralRe: F1 key for other thing than help! Pin
Prakash Nadar26-Feb-04 5:27
Prakash Nadar26-Feb-04 5:27 
Generalhelp set the program back to original Pin
catngo26-Feb-04 5:09
catngo26-Feb-04 5:09 
GeneralRe: help set the program back to original Pin
Prakash Nadar26-Feb-04 5:15
Prakash Nadar26-Feb-04 5:15 
GeneralRe: help set the program back to original Pin
catngo26-Feb-04 6:12
catngo26-Feb-04 6:12 
GeneralEnd Of File (eof) test help Pin
catngo26-Feb-04 5:04
catngo26-Feb-04 5:04 
GeneralRe: End Of File (eof) test help Pin
Prakash Nadar26-Feb-04 5:12
Prakash Nadar26-Feb-04 5:12 
GeneralRe: End Of File (eof) test help Pin
catngo26-Feb-04 6:05
catngo26-Feb-04 6:05 

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.