i am storing values in resgistery while closing application and while relaunching application im getting values from registery (values coming coming correctly)and those values i want update in in the CREATESTRUCT
but values not updating in
CREATESTRUCT
What I have tried:
LPTSTR p = Width.GetBuffer(dwLen / sizeof(TCHAR));
LSTATUS lStatus = ::RegQueryValueEx(hPathKey, _T("Width"), NULL, &dwtype, (LPBYTE)Width.GetBuffer(MAX_PATH), &nBytes);
if (ERROR_SUCCESS == lStatus)
{
}
else {
dwLastError = GetLastError();
}
nBytes = (MAX_PATH) * sizeof(TCHAR);
lStatus = ::RegQueryValueEx(hPathKey, _T("Height"), NULL, &dwtype, (LPBYTE)Height.GetBuffer(MAX_PATH), &nBytes);
if (ERROR_SUCCESS == lStatus)
{
}
else {
dwLastError = GetLastError();
}
cs.cy = _tstoi(Height); // here the value is coming 786,and storing it in cs
cs.cx = _tstoi(Width); // width is 1214
and storing it in cs
if( !CFrameWndEx::PreCreateWindow(cs) )
but after this line executipon the values are updated,it means here when i debug its showing the above avlues(786,1214 ) not coming here.
could you please tell me if anything is wrong here