User Tools

Site Tools

Navigation:  Language Reference > 13 - Built-in Functions >====== FREEZE (suspend control redrawing) ====== Previous pageReturn to chapter overviewNext page


FREEZE( feq )


Returns LONG value used to pass to the corresponding UNFREEZE pairing.

FREEZE Suspend control redrawing
feq A SIGNED field equate label representing the control that you wish to affect..

FREEZE suspends redrawing of the control of the current thread's top window with the passed feq. The result returned is a LONG value which must be passed unchanged to the paired UNFREEZE.

FREEZE and UNFREEZE are useful in certain situations where you wish to delay a control's redraw operation. For example:

·Dynamically changing several properties of the same control, each of which can alter its visibility, (e.g. font name, size and style)

·Performing multiple search-and-replace operations on an RTF control.

Calls to FREEZE can be nested. Every call must have its paired UNFREEZE. FREEZE and UNFREEZE functions must be used with accuracy; if there is no paired call to UNFREEZE for an executed FREEZE, the control cannot be redrawn and thus the screen can be displayed incorrectly.

If a control can be redrawn after UNFREEZEing (e.g., there are no other unclosed calls to FREEZE, the control is visible, etc.), the UNFREEZE function forces redrawing of the control.

Use with a Menu control
FREEZE/UNFREEZE can be used for Menu controls,  but the feq parameter for a Menu control must use the special value 10001h, or the EQUATE “Freeze:MenuBar” (defined in EQUATES.CLW).  FREEZE/UNFREEZE for Menu controls can be needed if the Frame Menu control is being changed from an MDI child thread. If the child window is modifying the Menu control which has already been displayed in the Frame (for example, as a response to some event within the ACCEPT loop), partial changes can become visible for the Frame menu before all the changes are completed.  FREEZE called for the menu control suspends redrawing until an UNFREEZE statement is executed. Calls to FREEZE for the Menu control can also be nested. The same number of calls to UNFREEZE are required to resume menu control redrawing.


x1# = FREEZE (feq)

x2# = FREEZE (feq)

UNFREEZE (feq, x2#)

UNFREEZE (feq, x1#)

See also: UNFREEZE

freeze_suspend_control_redrawing_.htm.txt · Last modified: 2021/04/15 15:57 (external edit)