I am trying to give the user the option to change the background colour of a List Box and store the selected colour in the ini file, so that it will re-appear when they logon on again. The code I am using is as follows:
// TODO: Add your control notification handler code here
CPatientDoc* pDoc = GetDocument();
if (dlg.DoModal() == IDOK)
COLORREF color = dlg.GetColor();
OUR_APP->WriteProfileString( "Colours", "Background", LPCTSTR(color));
The main problem is that the entry written in the ini file is always null, whichever colour the user selects.
As far as I am aware the COLORREF type is a RGB value, can I store this in anyway in the INI file.
I very much look forward to a reply
Thanks in advance.