Window Refresh API Question

I need to have windows completely redraw a window, including the titlebar, system menu, and all controls.

This is due to displaying a popup window over a windowed DirectX area.  Windows does not seem to understand that the DirectX window was updated and thus, the popup window needs to be redrawn.

I have tried Me.Refresh and UpdateWindow Me.hWnd.  Neither of these works properly.  

Is there some message I can send to the window or API call that will tell Windows to just redraw the whole thing???

-- Brian
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

NetminderConnect With a Mentor Commented:
Per recommendation, points refunded and question closed.

CS Moderator
Set AutoRedraw = True
and change the forms zorder

Me.Zorder 0  'Bring it to the top and repaint
InvalidateRect. I don't remember for sure how it works, but it basically tells windows that the area's display has become invalid and needs to be repainted.
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

bpoffAuthor Commented:
Autoredraw=True does nothing in this case.  InvalidateRect also does not help as you can only invalidate the client area of the window.  I need to redraw the entire form, including the system menu, close button, and caption.

bpoffAuthor Commented:
Ah yes, the answer is to use a DirectDraw Clipper object.

The documentation on what these things do is so amazingly obscure that I just figured it out.

<<... only invalidate the client area of the window ...>>

You sure? I'm not doubting you, but I could swear I've seen it used on custom caption bars before!
bpoffAuthor Commented:

The reason I say it's only the client area of the window is that you have to specify a rectangle and an upper-left coordinate of 0,0 is the upper left of the client area of the window, not including the title bar.  

A better way to look at it is what do you get if you do a "GetWindowRect" on a form?  You get the coordinates of the window, not including the titlebar and its various gizmos.
Ah, ok. Maybe I am just remembering wrong then.

Anyway, I'm glad you found your answer!
bpoff, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

DanRollins -- EE database cleanup volunteer
All Courses

From novice to tech pro — start learning today.