CButtonST透明背景的有关问题

CButtonST透明背景的问题
我在单文档框架的view里创建了几个透明背景的CButtonST。
CButtonST透明背景的有关问题(图1)

然后移动按钮到另一个地方
CButtonST透明背景的有关问题(图2)
移动完了后我DrawTransparent(TRUE);了,让背景的图片清除掉,会在DrawItem()中重新获取父区域获取背景图片,但是看图2背景还是前面所在的背景,有什么办法改掉吗?
------解决思路----------------------
不一定对,仅供参考:
CWnd::OnEraseBkgnd  
afx_msg BOOL OnEraseBkgnd( CDC* pDC );

Return Value

Nonzero if it erases the background; otherwise 0.

Parameters

pDC

Specifies the device-context object.

Remarks

The framework calls this member function when the CWnd object background needs erasing (for example, when resized). It is called to prepare an invalidated region for painting.

The default implementation erases the background using the window class background brush specified by the hbrBackground member of the window class structure. 

If the hbrBackground member is NULL, your overridden version of OnEraseBkgnd should erase the background color. Your version should also align the origin of the intended brush with the CWnd coordinates by first callingUnrealizeObject for the brush, and then selecting the brush.

An overridden OnEraseBkgnd should return nonzero in response to WM_ERASEBKGND if it processes the message and erases the background; this indicates that no further erasing is required. If it returns 0, the window will remain marked as needing to be erased. (Typically, this means that the fErase member of the PAINTSTRUCT structure will be TRUE.) 

Windows assumes the background is computed with the MM_TEXT mapping mode. If the device context is using any other mapping mode, the area erased may not be within the visible part of the client area.

Note   This member function is called by the framework to allow your application to handle a Windows message. The parameters passed to your function reflect the parameters received by the framework when the message was received. If you call the base-class implementation of this function, that implementation will use the parameters originally passed with the message and not the parameters you supply to the function.

CWnd Overview 
------解决思路----------------------
  Class Members 
------解决思路----------------------
  Hierarchy Chart

See Also   WM_ICONERASEBKGND, CGdiObject::UnrealizeObject,WM_ERASEBKGND