Solved

Window Refresh API Question

Posted on 2001-07-31
9
359 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Excel object stays open 19 78
Put text in a picture ASP.NET C# 2 60
VBA Shell can't Find Word document 11 110
converting visio 2010 to powerpoint 2010  - formatting issues 5 92
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

809 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