Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
If the listcontrol display a background map it。
So write wrong?

C++
m_ListCtrl.SetBkImage("C:\Documents and Settings\zhanbiao\Desktop\Original Files\Mains.bmp");

   m_ListCtrl.SetTextBkColor(CLR_NONE);



Don't know why display does not come out images



help me solve once.
Posted
Updated 15-Jan-13 16:55pm
v2

1 solution

your mistake is with file path name:

\ is a escape character. to put back slash as input character you must have to use \\

C++
m_ListCtrl.SetBkImage("C:\\Documents and Settings\\zhanbiao\\Desktop\\Original Files\\Mains.bmp");

   m_ListCtrl.SetTextBkColor(CLR_NONE);


try above............
 
Share this answer
 
Comments
shizhanbiao 15-Jan-13 23:39pm    
or no ,display does come out image
Mohibur Rashid 15-Jan-13 23:53pm    
this works fine in my computer,

by the way if you are using unicode character set

then try this
m_ListCtrl.SetBkImage(L"C:\\Documents and Settings\\zhanbiao\\Desktop\\Original Files\\Mains.bmp");
shizhanbiao 16-Jan-13 0:57am    
What I use is vc6. Version, how to solve this problem,.
Mohibur Rashid 16-Jan-13 1:02am    
make sure your control is getting created
shizhanbiao 16-Jan-13 2:04am    
Can you mail for me? I'll give you the code to send the past.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900