Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to refresh after changing registry

Status
Not open for further replies.

samibami

Programmer
Oct 12, 2003
28
IL
hi,
i made a little tweak that changes windows hidden attribute. however,i don't see changes right away ,only after refresh (with F5 or right click). how do i refresh from within my application?

i'm using bcb5.
 
you can't do it from your application

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
hi there,
i know it can be done 'cause the "tweak xp" software does it.
for example if you change recycle bin's icon name it shows the changes right away.

what happends when you press F5 or right click refresh?
maybe i can use those methods to? how do i access them?

the answer is out there...
 
you can try to find regedit or regedt32 window and send some messages, but in Windows is no such API function to refresh that windows.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Actually... all you need to do is send a WM_PAINT message to specific window (or anythind that actually has a window handle...) and it will cause refreshing.
 
>bNasty
if you sent WM_PAINT, you will at most update graphical information from some information, but refresh in regedit is to update information.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
OK, I obviously don't understand what's the problem here :) You can't force 'registry' to refresh! What you could do is to force application to refresh its status, so if the app needs registry info to fully refresh, it will read your registry tweaks and change appropriatelly, since 'registry' is nothing else than a big database!
Send a refresh message to desktop 'window' and it will re-read everything it needs and redraw itself! The same is with any other application!
 
>bNasty
the refresh like you say, refreshes only data loaded in memory, but registry is a file, so if you send WM_PAINT then regedit will repaint from data loaded in memory. The question is how to make regedit to load in memory the registry file again. It is not loaded automatically when just refresh graphical information.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top