Receive a array of boolean values saved by save_default_checkboxes in the registry.
bool load_default_checkboxes( LPCSTR lpcszDlgName, vector<byte> & vbValues, LPCSTR lpcszValName = NULL )
True for success, false if lpcszDlgName section does not have the item in registry.
EX1
#include <GetNBox.h> void load_default_checkboxes_Ex1() { vector<byte> vbValues ; LPCSTR dlgName="testDlg2" ; LPCSTR valueName="Testing"; GETN_TREE(tr) GETN_CHECK(CH1, "college",false) GETN_CHECK(CH2,"family", true) GETN_CHECK(CH3, "society",false) //initialize tree value for defalut setting if(load_default_checkboxes(dlgName,vbValues,valueName)) { tr.CH1.nVal=vbValues[0]; tr.CH2.nVal=vbValues[1]; tr.CH3.nVal=vbValues[2]; } // save tree value to Registry. if(GetNBox(tr,dlgName)) { vbValues.SetSize(0); vbValues.Add(tr.CH1.nVal); vbValues.Add(tr.CH2.nVal); vbValues.Add(tr.Ch3.nVal); if(!save_default_checkboxes(dlgName,vbValues,valueName)) printf("failed to save user's choice\n"); } else printf("usr click cancel\n"); }
save_default_checkboxes
origin.h