PDA

View Full Version : OSD PopUp update



Ron
October 13th, 2002, 12:55 PM
Wow nice Work Mark!

Its uploading for all your viewing pleasure!

Ron
October 13th, 2002, 12:55 PM
Shouldn't that be little endian ?

SteveV
October 13th, 2002, 12:55 PM
Cool, Mark

Thanks!

--Steve

SteveV
October 13th, 2002, 12:55 PM
Hi Mark,

There appears to be a weird bug with v2.1.3 of the OSD Popup plugin :sad: From what I've been able to determine the OSD screen draw seems to happen at the end of the MultiGroup that called the OSD action. You should be able to duplicate the problem like this:

Create a multigroup with 2 commands:

Command 1: OSD Message with "Timeout" set to 5 seconds.

Command 2: Wait action set to 4000

When you run the MultiGroup the OSD action is deferred until AFTER the wait action times out. The result is that the OSD message is only displayed for 1 second.

Additionally, if the total time it takes to run a MultiGroup is longer than the OSD timeout value, the OSD message will flash very briefly after the multigroup has finished running,

[EDIT] ...forgot to mention I'm running XP

Regards -- Steve

<font size=-1>[ This Message was edited by: SteveV on 2002-01-23 21:42 ]</font>

SteveV
October 13th, 2002, 12:55 PM
Hey Mark,

Luckily, I had some of the older versions still zipped up on my HD. Version 2.0 is fine but 2.1 is broken--I'm not sure if there were any versions in between.

[EDIT: but you already knew that...:wink:

Regards -- Steve

<font size=-1>[ This Message was edited by: SteveV on 2002-01-24 00:10 ]</font>

SteveV
October 13th, 2002, 12:55 PM
Mark,

No big--tomorrow is more than fine. Let me know if I can do anything to test or otherwise be of help.

Thanks!
Steve

Mark F
October 13th, 2002, 12:55 PM
A new version (2.1) and source is on it's way to Ron.

Included changes:
Use a bitmap as a background
Decide if you want the text background to be drawn or not (opaque or transparent)
Custom (user defined) locations and sizes for the OSD
When stretching a bitmap, maintain the aspect ratio
Use a user defined register value for the color of the background, text and/or border or choose a color directly
Save (set) the defaults used for all new popups
Supports Multi-monitor (as far as I can tell)

I think that is it for this release. Report any problems here and enjoy! :smile:

Mark F
October 13th, 2002, 12:55 PM
DARN!!!!!!

The OSD is supposed to popup on top of everything else. I changed it to allow me to debug easier and forgot to change it back before sending it to Ron. I'll build a fixed version now and resend as version 2.1.1. Sorry.

A multi-monitor setup, in the Windows definition, is one large desktop. I place the OSD relative to this large desktop.

I have nothing to do with the target button on the plugins page. By the way, I don't see this behavior on my machine and version of Girder (3.0.24).

Mark F
October 13th, 2002, 12:55 PM
Cool.

So now we have a few different paths that can be taken with regards to the multi-monitor stuff. :smile:

- You can implement what you want in the new sources on the developer site (fastest to get done)

- You can tell me (including the Win32 API calls) what you want and I'll do it as I find time (next fastest to get done)

- You can tell me (without including the Win32 API calls) what you want and I'll do it as I find time and discover how (slowest to get done)

- I can go off with no guidance and try to come up with support that everyone wants (actually, this is the fastest because it is already complete! :smile: )

I'd be happy to give an option to make this work differently. However, I am not a Windows user interface guru and don't know which calls will make this possible. (it took me 3 months to make the current multi-monitor stuff work) Pointing me in the direction you want to go can be enough, IF you want to wait while I figure out how to get there. Showing me the Win32 calls (like showing me the prefered path) will improve my progression rate.

By the way, one stipulation: Any method I use must work on all platforms. I will not build OS revision or device driver dependant code as I don't have every OS or piece of hardware to test it.

Specifically, to do what you want, I need to know how to get the exact dimensions (in pixels) of the viewable portion of each display surface. The interfaces I use now return the size and position of the large desktop.

Thanks!

Mark F
October 13th, 2002, 12:55 PM
I think one of my co-workers found what I need while working on a DLP projector control system. :smile:

He sent me some code and I'll check it out at home when I get a chance.

Mark F
October 13th, 2002, 12:55 PM
Update with more multi-monitor choices is just about ready (6am comes REALLY early when you stay up past 3 :sad: ).

I've changed the behavior of the custom definition window to try to take into account the inital size problem. I don't know if it will make more sense or not but it will work differently in the next release.

Colors are stored in the registers as the decimal equavilent of COLORREF values.

From the Microsoft Developer's Network documentation:

COLORREF

The COLORREF value is a 32-bit value used to specify an RGB color.

Remarks
When specifying an explicit RGB color, the COLORREF value has the following hexadecimal form:

0x00bbggrr

The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF.

I know. I know. I'll try in non-engineering-speak but I haven't had coffee so no promises: Any color can be represented on a PC by defining how much of each of the primary colors (Red, Green, Blue) it contains. A COLORREF allows you to define a color using one 24-bit value. Each primary color component can range from 0-255 (0-0xff) and, when displayed using the hexadecimal format, takes two digits of the number.

Unforunately, Girder registers are in decimal format. Luckily, the Windows caculator will convert from decimal to hex with the press of a button. This allows you to define the number in hex and press the dec button to see the number as it is required in the register.

Let me give some examples of specific values:
White - 16777215 (0xffffff)
Black - 0 (0)
Red - 255 (0xff)
Green - 65280 (0xff00)
Blue - 16711680 (0xff0000)

I'm sorry but this is the best answer I can give, right now. :sad:

Mark F
October 13th, 2002, 12:55 PM
A newer version (2.1.3) has been sent to Ron for upload. This version has better support for multi-monitors, better custom location/size support and a fix for the "custom location definition dialog box really small" bug.

Thanks for all the inputs and a special thanks to mitko for testing this for me.

I need to work on some other stuff for a while so new features won't be added during that time. However, if someone finds a bug, I will try to make some time to find and fix it.

As usual, anyone is welcome to use the source (when it shows up on the developer page) and create something better.

Mark F
October 13th, 2002, 12:55 PM
Do you know if this just started with 2.1.3 or has it been there for a while? Thanks.

EDIT: This appears to have started between 2.0 and 2.1. I'll investigate.

_________________
Mark F

<font size=-1>[ This Message was edited by: Mark F on 2002-01-24 00:03 ]</font>

Mark F
October 13th, 2002, 12:55 PM
Sorry about that. :smile:

I remembered where my backup stuff was hidden right after sending the previous non-edited post.

Mark F
October 13th, 2002, 12:55 PM
Have I mentioned how much I *love* programming under Windows? (if you read a lot of sarcasm into this, you'd be only half right)

I have a change that will make the popup behave like it did before. I'd like to get some feedback on another change before I release this though. That will probably be tomorrow (WAY different timezone :smile: ). Will that be OK or do you need this immediately?

By the way, thanks for catching this and giving the easy to reproduce steps.

Mark F
October 13th, 2002, 12:55 PM
Progress has slowed a bit do to schedule conflicts. I hope to have a new version out this week. Sorry for the delay.

Mark F
October 13th, 2002, 12:55 PM
I've sent a new version to Ron. 2.1.5 has a fix for the "doesn't display during a wait command" bug mentioned above. It also includes better multi-monitor support and understands when the desktop is re-sized.

Please report problems here. Enjoy!

mitko
October 13th, 2002, 12:55 PM
That's good work, Mark. I have a questions about the new version:
1. How can I make it popup on top of all other windows?
2. I use a multimonitor setup and when I select "centered" for the position parts of the popup window appears on both screens. Can you make it somehow to select a particular window. I know I can select a custom location but I think you should reevaluate the definition of center, Top Left... for a multimonitor setup. I think it's not hard to be done and if you want please e-mail me (pankov@online.bg) to discuss it.
I also have an error when I press "Target" in the Plugins tab.

Except those minor things this a WELL DONE JOBE, Mark
:smile:

mitko
October 13th, 2002, 12:55 PM
About the error: it disappeared. I suppose something else was wrong.

About multimonitor setups: Yes you are right about the large desktop but there are also defined different monitors and you can tell which one which is so the Popup can be centered on a single one. I know this is not important but I think it will be good to have this feature.

mitko
October 13th, 2002, 12:55 PM
I'll download the source code but I doubt I'll be able to do it my self because first I'll have to understand most of the code and second I'm not that good in programming in VC++ :sad:(

For the other option to point you with some APIs I think I can do this (not in the moment but tomorrow or the day after). Can we talk somowhere else (I don't think we should flood the forum with this stuff)?
My ICQ#: 86915410
my e-mail: pankov@online.bg

mitko
October 13th, 2002, 12:55 PM
OK
then that should mean that you don't need my help?
The only think I request from the multi-monitor version is to be able to center, topleft corner, ... the message on every monitor.
And something else don't you think it will be good to have the ability to define the size of the popup window even when not using custom location?

mrichmon
October 13th, 2002, 12:55 PM
Bug with custom location window on win2k. The first time you click on "Define" for each of the custom locations, a window pops up which only shows the title bar text "Custom OSD #" and nothing else. You need to resize the window in order to see the buttons.

This is not clear since there are no resize handles visible.

mrichmon
October 13th, 2002, 12:55 PM
What is the format for a colour stored in a text register?

mrichmon
October 13th, 2002, 12:55 PM
That is excellent.

And why am I not surprised that microsoft stores "RBG" values as "BGR"? Otherwise in the words of Darth Vader it would be "all too easy". :cool:

ombre42
October 13th, 2002, 12:55 PM
like I really know what I'm talking about, but I wouldn't blame MS for BGR instead of RGB-Intel processors use big(OOPS - I mean little) endian hex ordering-MS just does it to not waste CPU cycles (the registry is full of hex values that seem backwords if you don't know about big endian).
"In Little Endian byte ordering, the least significant byte is stored first. For example, the decimal number 1,000 would be stored as 0xE803 and the decimal number 100,000 would be stored as 0xA0860100"

Kevin

_________________
Girder rulez! What can't it do?
**I use X-10 Univ.Remote(UR47A) and PC Rcv.(MR26a)via Gen. Serial Plg. under WinXP

<font size=-1>[ This Message was edited by: ombre42 on 2002-01-18 13:08 ]</font>

<font size=-1>[ This Message was edited by: ombre42 on 2002-01-18 13:09 ]</font>

ombre42
October 13th, 2002, 12:55 PM
RonB you should smack me, yes little endian.
After dealing with the diff between the two I'm glad the Microcomputer class I took was based on a Motorola processor, I hate little endian.

bsa
October 13th, 2002, 12:55 PM
Mark,

This is great! Can you add an option to popup a register so that we can combine time2reg with the new popup?

Thanks,
Brad

bsa
October 13th, 2002, 12:55 PM
Ooops!

I just read another post about using '[tregX]' inside the text message to display a register. So, time2reg register "1" and OSD Popup message of '[treg1]' gets me what I need.

Thanks again,
Brad