Take a look at the following code. This issues openGL instructions(could be drawing instructions). m_pCDC is a member of the view that points to the DC. First it is made current, then drawing instructions are issued and finally it is released. This particlar function will cause a WM_PAINT message to happen anyway but if this is not the case then you need to ask for one by calling:
InvalidateRect(NULL,FALSE) is order to refresh the screen
and BTW, dont forget to have a glFlush() at the end of your drawing code.
this kind of code could easily be put in a mouse event handler with GL instructions to draw stuff.
void CBaseOpenGLMDIView::OnSize(UINT nType, int cx, int cy)
CView::OnSize(nType, cx, cy);
// Use the rendering context do draw onto the view
// Set up the viewport
w = cx;
h = cy;
// Give a clean surface ready to render.
// Release thr rendering context