TCheckbox dont transfer buffer
<p>**hey,
I got a big probelm, since two weeks i want to set a checkbox in my programm but it doesnt work, after that it should copy the value to an .ini. The Value did not be transfer .
here is part of my code:</p>

<pre><code>#if !defined(OWL_EDIT_H)
#include &lt;owl/edit.h&gt;
#endif
#if !defined(OWL_UPDOWN_H)
#include &lt;owl/updown.h&gt;
#endif
#if !defined(OWL_CHECKBOX_H)
#include &lt;owl/checkbox.h&gt;


#endif

struct TTransferBuffer{
char masksizeWidth[5];
char masksizeHeight[5];
char meanthresh[5];
WORD useadaptive;
};

class TSetupDialog : public TDialog
{
private:
TEdit *maskWidth, *maskHeight, *thresh;
TUpDown *udmask, *udmask2, *udthresh;
TCheckBox *useadaptive;

public:
TSetupDialog(TWindow* parent, int resID, TTransferBuffer&amp; ts);
virtual void SetupWindow();
};

TSetupDialog::TSetupDialog(TWindow* parent, int resID, TTransferBuffer&amp; ts)
:TDialog(parent, resID)
{
maskWidth = new TEdit(this, IDC_MASKSIZE, 5);
maskHeight = new TEdit(this, IDC_MASKSIZE_H, 5);
thresh = new TEdit(this, IDC_MEANTRESH, 5);
udmask = new TUpDown(this, IDC_UD_MASKSIZE);
udmask2 = new TUpDown(this, IDC_UD_MASKSIZE_H);
udthresh = new TUpDown(this, IDC_UD_MEANTRESH);
useadaptive = new TCheckBox(this, IDC_ADAPTIVE_MEAN);

SetTransferBuffer(&amp;ts);
}

and the cpp:

void TPictureWindow::CmChangeSettings()
{
TTransferBuffer tbuffer;
char buffer[50];
unsigned long retval;

sprintf(&amp;tbuffer.masksizeWidth[0], "%5d", octcfg.maskWidth);
sprintf(&amp;tbuffer.masksizeHeight[0], "%5d", octcfg.maskHeight);
sprintf(&amp;tbuffer.meanthresh[0], "%5d", (int)(octcfg.edgeVal*10.1));
tbuffer.useadaptive = octcfg.useadaptive;
if(TSetupDialog(this, IDD_SETUPDLG, tbuffer).Execute() == IDOK){
octcfg.maskWidth = atoi(&amp;tbuffer.masksizeWidth[0]);
octcfg.maskHeight = atoi(&amp;tbuffer.masksizeHeight[0]);
octcfg.edgeVal = atof(&amp;tbuffer.meanthresh[0])/10.0;
octcfg.useadaptive = tbuffer.useadaptive;
HANDLE hDataFile = CreateFile("OCTopus.ini", GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
WriteFile(hDataFile, &amp;octcfg, sizeof(octcfg), &amp;retval, NULL);
CloseHandle(hDataFile);
}
</code></pre>
