Changes between Version 26 and Version 27 of Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook
- Timestamp:
- 02/08/24 15:35:03 (10 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook
v26 v27 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. 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. Legacy code forms normally used fixed X,Y positions. It often simpler and easier to maintain to just advance the rects. 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. 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. 246 247 Legacy code forms normally used fixed X,Y positions. It often simpler and easier to maintain to just advance the positions.