11-22-2005 01:58 PM
Part II
Retrieve Position Code
int LastPos;
char PanelLeft[10];
char PanelTop[10];
int PanelLastTop, PanelLastLeft;
char buff[50];
int Status;
char *ErrMsg;
Status = RegReadString (REGKEY_HKLM, "SOFTWARE\\AUXPANEL_TopPos", NULL, PanelTop, 10, (void *) &LastPos);
if (Status != 0)
{
ErrMsg = GetGeneralErrorString(Status);
sprintf(buff,"Error setting the %s panel's Top position: %s", "Aux Panel", ErrMsg);
}
// Save top
LastPos = atoi(PanelTop);
SetPanelAttribute (auxpanelHandle, ATTR_TOP, LastPos);
Status = RegReadString (REGKEY_HKLM, "SOFTWARE\\AUXPANEL_LeftPos", NULL, PanelLeft, 10, (void *) &LastPos);
if (Status != 0)
c {
ErrMsg = GetGeneralErrorString(Status);
sprintf(buff,"Error setting the %s panel's Left position: %s", "Aux Panel", ErrMsg);
}
LastPos = atoi(PanelLeft);// Convert from string to integer
SetPanelAttribute (auxpanelHandle, ATTR_LEFT, LastPos);
Now, the question I have now is how to setup the registry keys so that it doesn't cause an error the first time it is installed and launched?
11-22-2005 03:34 PM