This part of code:
Code:
void CDrawMag::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rect;
dc.SetPolyFillMode(WINDING);
CBrush brushBlack(m_BrushBlack.lbColor);
// CBrush brushCross(HS_CROSS, RGB(0, 0, 0));
GetClientRect(rect);
dc.FillRect(&rect, &brushBlack);
// dc.SelectObject(&brushCross);
// dc.Rectangle(rect);
//------------------------------
// draw grid in green color
//------------------------------
int x, y, xstep, ystep;
int H = rect.Height();
int W = rect.Width();
CPen GreenPen(PS_DOT, 1, RGB(0, 255, 0));
dc.SelectObject(&GreenPen);
xstep = W / 10;
for (x=0; x<W; x+=xstep)
{
dc.MoveTo(x, 0);
dc.LineTo(x, H);
}
ystep = H / 10;
for (y=0; y<H; y+=ystep)
{
dc.MoveTo(0, y);
dc.LineTo(W, y);
}
and similar I found!
Because of the names I concluded that these functions exists somwhere in the library.
The books you recommended start from scratch and I don't have time to learn all that.
Consider this:
Code:
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFIRDsgnDlg dialog
CFIRDsgnDlg::CFIRDsgnDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFIRDsgnDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFIRDsgnDlg)
m_Order = 511;
m_SRate = 8000;
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
Coef = NULL;
Order = 0;
}
If you recognize this may help me with some link on how to use what already exists not to learn how to make this.
I really have no knowledge about this issuse and if someone this seems silly or something like that I apologize in advance!
Thanks!