Click here to Skip to main content
14,270,872 members

C / C++ / MFC

 
QuestionMDI or SDI. How do I connect View with a resource formview. Pin
Member 118836021-Mar-19 1:44
memberMember 118836021-Mar-19 1:44 
AnswerRe: MDI or SDI. How do I connect View with a resource formview. Pin
Victor Nijegorodov1-Mar-19 2:30
memberVictor Nijegorodov1-Mar-19 2:30 
GeneralRe: MDI or SDI. How do I connect View with a resource formview. Pin
Member 118836021-Mar-19 4:05
memberMember 118836021-Mar-19 4:05 
GeneralRe: MDI or SDI. How do I connect View with a resource formview. Pin
Victor Nijegorodov1-Mar-19 20:45
memberVictor Nijegorodov1-Mar-19 20:45 
GeneralRe: MDI or SDI. How do I connect View with a resource formview. Pin
Member 118836021-Mar-19 21:59
memberMember 118836021-Mar-19 21:59 
GeneralRe: MDI or SDI. How do I connect View with a resource formview. Pin
Victor Nijegorodov1-Mar-19 22:34
memberVictor Nijegorodov1-Mar-19 22:34 
GeneralRe: MDI or SDI. How do I connect View with a resource formview. Pin
Member 118836022-Mar-19 2:03
memberMember 118836022-Mar-19 2:03 
QuestionHow to stop flickering of controls in my Dialog window Pin
manoharbalu28-Feb-19 0:43
membermanoharbalu28-Feb-19 0:43 
In my MFC application, I am doing a custom drawing in my dialog class OnPaint(). I have also created a few controls in dialog template. I have also resized and repositioned some of the controls in the dialog code. When I run my application, the controls are flickering.

Please suggest me how to avoid this?

BOOL CFP::OnInitDialog()
{
CDC *pDC = GetDC(); //Get DC for Dialog's Client Area
pDCTmp->CreateCompatibleDC(pDC); //Create Compatible DC(pDCTmp) for Dialog's Client Area(pDC)
//pDCTmp is a member Variable
pBgBitmap->CreateCompatibleBitmap (pDC, 800, 640 ); //Create Compatible Bitmap(pBgBitmap) for Dialog's Client Area(pDC)
//pBgBitmap->LoadBitmap(IDB_FORESTIMAGE);
pDCTmp->SelectObject(pBgBitmap);
ReleaseDC(pDC);

}

void CFacePlate::OnPaint()
{
CPaintDC dc(this); // device context for painting

// TODO: Add your message handler code here
CRect rect;
rect = rScreen; //rScreen is Client rect
pDCTmp->FillRect(rect,&CBrush(RGB(152, 185, 192))); //pDCTmp member variable is used to draw
.
.
.
.
//Custom drawings using the pDCTmp

}
AnswerRe: How to stop flickering of controls in my Dialog window Pin
Victor Nijegorodov28-Feb-19 1:02
memberVictor Nijegorodov28-Feb-19 1:02 
GeneralRe: How to stop flickering of controls in my Dialog window Pin
manoharbalu28-Feb-19 1:56
membermanoharbalu28-Feb-19 1:56 
AnswerRe: How to stop flickering of controls in my Dialog window Pin
speedbump9928-Feb-19 3:01
memberspeedbump9928-Feb-19 3:01 
GeneralRe: How to stop flickering of controls in my Dialog window Pin
manoharbalu1-Mar-19 1:09
membermanoharbalu1-Mar-19 1:09 
GeneralRe: How to stop flickering of controls in my Dialog window Pin
Victor Nijegorodov1-Mar-19 2:25
memberVictor Nijegorodov1-Mar-19 2:25 
GeneralRe: How to stop flickering of controls in my Dialog window Pin
speedbump991-Mar-19 3:18
memberspeedbump991-Mar-19 3:18 
GeneralRe: How to stop flickering of controls in my Dialog window Pin
speedbump991-Mar-19 3:33
memberspeedbump991-Mar-19 3:33 
AnswerRe: How to stop flickering of controls in my Dialog window Pin
leon de boer1-Mar-19 6:48
memberleon de boer1-Mar-19 6:48 
QuestionDialog box margins Pin
Alexander Kindel21-Feb-19 0:24
memberAlexander Kindel21-Feb-19 0:24 
AnswerRe: Dialog box margins Pin
Richard MacCutchan21-Feb-19 1:04
protectorRichard MacCutchan21-Feb-19 1:04 
AnswerRe: Dialog box margins Pin
speedbump9921-Feb-19 8:45
memberspeedbump9921-Feb-19 8:45 
GeneralRe: Dialog box margins Pin
Alexander Kindel21-Feb-19 9:30
memberAlexander Kindel21-Feb-19 9:30 
GeneralRe: Dialog box margins Pin
speedbump9921-Feb-19 10:02
memberspeedbump9921-Feb-19 10:02 
GeneralRe: Dialog box margins Pin
leon de boer22-Feb-19 6:05
memberleon de boer22-Feb-19 6:05 
GeneralRe: Dialog box margins Pin
speedbump9922-Feb-19 10:01
memberspeedbump9922-Feb-19 10:01 
AnswerRe: Dialog box margins Pin
Maximilien22-Feb-19 4:23
memberMaximilien22-Feb-19 4:23 
GeneralRe: Dialog box margins Pin
leon de boer22-Feb-19 5:39
memberleon de boer22-Feb-19 5:39 

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.