| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== FREEZE (suspend control redrawing) ====== | [[freestate free resources .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[get read a record or entry .htm|{{btn_next_n.gif|Next page}}]] | | || {{newc7.jpg|NewC7.jpg}} **FREEZE( **//feq //**)** {{blk2blue.jpg|blk2blue.jpg}} **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. **Example:** **x1# = FREEZE (feq)** **x2# = FREEZE (feq)** **UNFREEZE (feq, x2#)** **UNFREEZE (feq, x1#)** **See also:** [[unfreeze resume control drawing .htm|UNFREEZE]]