Click here to Skip to main content
15,922,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalay da Pin
N.D.Quan16-Jul-07 1:25
N.D.Quan16-Jul-07 1:25 
QuestionNeed help!!! Embedding Winsock-Server in my App Pin
c_explorer14-Jul-07 10:32
c_explorer14-Jul-07 10:32 
AnswerRe: Need help!!! Embedding Winsock-Server in my App Pin
Mark Salsbery14-Jul-07 11:28
Mark Salsbery14-Jul-07 11:28 
GeneralRe: Need help!!! Embedding Winsock-Server in my App Pin
c_explorer14-Jul-07 12:48
c_explorer14-Jul-07 12:48 
QuestionInline functions Pin
tom groezer14-Jul-07 10:11
tom groezer14-Jul-07 10:11 
AnswerRe: Inline functions Pin
c_explorer14-Jul-07 11:47
c_explorer14-Jul-07 11:47 
AnswerRe: Inline functions Pin
Chris Losinger14-Jul-07 19:02
professionalChris Losinger14-Jul-07 19:02 
QuestionPreventing redraw. Pin
paper6714-Jul-07 10:07
paper6714-Jul-07 10:07 
Hi,

I have the following situation.

class CPCntPPg : public CPropertyPage
{
DECLARE_DYNCREATE(CPCntPPg)

// Construction/destruction.
public:
CPCntPPg();
~CPCntPPg();

// Dialog Data.
//{{AFX_DATA(CPCntPPg)
enum { IDD = IDPP_PCNT };
CVQProgress m_ctlVQProgress; // CStatic derived class.
//}}AFX_DATA

CEdit m_ctlVQ[VQPNUM];
CSpinButtonCtrl m_ctlVQSpin[VQPNUM];
int m_nVQ[VQPNUM];
:
// Overrides.
// ClassWizard generate virtual function overrides.
//{{AFX_VIRTUAL(CPCntPPg)
public:
virtual BOOL OnApply();
protected:
virtual void DoDataExchange(CDataExchange *pDX); // DDX/DDV support.
//}}AFX_VIRTUAL

// Implementation.
protected:
void InitPPgData(); // Initializes the property page.
void InitSpinButtonCtrls();
:

// Generated message map functions.
//{{AFX_MSG(CPCntPPg)
virtual BOOL OnInitDialog();
//}}AFX_MSG
afx_msg void OnChangeVQ(UINT nID);
:

DECLARE_MESSAGE_MAP()
};

// EN_CHANGE handler. When the contents of an edit control is changed by the user I want the
// m_ctlVQProgress control to redraw itself to reflect the changes.
void CPCntPPg::OnChangeVQ(UINT nID)
{
int nVQ; // Contents from changing edit control retrieved by GetWindowText() and
// _ttoi().
:
m_ctlVQProgress.SetVQ(nIndex, nVQ, TRUE /*Redraw*/); // This will initialize a data
// member and redraw the control.
}

The problem is when the edit control is set to an initial value by DDX/DDV in OnInitDialog
the OnChangeVQ handler gets also called causing the m_ctlVQProgress control to draw itself. This
happens before the OnPaint handler of the m_ctlVQProgress control is invoked. Is there any way to prevent this from happening ?

TIA
AnswerRe: Preventing redraw. Pin
Mark Salsbery14-Jul-07 11:37
Mark Salsbery14-Jul-07 11:37 
QuestionCache hit rates Pin
tom groezer14-Jul-07 10:00
tom groezer14-Jul-07 10:00 
AnswerRe: Cache hit rates Pin
Steve Echols14-Jul-07 18:31
Steve Echols14-Jul-07 18:31 
GeneralRe: Cache hit rates Pin
David Crow16-Jul-07 4:54
David Crow16-Jul-07 4:54 
AnswerRe: Cache hit rates Pin
Randor 15-Jul-07 0:37
professional Randor 15-Jul-07 0:37 
QuestionObject return by value Pin
tom groezer14-Jul-07 9:30
tom groezer14-Jul-07 9:30 
AnswerRe: Object return by value Pin
DevMentor.org14-Jul-07 10:04
DevMentor.org14-Jul-07 10:04 
GeneralRe: Object return by value Pin
tom groezer14-Jul-07 13:54
tom groezer14-Jul-07 13:54 
GeneralRe: Object return by value Pin
DevMentor.org14-Jul-07 16:37
DevMentor.org14-Jul-07 16:37 
GeneralRe: Object return by value Pin
Mark Salsbery14-Jul-07 16:43
Mark Salsbery14-Jul-07 16:43 
GeneralRe: Object return by value Pin
tom groezer14-Jul-07 21:12
tom groezer14-Jul-07 21:12 
GeneralRe: Object return by value Pin
Mark Salsbery14-Jul-07 21:29
Mark Salsbery14-Jul-07 21:29 
QuestionRandom text Pin
dellthinker14-Jul-07 9:26
dellthinker14-Jul-07 9:26 
AnswerRe: Random text Pin
Perspx14-Jul-07 10:59
Perspx14-Jul-07 10:59 
AnswerRe: Random text Pin
#realJSOP15-Jul-07 2:01
professional#realJSOP15-Jul-07 2:01 
Questionwrong code Pin
tom groezer14-Jul-07 7:05
tom groezer14-Jul-07 7:05 
AnswerRe: wrong code Pin
Paul Conrad14-Jul-07 7:25
professionalPaul Conrad14-Jul-07 7:25 

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.