Changes between Version 61 and Version 62 of Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook
- Timestamp:
- 04/04/25 13:15:01 (2 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/825gen2/Dev/UpdatingLegacyAppsToNewLook
v61 v62 9 9 2. Copy the files apphelpers.cpp, apphelpers.h, and appinfo.h from one of the new standard projects such as ID storage into the project to update. Changes to these files might be needed. For example, if different fonts or font sizes are desired these are specified in apphelpers.cpp. 10 10 11 3. Create a new header file //wght_screen.h// in the //src// folder. Copy the following code into the header :11 3. Create a new header file //wght_screen.h// in the //src// folder. Copy the following code into the header. This is a starting point and the CFormRect variables defined are common for many projects. It may be necessary to add additional CFormRects for the project being updated. 12 12 13 13 {{{#!c++ … … 185 185 }}} 186 186 187 Modify this function for new style display such as:187 6. Modify this function for new style display such as: 188 188 189 189 {{{#!c++ … … 212 212 }}} 213 213 214 Add the following header include to the main cpp file214 7. Add the following header include to the main cpp file 215 215 {{{#!c++ 216 216 #include "wght_screen.h" 217 217 }}} 218 218 219 Add an instance of the CWeighingScreen above all the functions such as:219 8. Add an instance of the CWeighingScreen above all the functions such as: 220 220 {{{#!c++ 221 221 CWeighingScreen weightScreen; 222 222 }}} 223 223 224 Modify all the references to the Show//XXXX// show as ShowGTN() to add the weightScreen instance such as: 225 {{{#!c++ 226 weightScreen.ShowGTN(); 227 }}} 228 229 230 6. Find the InitLCD function call and change as follows: 224 225 9. Find the InitLCD function call and change as follows: 231 226 232 227 {{{#!c++ … … 252 247 }}} 253 248 254 255 256 6. Search for all menu and inputs forms such as search for "FORM_INIT" make appropriate changes to use new style FORM_ADD_INPUT2 instead of FORM_ADD_INPUT and FORM_ADD_BUTTON2 instead of FORM_ADD_BUTTON such as: 249 10. Modify all the references to the Show//XXXX// show as ShowGTN() to add the weightScreen instance such as: 250 {{{#!c++ 251 weightScreen.ShowGTN(); 252 }}} 253 254 11. Search for all menu and inputs forms such as search for "FORM_INIT" make appropriate changes to use new style FORM_ADD_INPUT2 instead of FORM_ADD_INPUT and FORM_ADD_BUTTON2 instead of FORM_ADD_BUTTON such as: 257 255 258 256 {{{#!c++