积极答复者
[wince 5.0]How to draw a background image to the list control

问题
答案
-
You could override the function WindowProc of your main Window class, which is the parent of the CListCtrl. Then Add message processing code for WM_PAINT, in which you do XXXBlt on CListCtrl.
- 已标记为答案 warrentangModerator 2010年6月1日 6:57
全部回复
-
you can first load the image through image loading function, such as LoadBitmap and LoadImage. Then you can call SetBkImage function of CListCtrl class to set you image as background.
Furthermore, if you want to be more flexible, you could retrieve the hWnd member of CListCtrl and use XXXBlt to manually copy your bitmap to the window of CListCtrl.
-
en, I has tried to call LoadBitmap SetBkImage function to set the image as background.
and I finally found that this fuction is canceled in wince 5.0.
so I am find help about other method like that you said:
"Furthermore, if you want to be more flexible, you could retrieve the hWnd member of CListCtrl and use XXXBlt to manually copy your bitmap to the window of CListCtrl."
I have tried to derived the class CListCtrl and draw the image on its OnPaint() function , as a result, only the background image showing , and the text data on the list control are covered by the background images.
So I do not know how to implement in this way. can you describe it more clearly,thx a lot of!
-
You could override the function WindowProc of your main Window class, which is the parent of the CListCtrl. Then Add message processing code for WM_PAINT, in which you do XXXBlt on CListCtrl.
- 已标记为答案 warrentangModerator 2010年6月1日 6:57