J
Joe
Hi,
I have been struggling with this issue for a couple of days and would
like to know if some can give me a pointer.
I want to initialize a struct with default values and depending on the
value returned from a fontdialog box, I want to update the values of
the struct.
I have included a code snippet below which I think will make my
question clearer.
typedef struct _fontStuff
{
bool m_bFontItalic;
…..
}fontStuff;
BOOL CTestControlDlg::OnInitDialog()
{
//Here I initialize a value
fontStuff fs;
fs.m_bFontItalic = false;
}
void CTestControlDlg::OnButton1()
{
CFontDialog fd;
//rather than using another variable here I would like to
update //fs.m_bFontItalic that I initially set.
bool IsItalic;
if(fd.DoModal() == IDOK)
{
IsItalic = fd.IsItalic;
}
}
Thanks in advance for any help.
I have been struggling with this issue for a couple of days and would
like to know if some can give me a pointer.
I want to initialize a struct with default values and depending on the
value returned from a fontdialog box, I want to update the values of
the struct.
I have included a code snippet below which I think will make my
question clearer.
typedef struct _fontStuff
{
bool m_bFontItalic;
…..
}fontStuff;
BOOL CTestControlDlg::OnInitDialog()
{
//Here I initialize a value
fontStuff fs;
fs.m_bFontItalic = false;
}
void CTestControlDlg::OnButton1()
{
CFontDialog fd;
//rather than using another variable here I would like to
update //fs.m_bFontItalic that I initially set.
bool IsItalic;
if(fd.DoModal() == IDOK)
{
IsItalic = fd.IsItalic;
}
}
Thanks in advance for any help.