ImageControls:
Product
Support Overview
ImageControls 3:
Product
Support Overview
Application
Notes
Downloads
Library
Error
Codes
FAQs
Revision
Levels
Supported
Configurations
Technical
Documentation
OTHER TOOLS:
Knowledgebase
Support
Request
PRODUCT INFO:
Product
Overview
IC Toolkit 3.1 is the most recent release of the ImageControls Toolkit.
If you are running a previous version of Kofax ImageControls, refer to the ImageControls How to Buy Web page for details on how to obtain the appropriate ImageControls 3 release for your configuration.
How do you access the Height and Width properties of the KView control for the purpose of resizing the control at runtime?
When you add a control to a VC++ project, a couple of classes are created and displayed in the Class View. If you use the ClassWizard, these will be _DKView and _DKViewEvents. If you add the control from the Component Gallery, the CKView and COleFont classes will be created. Using the ClassWizard is the preferred method since it will automatically create the event handler class. Now, let's say you want to set the size of the KView window by setting the Height and Width properties. However, when you open the _DKView or CKView class there are no SetHeight or SetWidth functions. Since the KView is derived from the CWnd base class, it inherits all the functionality of the CWnd. The CWnd class has a function called MoveWindow() that can easily be used to both position and size the KView. VCDemo implements this in the CVCKView::Resize() function as follows:
/////////////////////////////////////////////////////////////////////////////
// Function: Resize
// Purpose: Resize the KView control to the current window dimensions
// Note: Errors are displayed before returning from this function
// Returns: NONE
/////////////////////////////////////////////////////////////////////////////
void CVCKView::Resize()
{
CRect rect, viewrect;
int nNewWidth;
m_pParentWnd->GetClientRect(&rect);
if (m_bTwoWindows)
{
if (!::IsWindow(m_kviewOcx1.m_hWnd) || !::IsWindow(m_kviewOcx2.m_hWnd))
{
return;
}
nNewWidth = rect.right / 2;
viewrect.top = viewrect.left = 0;
viewrect.right = nNewWidth;
viewrect.bottom = rect.bottom;
m_kviewOcx1.MoveWindow(&viewrect);
viewrect.left = nNewWidth;
viewrect.right = rect.right;
m_kviewOcx2.MoveWindow(&viewrect);
}
else
{
if (!::IsWindow(m_kviewOcx1.m_hWnd))
{
return;
}
m_kviewOcx1.MoveWindow(&rect);
}
}
The MoveWindow() function can be called in one of two ways:
void MoveWindow( int x, int y, int nWidth, int nHeight, BOOL bRepaint = TRUE );
void MoveWindow( LPCRECT lpRect, BOOL bRepaint = TRUE );
The Kofax ImageControls support group is skilled in Visual Basic and Visual C++ development and can assist developers in building their custom imaging applications. Our engineers can also point developers to source code samples on the Kofax FTP site.
The ImageControls 3 Technical Support Web pages have been kept up to date. We encourage ImageControls developers to investigate the information in these Web pages before looking for other sources of support. Use the menu options in the upper left side of this page to access additional product support Web pages for this product.
For details regarding technical support available for all Kofax products, please review the current Support Overview & Options and Product Support Eligibility Matrix Web pages.
