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)?

Who is Participating?
Slick812Connect With a Mentor Commented:
I am guessing this window is in a different process?  If you created a window and placed it in to another window , then the WM_CLOSE will not work on a child window to destroy it, , you might try the DestroyWindow(hNewWindow) function
You could try and do form.invalidate to see if that helps, or turn on the doublebuffered property of the form and components.

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?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.