Ali Imran
July 24th, 2006, 07:54 PM
Sorry am reposting it, since the last thread I psoted had wrong title, and was making gurus confused. I wrote 'LireView' where I had to write ListView.
Hello I have successfully created a lstview control and used it to load 7 image formats successfully (either from disk or from an intternet URL), as background.
I have few questions regarding that image loading.
I will request a pure winapi solution not mfc.
Questions
1. Is there any document what specifies the possible image formats that can be set as listview background.
2. LVBKIMAGE structure has a field pszImage where we specify the absolute image path or the Internet url to load image from. How can I load the supported image from resources (not url) and display it as background of listview control ? Do I have to make a url something like "res://myexe_path_and_name/#number......." and assign it to pszImage so that it loads from exe resources ?
3. I can understand that LVM_SETBKIMAGE messages sets an image to the background of listview, but what is use of LVM_GETBKIMAGE (as far I understand it can be to obtain from one listview and use it to set background of other), and if I use this way
LVBKIMAGE IBBkImg;
SendMessage (lvhwnd,LVM_GETBKIMAGE,0, &IBBkImg );
and then use same IBBkImg information to set background of another listview, it does nothing at all. (Note : I have used OleInitialize(NULL); prior to setting background image). What can be cuase? Or am doing which is not possible.
4. If above question #3 is answered, how can I obtain HBITMAP from the background image that I have in LVBKIMAGE structure ? so that I can use that HBITMAP further.
Any help, a pure winapi solution is highly appreciated. :)
regards
Hello I have successfully created a lstview control and used it to load 7 image formats successfully (either from disk or from an intternet URL), as background.
I have few questions regarding that image loading.
I will request a pure winapi solution not mfc.
Questions
1. Is there any document what specifies the possible image formats that can be set as listview background.
2. LVBKIMAGE structure has a field pszImage where we specify the absolute image path or the Internet url to load image from. How can I load the supported image from resources (not url) and display it as background of listview control ? Do I have to make a url something like "res://myexe_path_and_name/#number......." and assign it to pszImage so that it loads from exe resources ?
3. I can understand that LVM_SETBKIMAGE messages sets an image to the background of listview, but what is use of LVM_GETBKIMAGE (as far I understand it can be to obtain from one listview and use it to set background of other), and if I use this way
LVBKIMAGE IBBkImg;
SendMessage (lvhwnd,LVM_GETBKIMAGE,0, &IBBkImg );
and then use same IBBkImg information to set background of another listview, it does nothing at all. (Note : I have used OleInitialize(NULL); prior to setting background image). What can be cuase? Or am doing which is not possible.
4. If above question #3 is answered, how can I obtain HBITMAP from the background image that I have in LVBKIMAGE structure ? so that I can use that HBITMAP further.
Any help, a pure winapi solution is highly appreciated. :)
regards