API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

IIMAGECTL

Brew Release
Brew MP 1.0.2
Description
The IImageCtl interface is deprecated. Refer to the AEECLSID_ImageWidget class and IWidget interface topics instead.
This interface allows the caller to display a scrollable view into an image. This is basically a wrapper object around an IImage object.
Sample code usage follows:

	   IImage*		pi;
	   IImageCtl*	pvc;
	   CtlAddItem	ci;
	   AEERect		rc;

	   pi = ISHELL_LoadImage(pMe->m_pIShell,"test.bmp");

	   if(pi){
		  ISHELL_CreateInstance(pMe->m_pIShell, AEECLSID_IMAGECTL, (void **)(&pvc));
		  if(pvc){
			 MEMSET(&ci,0,sizeof(ci));
			 ci.pImage = pi;
			 rc.x = 10;
			 rc.y = 20;
			 rc.dx = rc.dy = 50;

			 // Tell the control to draw a border...
			 IIMAGECTL_SetProperties(pvc,CP_BORDER);

			 // Set the rect for the control.  Scrollbars will draw if needed.
			 IIMAGECTL_SetRect(pvc, &rc);

			 // Set the image into the control...
			 IIMAGECTL_SetImage(pvc,pi);

			 // Tell the control it is active - handles keypad events...
			 IIMAGECTL_SetActive(pvc,TRUE);

			 // Tell it to redraw...
			 IIMAGECTL_Redraw(pvc);
		  }
		  IIMAGE_Release(pi);
	   }
	}
Usage
None.