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 SkipVought 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 a new change in Window??

Status
Not open for further replies.

give2get

Programmer
Oct 15, 2002
8
0
0
JP
Which's API help refresh a new change similar click Apply button?
 
Hi :)

You can try,

LockWindowUpdate(SomeHWND);

//Do some drawing here

LockWindowUpdate(NULL);

or

BOOL UpdateWindow(
HWND hWnd // handle of window
);

The UpdateWindow function updates the client area of the specified window by sending a WM_PAINT message to the window if the window's update region is not empty. The function sends a WM_PAINT message directly to the window procedure of the specified window, bypassing the application queue. If the update region is empty, no message is sent.



 
Thanks any way, but this method have only effect with my own program. I'm trying write a Program to change Appearancy of windows but not require to restart windows.
Please help me.
 
You ca try to replace implementation/behaviour for default (global) window classes in a dll and to make this dll to be implicitely loaded by all process. See documentation for RegisterClassEx, "System Classes", "Application Global Classes", CS_GLOBALCLASS , "How the System Locates a Window Class" in MSDN PlatformSDK|UserInterface|Windows user interface ....

To make your dll to be loaded by all process in "
Windows NT/2000/XP: To create a class that can be used in every process, create the window class in a .dll and load the .dll in every process. To load the .dll in every process, add its name to the AppInit_DLLs value in following registry key:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows

Whenever a process starts, the system loads the specified .dll in the context of the newly started process before calling its entry-point function. The .dll must register the class during its initialization procedure and must specify the CS_GLOBALCLASS style.

"

But if you need also already running processes to use same dll it may be a little difficult.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top