Click here to Skip to main content
15,914,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: fast conversion int/float/double arrays Pin
Andrew Walker9-Nov-04 12:37
Andrew Walker9-Nov-04 12:37 
Generalthe full path name in device driver Pin
yanping wang9-Nov-04 1:34
yanping wang9-Nov-04 1:34 
GeneralRe: the full path name in device driver Pin
Anonymous9-Nov-04 8:09
Anonymous9-Nov-04 8:09 
Questionhow to add ActiveX control in MDI Application Pin
X20409-Nov-04 1:17
X20409-Nov-04 1:17 
AnswerRe: how to add ActiveX control in MDI Application Pin
BlackDice9-Nov-04 2:54
BlackDice9-Nov-04 2:54 
QuestionHow add events to ActiveXCotrols Pin
jahfer9-Nov-04 1:08
jahfer9-Nov-04 1:08 
AnswerRe: How add events to ActiveXCotrols Pin
BlackDice9-Nov-04 3:03
BlackDice9-Nov-04 3:03 
Generalnewbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
namaskaaram9-Nov-04 0:22
namaskaaram9-Nov-04 0:22 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
Andrew Peace9-Nov-04 0:37
Andrew Peace9-Nov-04 0:37 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
Antony M Kancidrowski9-Nov-04 6:16
Antony M Kancidrowski9-Nov-04 6:16 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
namaskaaram9-Nov-04 17:04
namaskaaram9-Nov-04 17:04 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
Antony M Kancidrowski10-Nov-04 10:58
Antony M Kancidrowski10-Nov-04 10:58 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
namaskaaram9-Nov-04 17:12
namaskaaram9-Nov-04 17:12 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
Antony M Kancidrowski10-Nov-04 11:04
Antony M Kancidrowski10-Nov-04 11:04 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
namaskaaram10-Nov-04 18:17
namaskaaram10-Nov-04 18:17 
GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
Antony M Kancidrowski11-Nov-04 11:18
Antony M Kancidrowski11-Nov-04 11:18 
The easiest way to do this is to pass a pointer to the dialog into the CMyClass. We will call the dialog CMyDialog.

CMyClass header file
public:
  void SetDialog(CMyDialog* pDialog);
<p></p>
private:
  CMyDialog* m_pDialog;

CMyClass cpp file
void CMyClass::SetDialog(CMyDialog* pDialog)
{
  m_pDialog = pDialog;
}
<p></p>
void CMyClass::SomeUpdateFunction
{
  m_pDialog->Invalidate();
  m_pDialog->UpdateWindow();
or
  m_pDialog->SendMessage(WM_PAINT, NULL, NULL);
or
  m_pDialog->RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
}


Notice that I have given you 3 alternative ways to do the update in the update function.


I have made the assumption that Within the CMyDialog class you have defined the CMyClass as follows

CMyDialog header file
CMyClass m_MyClass;

CMyDialog cpp file
BOOL CMyDialog::OnInitDialog()
{
   :
  m_MyClass.SetDialog(this);
   :
  return TRUE;
}



Hope that this is clear

Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)

GeneralRe: newbie here:....what is the difference between WM_PAINT and WM_NCPAINT Pin
namaskaaram11-Nov-04 21:52
namaskaaram11-Nov-04 21:52 
GeneralChanging font on my CTreeCtrl &#8211; item Pin
anderslundsgard9-Nov-04 0:08
anderslundsgard9-Nov-04 0:08 
GeneralRe: Changing font on my CTreeCtrl &#8211; item Pin
RChin9-Nov-04 3:05
RChin9-Nov-04 3:05 
GeneralRe: Changing font on my CTreeCtrl &#8211; item Pin
anderslundsgard9-Nov-04 3:24
anderslundsgard9-Nov-04 3:24 
GeneralBitwise operators Pin
Anonymous8-Nov-04 23:34
Anonymous8-Nov-04 23:34 
GeneralRe: Bitwise operators Pin
Phil J Pearson8-Nov-04 23:53
Phil J Pearson8-Nov-04 23:53 
GeneralRe: Bitwise operators Pin
Anonymous9-Nov-04 0:14
Anonymous9-Nov-04 0:14 
GeneralMemory leak Pin
gunnar668-Nov-04 23:22
gunnar668-Nov-04 23:22 
GeneralRe: Memory leak Pin
David Crow9-Nov-04 2:31
David Crow9-Nov-04 2: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.