Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Question(use version 2.93) paint problem Collapse All
Subject Author Date
park byung yup Jan 31, 2012 - 6:16 PM


I’m developer of GIS at Shinhan Aerial Survey Co.

1 Question :

To send two versions of the attachment.

One version is used profuis

The other one did not use version.

Invisible on the screen issues.

How do you solve the problem?

Please answer.

Data after loading screen (did not use version.)

Data after loading screen (used profuis)

my e-mail ;

Technical Support Feb 10, 2012 - 3:26 AM

We are sorry for the delay with this reply. Your app draws a map in the CGMDLL_TesterDlg::OnPaint() method using the mMapWindow.Draw( . . . code. But the CExtResizableDialog class handles the WM_PAINT message in the WindowProc() virtual method for providing themed dialog background. So, you should not try to draw directly into the surface of the CExtResizableDialog window. Please do the following:

1) Add the WS_CLIPSIBLINGS|WS_CLIPCHILDREN styles in the properties of the dialog template resource.

2) Code new CWnd-derived map control which should handle the WM_PAINT message for map painting.

3) Create your CWnd-derived map control inside CExtResizableDialog window.

park byung yup Feb 12, 2012 - 9:32 PM


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)









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 )




    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 );




        // Show a wait cursor

        CWaitCursor theWC;


        // Draw the layers











    // Clear the drawing flag

    isDrawing = false;


ask for a sample check. Attach a file.

park byung yup Jan 31, 2012 - 6:19 PM