doesn't a modal need a user respose yes/no when you do a dlg.domodal that thread stops until the user responds
True, but if it's the main window there is no other thread to worry about. You can do lots of actions within the dialog box while it is on the screen. Maybe you should explain exactly what problem you are trying to solve, rather than deciding on the window type before you know what you want to do with it.
The registry is like a file system with different access rights for the different keys. Navigate to your key using regedit and open the 'Permissions' command from the context menu to see the permissions for specific users and groups. Some keys have restricted access even for administrators (SAM, SECURITY). Such keys can be only accessed by the SYSTEM user.
So the answer to your question is: You must have the access rights which are usually granted when you open the key using the account of the key's owner.
At the moment I know only two reasons for denied permissions when trying to write to HKCU:
Using RegOpenKeyEx(), the key was not opened with the KEY_SET_VALUE or KEY_WRITE access right.
Using RegOpenKey() instead of RegOpenKeyEx().
Regarding the second reason I will cite the MSDN:
The RegOpenKey function uses the default security access mask to open a key. If opening the key requires a different access right, the function fails, returning ERROR_ACCESS_DENIED. An application should use the RegOpenKeyEx function to specify an access mask in this situation.
If this does not solve your problem, you should show us the code that fails (including the RegOpenKeyEx() call).
Sir i have an base class which has an pure virtual member function..i have made it and also made other member function. now this is a general base class.i want that member member functions in derived class by their virtual function in which i can get the member function of base class and can do individual operation in each derived class.. what will be the syntax code for this problem how i can do these things? please reply my soon because this is my last day of assignment.. please
Last Visit: 31-Dec-99 19:00 Last Update: 15-Jan-18 23:50