2012年6月28日 星期四

VS2005 VC++ SetWindowPos Z-Order

 

VS2005 VC++
SetWindowPos has a confused setting with z-order.
The first parameter pWndInsertAfter should reverse .
for example:
wndTop: mean the object (window or static) is in the bottom. for using as background picture of STATIC.
wndBottom: mean the object is in front of wndTop. for using as button or small picture of  STATIC.

Code:
m_bgpicture.SetWindowPos(&CWnd::wndTop,0,0,800,600,SWP_NOACTIVATE);
m_hellopicture.SetWindowPos(&CWnd::wndBottom,80,100,150,150,SWP_SHOWWINDOW);

沒有留言: