How to catch BeforeDrawingMap and AfterDrawingMap Message?

Dec 4, 2016 at 1:03 PM
Hi, friends, I tried to draw a legend and title on Map control using Visual C++ GDI , and want to catch the BeforeDrawingMap and AfterDrawingMap Message, but it did not work!
PS: MapWinGIS version is 4.9.3.5, I set the Map CustomDrawingFlag as BeforeAfterDrawing. My test code is very simple:
void CTestMWView::AfterDrawingMap3(long hDC, long xMin, long xMax, long yMin, long yMax, long* Handled)
{
        //Test AfterDrawingMap3
    AfxMessageBox("Hello, AfterDrawingMap Message");
}
Many thanks!