Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » Painting below your window, not bleeding into your window...
Painting below your window, not bleeding into your window... [message #13644] Fri, 18 January 2008 20:40 Go to next message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
I have an interesting problem.

Imagine this kind of window arrangement:

+----------------------------------------------------------------+
|                                                                |
|     Window Alpha                                               |
|                                                                |
|     +--------------------------+                               |
|     |                          |                               |
|     |  Window Beta             |                               |
|     |                  +-------+                               |
|     |                  |                                       |
|     |                  |                                       |
|     +------------------+                                       |
|                                                                |
|                                                                |
|                                                                |
|                                                                |
|                                                                |
+----------------------------------------------------------------+


Imagine that you have no control over how Window Alpha's content is displayed, but you want to display Window Beta in such a way that you do not flicker, regardless of what happens in Window Alpha. That is, Window Beta's content is never overwritten, even while Window Alpha's content is constantly changing.

Note that Window Beta is an odd shape. The shape can be even odder than this. In fact, the shape will change over time, and the window will likely move around within the Window Alpha area. Such movements are automated, though, not controlled by the user.

It will even disappear on occasion.

A Windows-only solution is acceptable to me, for solving this problem. In fact, I cannot run my code on another operating system because of the drivers I'm forced to use.

I'm quite puzzled. I see that if I click on a menu that overlaps Windows Alpha, Window Alpha does not draw in the menu's area. I also see that if I create a dialog window from within the application that overlaps Window Alpha's area, Window Alpha's ever-shifting content does not write into the dialog.

But, for some reason, I cannot seem to create a window of my own over this area without having Window Alpha draw into it. I must be doing something stupid, but I just cannot see what it could be.

I figure I need a window the size of Window Alpha that lays over Window Alpha, with all its bits set to a transparent bit-value by default, that I draw over to create the Window Beta that I want. But I'm not sure how I would create such a thing, and how I would communicate effectively with it (to make it change shape, content, etc while Window Alpha continues doing whatever it is doing).

Does anyone have any advice to offer? At least a direction for me to examine?
Re: Painting below your window, not bleeding into your window... [message #13655 is a reply to message #13644] Sat, 19 January 2008 11:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
tvanriper wrote on Fri, 18 January 2008 14:40

I have an interesting problem.

Imagine this kind of window arrangement:

+----------------------------------------------------------------+
|                                                                |
|     Window Alpha                                               |
|                                                                |
|     +--------------------------+                               |
|     |                          |                               |
|     |  Window Beta             |                               |
|     |                  +-------+                               |
|     |                  |                                       |
|     |                  |                                       |
|     +------------------+                                       |
|                                                                |
|                                                                |
|                                                                |
|                                                                |
|                                                                |
+----------------------------------------------------------------+


Imagine that you have no control over how Window Alpha's content is displayed, but you want to display Window Beta in such a way that you do not flicker, regardless of what happens in Window Alpha. That is, Window Beta's content is never overwritten, even while Window Alpha's content is constantly changing.

Note that Window Beta is an odd shape. The shape can be even odder than this. In fact, the shape will change over time, and the window will likely move around within the Window Alpha area. Such movements are automated, though, not controlled by the user.

It will even disappear on occasion.

A Windows-only solution is acceptable to me, for solving this problem. In fact, I cannot run my code on another operating system because of the drivers I'm forced to use.

I'm quite puzzled. I see that if I click on a menu that overlaps Windows Alpha, Window Alpha does not draw in the menu's area. I also see that if I create a dialog window from within the application that overlaps Window Alpha's area, Window Alpha's ever-shifting content does not write into the dialog.

But, for some reason, I cannot seem to create a window of my own over this area without having Window Alpha draw into it. I must be doing something stupid, but I just cannot see what it could be.

I figure I need a window the size of Window Alpha that lays over Window Alpha, with all its bits set to a transparent bit-value by default, that I draw over to create the Window Beta that I want. But I'm not sure how I would create such a thing, and how I would communicate effectively with it (to make it change shape, content, etc while Window Alpha continues doing whatever it is doing).

Does anyone have any advice to offer? At least a direction for me to examine?


AFAIK, there are special window types in Win32 that can do what you need:

http://msdn2.microsoft.com/en-us/library/ms632599(VS.85).aspx#layered

We have not touched this subject in U++, mostly because it is quite specific and we would have to find an equivalent in X11....

Mirek
Re: Painting below your window, not bleeding into your window... [message #13679 is a reply to message #13644] Mon, 21 January 2008 17:40 Go to previous message
tvanriper is currently offline  tvanriper
Messages: 85
Registered: September 2007
Location: Germantown, MD, USA
Member
I understand. I expected a Windows-centric solution to this problem... this issue just exposes some ignorance that I have on this subject.

I'll follow your link right now. Many thanks.
Previous Topic: Custom actions on Minimize or Close button
Next Topic: Problems with CursorImage/Popups/Frames on X11
Goto Forum:
  


Current Time: Fri Mar 29 01:27:03 CET 2024

Total time taken to generate the page: 0.01018 seconds