I have a few checkboxes and radiobuttons, on programexit i want to save their
values to a settings.ini file using WinApi WritePrivateProfileString

[color=blue]invoke IsDlgButtonChecked,hWnd,IDC_CHK1
.if eax==0

My Problem is how and what kind of value can i store to a textfile
so i can reload the checkbox value again on program start?

Or is there an easier way ?


This message was written entirely in my Messageboard Editor v4.0
Posted on 2003-11-05 08:38:24 by Ranma_at
Hi Ranma_at

Use the string '0' and '1' values. Easy to read back with GetPrivateProfileInt.

Posted on 2003-11-05 09:06:16 by KetilO
If you use bm_getcheck you get 3 different values
BST_CHECKED Button is checked.
BST_INDETERMINATE Button is grayed, indicating an indeterminate state (applies only if the button has the BS_3STATE or BS_AUTO3STATE style).
BST_UNCHECKED Button is cleared

Store these trhee different values. I think they are 0, 1 and 2.
Look into your windows.inc file
Posted on 2003-11-05 12:03:58 by greenant
Thanks Ketil O. for the hint.

First i was afraid of storing a simple "1" "0" string but with the GetPrivateProfileInt its really easy to
catch radiobuttons and checkboxes.


Posted on 2003-11-06 02:31:12 by Ranma_at