Changes between Version 32 and Version 33 of Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook
- Timestamp:
- 02/08/24 16:31:38 (10 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook
v32 v33 215 215 }}} 216 216 217 In the above example notice after FORM_INIT the function !SetupInputFormToUseFontSet is called. This gives the form a pointer to the fonts that were initialized previously. The function also sets the starting positions of the rect, and rectInp rectangles that are used to define where to show the prompts and input fields. The final parameter is a string used to determine the width of the prompts. This should be the longest prompt text in the form. The !AdvanceInputRects function call is used between FORM_ADD_INPUT2 calls to move the rect and rectInp down an appropriate amount for the next input.217 In the above example notice after FORM_INIT the function !SetupInputFormToUseFontSet is called. !SetupInputFormToUseFontSet is a helper function defined in apphelpers.cpp. This gives the form a pointer to the fonts that were initialized previously. The function also sets the starting positions of the rect, and rectInp rectangles that are used to define where to show the prompts and input fields. The final parameter is a string used to determine the width of the prompts. This should be the longest prompt text in the form. The !AdvanceInputRects function call is used between FORM_ADD_INPUT2 calls to move the rect and rectInp down an appropriate amount for the next input. 218 218 219 219 {{{ … … 243 243 }}} 244 244 245 In the above example notice after FORM_INIT the function !SetupMenuFormToUseFontSet is called. This gives the form a pointer to the fonts that were initialized previously. The function also sets the starting position of the rect rectangle that is used to define where to show the button.245 In the above example notice after FORM_INIT the function !SetupMenuFormToUseFontSet is called. !SetupMenuFormToUSeFontSet is a helper function defined in apphelpers.cpp. This gives the form a pointer to the fonts that were initialized previously. The function also sets the starting position of the rect rectangle that is used to define where to show the button. 246 246 247 247 Notice between FORM_ADD_BUTTON2 lines the rect is advanced by **rect += btnAdvanceY;** The CFormRect class contains multiple values. The += operator is overloaded to allow the advance as shown. The !AdvanceInputRects function from the previous example is actually doing the same thing, but for input forms to advance both the prompt and the input rectangles.