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
LVL 1
bpoffAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

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

Netminder
CS Moderator
0
 
Dave_GreeneCommented:
Set AutoRedraw = True
and change the forms zorder

Me.Zorder 0  'Bring it to the top and repaint
0
 
KDivadCommented:
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.
0
Never miss a deadline with monday.com

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.

0
 
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.

0
 
KDivadCommented:
<<... 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!
0
 
bpoffAuthor Commented:
KDivad,

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.
0
 
KDivadCommented:
Ah, ok. Maybe I am just remembering wrong then.

Anyway, I'm glad you found your answer!
0
 
DanRollinsCommented:
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
0
All Courses

From novice to tech pro — start learning today.