lockWindow
Syntax
- int lockWindow (int c)
Arguments
- c
- Set it to 1 to suppress updates of the filter dialog. Set it to 0 to unlock the window again.
Return
- If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.
Description
- This function disables or enables drawing in the filter dialog. It is only recommended to use it if you want to do a lot of changes to the filter dialog, e.g. moving, removing or adding dozens of control. Under some conditions, e.g. STRETCHED dialog attribute, this can take a few seconds. By using lockWindow(1) infront of the code and lockWindow(0) afterwards, the changes will take only a few miliseconds.
Example
%ffp
ctl(1): pushbutton,Text="Lock Window",size=(60,15)
ctl(3): pushbutton,Text="UnLock Window",size=(60,15)
ctl(6):statictext,"Press 'Lock Window', try to use the zoom controls and then press 'UnLock Window'.",size=(100,50)
OnCtl(n):
{
int r;
if (n==3 && e == FME_CLICKED) {
lockWindow(0);
}
else if (n==1 && e == FME_CLICKED) {
lockWindow(1);
}
return false;
}
Also see
- refreshWindow, refreshCtl, refreshRgn
Comments
- Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.