|
Hi
I am getting NULL value in pThumbnail
Bitmap* pThumbnail = static_cast<bitmap*>(img.GetThumbnailImage(THUMBNAIL_WIDTH, THUMBNAIL_HEIGHT, NULL, NULL));
because of which i am not able to proceed further.
When i checked in Bitmap constructor
Bitmap img(A2W(strPath)) ;
The "lastresult" variable in that constructor is showing "gdpiNotInitialized"
Can anybody help in this regard
gkb
|
|
|
|
|
Me too
Someone solve the problem ?
mail : michelguillaum@yahoo.fr
Thanks a lot
|
|
|
|
|
GDI+ inititialize is needed.
ULONG_PTR m_gdiplusToken;
// initialize GDI+
GdiplusStartupInput gdiplusStartupInput;
GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);
...
process..
...
// release GDI+ resource
GdiplusShutdown(m_gdiplusToken);
|
|
|
|
|
Could you please send me the Updated Version (the one that allows other image formats using GDI+). It would be much appreciated. Thanks!
shirleyj002@hawaii.rr.com
shirleyj002@hawaii.rr.com
|
|
|
|
|
Why don't you just change it to use GDI+ ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello!
Your exemple is ok, but the thumbnail images from the list are very unclear.
Can I set these images to be more clear/sharp - something like add more contrast, similar with Windows Explorer thumbnail icon? I'm not use picture big screen preview, just the thumbnail list!
Any ideea will be apreciate!
|
|
|
|
|
Does anyone know where I can find and example similar to this in which other image formats can be added to an image list? I have searched codeproject, codeguru and other similar sites and have not found an example
|
|
|
|
|
I have sent you an updated code for this project to your E-mail address. That version supports various image format by using GDI+.
|
|
|
|
|
Do you have a version that works with visual c++ 6.0? If you do not I will try to convert the project to 6.0.
|
|
|
|
|
Dear yren~
I want to format by using GDI+ code,Can you sent me....
Thank you very much....
kmic88@yahoo.com.tw
|
|
|
|
|
I am also want to get a copy. Thank you very much.
My E-mail address is kungsin@gmail.com
|
|
|
|
|
Hi,
I would like to know is it possible to remove the file name of each thumbnail inside the list control.If so please explaine how?
Thanks and regards
Alvin
alwitta can help you always
|
|
|
|
|
The second parameter of Insertitem() function is the item's label. By passing that a NULL or TEXT(""), you will achieve the effect.
Yi
|
|
|
|
|
I'll post a updated version of the code that uses GDI+. That will allow you to open images with any format that GDI+ can handle.
|
|
|
|
|
would you like to send your code to me please?I want to load jpeg,but I
have no a idea how to implement it.
emal:lovelr1209@163.com
|
|
|
|
|
could you send me the new souce that can add other image format please?
my email is hypcsky@163.com
|
|
|
|
|
let me first say that the code is awsom but in visual studio 2005 the left and right mouch click code isnt working can someone help me to fix it
|
|
|
|
|
I never implemented the right mouse click event. The left mouse click should work.
|
|
|
|
|
Hi,
Can you help me? I would like a web address or code except demonstrating "how to" dynamically open a window bitmap file and insert into a CImageList object and then use the CListCtrl box to display the bitmap in a report view. I want to do something similar to your program... but I want the images to be in the first column of a report (CListCtrl view) and descriptive text in the second column. I do not want to use pre-compiled file names, as a resource IDs. The bitmap files are 140 x 70 pixels. The CImageList::Add function requires a CBitmap*... but the CBitmap class does not allow you to easily open a bitmap file. If you can't help me with the above, then please answers the following question: do I need to use your "dib" class and the windows blits function API, or is there a simple MFC approach... since bitmap files are so common to Windows programming ??
Thx,
King
|
|
|
|
|
You need to open the bitmap files one by one to get the height, width, bitcount, and bitmap data of your bitmaps. Then, call the "CreateBitmap" member function of the CBitmap class to create/populate CBitmap objects. Once you have the CBitmap objects, you can add them to your image list. When you insert items in your report view, make sure you initialize the LVITEM structure to include your image list items.
You do not have to use any bitmap class to load a bitmap file. search through the MSDN, there are a lot of examples to show you how to open and load bitmap from file.
|
|
|
|
|
could you please send me the code for further study?
e-mail : sjice80@sookmyung.ac.kr
thank you.
|
|
|
|
|
Does your code allow one to display large thumbnails (say 100 x 100 pixels bitmap images) in the list control? It seems from MSDN documentation that one can only display 32 x 32 pixels images in the list control but may be that's my misunderstanding.
|
|
|
|
|
Yes. The thumbnails in this code is 100x75
|
|
|
|
|
Hi,
So, if I want to modify the size, like if i want to show preview for 200 X 200 will it be possible ?
Regards,
Jigar Mehta
|
|
|
|
|
i need to load jpg image as a thumbnail in the listview.
would u help me on this matter.
|
|
|
|