2.1.26.4 GetN_set_auto_checkbox


Description

customize the auto checkbox

Syntax

void GetN_set_auto_checkbox( TreeNode & tr, int nVal, int nRule, LPCSTR lpcszCaption)

Parameters

tr
[output] The tree node of GetN control
nVal
[input] the status of checkbox, 0 = uncheck, 1 = check
nRule
[input] when uncheck the checkbox, nRule = 0: the control will not turn read-only; nRule = 1: the control will turn read-only
lpcszCaption
[input] rename the "auto" checkbox

Return

Examples

EX1

#include <GetNbox.h>
void  GetN_set_auto_checkbox_ex()
{
    GETN_TREE(tr)    
    
    GETN_COMBO_BUTTON(fname, "Browse", "Picking a Data File", "File", "User.dat|System.dat|Group.dat", "Untitle.dat")  
    
	int nCheck = 1;
	int nRule = 0;//the control will not turn read-only when uncheck the checkbox
    GetN_set_auto_checkbox( tr.fname, nCheck, nRule, "test");
	
    if( GetNBox(tr) )
    {
    	TreeNode trAuto = tr.fname;
    	if( AUTO_CHECKED == octree_get_auto_support(&trAuto) )
    		trAuto.strVal = "Untitle.dat";
    	
        out_tree(tr);
    }
}

Remark

See Also

octree_get_auto_support

Header to Include

Reference