U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Problem with Drag&Drop in ArrayCtrl
Re: Problem with Drag&Drop in ArrayCtrl [message #22574 is a reply to message #22571] Tue, 28 July 2009 00:15 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3460
Registered: August 2008
Senior Veteran
Hello Mirek

This is the function:

void LoadThumbnail(int id)
{
	thumbnails[id].loaded = true;
	Image img = StreamRaster::LoadFileAny(thumbnails[id].fileName);
	if(!img) 
		return;
	thumbnails[id].width = img.GetWidth();
	thumbnails[id].height = img.GetHeight();
	if (thumbnails[id].width > 1024 || thumbnails[id].height > 1024) { 
		int w, h;
		if (thumbnails[id].width > 1024) {
			w = 1024;
			h = (thumbnails[id].height*1024)/thumbnails[id].width;
		} else {
			h = 1024;
			w = (thumbnails[id].width*1024)/thumbnails[id].height;
		}
		thumbnails[id].img = Rescale(img, Size(w, h), Rect(0, 0, thumbnails[id].width, thumbnails[id].height));     
	} else 
		thumbnails[id].img = img;
}


Best regards
Koldo


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Substring formating in ArrayCtrl (SqlCtrl)
Next Topic: Right Click on GridCtrl
Goto Forum:
  


Current Time: Fri Jun 19 01:56:40 GMT+2 2026

Total time taken to generate the page: 0.00630 seconds