Thank you. i try again.
Tells on the result of adding 1> 2> 3>
Still does not update the screen.
what Is the problem?
add 1>
add 2> 3>
BEGIN_MESSAGE_MAP(CGMDLL_TesterDlg, CExtResizableDialog)
//{{AFX_MSG_MAP(CGMDLL_TesterDlg)
ON_WM_DESTROY()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_COMMAND(ID_APP_ABOUT,OnAbout)
ON_BN_CLICKED(IDC_LOAD_LAYER, OnLoadLayer)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CGMDLL_TesterDlg::OnPaint()
{
// Create the device context for painting
CPaintDC thePaintDC( this ); // device context for painting
// Make sure we don’t re-enter this function
static bool isDrawing = false;
if ( isDrawing )
{
return;
}
isDrawing = true;
if (IsIconic())
{
SendMessage( WM_ICONERASEBKGND, (WPARAM)thePaintDC.GetSafeHdc(), 0 );
// Center icon in client rectangle
int cxIcon = GetSystemMetrics( SM_CXICON );
int cyIcon = GetSystemMetrics( SM_CYICON );
CRect theClientRect;
GetClientRect( &theClientRect );
int x = ( theClientRect.Width() - cxIcon + 1 ) / 2;
int y = ( theClientRect.Height() - cyIcon + 1 ) / 2;
// Draw the icon
thePaintDC.DrawIcon( x, y, m_hIcon );
}
else
{
// Show a wait cursor
CWaitCursor theWC;
// Draw the layers
mMapWindow.Draw
(
thePaintDC.GetSafeHdc(),
RGB(255,255,206),
GM_MapWindow::eDrawOrderDefault,
true,
GM_DrawFlags_IncrementalRender
);
CExtResizableDialog::OnPaint();
}
// Clear the drawing flag
isDrawing = false;
}
ask for a sample check. Attach a file.
http://www.shas.co.kr/prof-uis/prof-uis_1.zip