[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Window Refresh API Question

Posted on 2001-07-31
9
Medium Priority
?
370 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:bpoff
9 Comments
 
LVL 8

Expert Comment

by:Dave_Greene
ID: 6338567
Set AutoRedraw = True
and change the forms zorder

Me.Zorder 0  'Bring it to the top and repaint
0
 
LVL 5

Expert Comment

by:KDivad
ID: 6338701
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
 
LVL 1

Author Comment

by:bpoff
ID: 6341407
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:bpoff
ID: 6341469
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
 
LVL 5

Expert Comment

by:KDivad
ID: 6342827
<<... 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
 
LVL 1

Author Comment

by:bpoff
ID: 6344447
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
 
LVL 5

Expert Comment

by:KDivad
ID: 6345718
Ah, ok. Maybe I am just remembering wrong then.

Anyway, I'm glad you found your answer!
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7198300
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
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7213309
Per recommendation, points refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question