Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clip Images
Message
General information
Forum:
Visual FoxPro
Category:
Pictures and Image processing
Title:
Miscellaneous
Thread ID:
00740884
Message ID:
00740973
Views:
22
Yes, you can make all what you want using Windows (not ActiveX) ImageList control. This piece of C++ code may be helpful:
int main(int argc, char* argv[])
{
//	HIMAGELIST hIL = ImageList_Create(32, 32, ILC_COLOR8, 0, 1);
	HIMAGELIST hIL = ImageList_LoadImage(NULL, "strip.bmp", 32, 0, 0, IMAGE_BITMAP, LR_LOADFROMFILE);

	HICON hIcon = (HICON)LoadImage(NULL, "30.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
	ImageList_AddIcon(hIL, hIcon);
	DeleteObject(hIcon);

	hIcon = (HICON)LoadImage(NULL, "31.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
	ImageList_AddIcon(hIL, hIcon);
	DeleteObject(hIcon);

	IMAGEINFO ImageInfo;
	ImageList_GetImageInfo(hIL, 0, &ImageInfo);

	PICTDESC PictDesc;
	PictDesc.cbSizeofstruct = sizeof(PICTDESC);
	PictDesc.picType = PICTYPE_BITMAP;
	PictDesc.bmp.hbitmap = ImageInfo.hbmImage;
	PictDesc.bmp.hpal = NULL;
	IPicture* iPic;
	OleCreatePictureIndirect(&PictDesc, IID_IDispatch, FALSE, (LPVOID*) &iPic);

	BSTR bstrFile = SysAllocString(L"result.bmp");
	OleSavePictureFile((IDispatch*)iPic, bstrFile);
	SysFreeString(bstrFile);
	iPic->Release();

	return 0;
}
>Hi all,
>
>I need to display and edit a strip of images contained in a single bmp image and before I run off and write some GDI+ code I thought I check to see if somebody has seen a control that possibly could help with this.
>
>What I need to do is basically be able to display all the images to the user, allow the user to load a new image into the strip and save it back out.
>
>The Picture Clip control can help me display the data - that part is easy, but I have not seen any tools that let you write the data back in in some way.
>
>For some reason I thought that the ImageList control uses a tabstrip like image internally that can somehow be coerced out of it - that would be ideal as you can simply load the thing up and then potentially save the raw image data.
>
>Any ideas? Basically what I need is like an editable PictureClip control.
>
>Yeah, you're probably asking what the hell do you need this for - well, braindead Win32 Image code in HTML Help requires icons to be loaded in an image strip and I want to be able to edit these and create new icons.
>
>+++ Rick ---
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform