Link to home
Start Free TrialLog in
Avatar of Thor371
Thor371

asked on

Windows Messages Help

Hiya Experts

I am using FindWindowEx function on a window and am sending a certain class displaying an animated picture the
wm_close message. It seems to work fine but after sending the message to the class the picture doesnt disappear like i want it to. I tried to UpdateWindow and RedrawWindow but they both dont seem to do what I want. If I cant wipe the dead image away
is it possible to send it a resize command so I can update the pages coordinates and trim it off? Ever better, is it possible to insert my own object (page or image) into that control (by classname)?

thanks
Thor371
Avatar of Mike Littlewood
Mike Littlewood
Flag of United Kingdom of Great Britain and Northern Ireland image

You could try and do form.invalidate to see if that helps, or turn on the doublebuffered property of the form and components.
Hi.

A FindWindow() and FindWindowEx() functions doesn`t result the descent classes like some Memos, Edits etc. They can only return a handle to the main forms of applications - not the controls in.

If we try to find a seconds forms of application by FindWindow, it return handle of main form of this application.

So: you have to

1) FindWindow of main application
2) Find the control by GetWindow() function, for example:

hwndChild = GetWindow(hwndWindow, GW_CHILD); // return first child of window
GetWindow(hwndChild, GW_HWNDNEXT); // return next control with the level same as hwndChild etc.
hello  Thor371, , I do not understand what you are doing ? ? You say - " am sending a certain class displaying an animated picture the wm_close message". . . But I do nt know what that means? ?

Can you show us the code you use for this. . .

 I do not understand your  "class displaying an animated picture" I do not know what the class is or how you placed it in a window?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_248744
Member_2_248744
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial