none
[wince 5.0]How to draw a background image to the list control RRS feed

  • 问题

  • hi ,anyone know that how to draw a background image from flash to the list control in wince5.0,I can not do it . if you know ,please help me ,thx
    2010年5月26日 8:03

答案

  • 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.
    2010年5月27日 8:03
    版主

全部回复

  • Do you mean Flash memory or Flash animation?
    2010年5月26日 8:31
    版主
  • hi, gyren:

    I means that , to load a image from flash memory to show as background image of a list control ,thx

    2010年5月27日 2:42
  • hi, gyren, Do you know how to do it ? thx

    2010年5月27日 2:44
  • 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.

    2010年5月27日 3:02
    版主
  • 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!

     

    2010年5月27日 7:43
  • 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.
    2010年5月27日 8:03
    版主
  • ok, thx,
    2010年5月28日 8:42
  • no problem, and if possible, please mark it as solved.
    2010年5月31日 2:36
    版主