Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OnScreenDisplay and rounded corners
#1
Exasperating Question of the Day (EQD):

is there a way to have the OnScreenDisplay show with rounded corners?

thanks.

Ken
An old blog on QM coding and automation.

The Macro Hook
#2
Modify OSD_WndProc:

After
Code:
Copy      Help
,else SetWindowPos hWnd 0 rt.left rt.top wid hei SWP_NOACTIVATE|SWP_NOZORDER|SWP_SHOWWINDOW

Insert
Code:
Copy      Help
,SetWindowRgn hWnd CreateRoundRectRgn(1 1 wid-2 hei-2 10 10) 1

If need edge, modify OSD_Paint:

After
Code:
Copy      Help
if(v.flags&1) r.left+3

Insert
Code:
Copy      Help
int r2=CreateRoundRectRgn(0 0 r.right-1 r.bottom-1 10 10)
FrameRgn hdc r2 GetStockObject(BLACK_BRUSH) 1 1
DeleteObject r2
_____________

Example
Code:
Copy      Help
OnScreenDisplay " rounded corners " 0 0 0 0 0 0 5
#3
wow this works great!
i made just a couple of adjustments to get the text squared up...

Code:
Copy      Help
,SetWindowRgn hWnd CreateRoundRectRgn(1 1 wid hei 10 10) 1

and here in the paint function.
Code:
Copy      Help
int r2=CreateRoundRectRgn(0 0 r.right+1 r.bottom+1 10 10)


thanks!!!
An old blog on QM coding and automation.

The Macro Hook
#4
Great job guys!
Stuart
#5
I think something has changed here. I'm trying to get this to work again (as I have a really nice background gradient that I use on OSDs) but I don't see where the OSD is calling osd_wndproc anymore.

is this still possible to do?

thanks.
An old blog on QM coding and automation.

The Macro Hook
#6
These parts of code are the same. One is in OSD_WndProc, other in OSD_Paint. I tested, still works.
#7
I guess where i'm loosing it is in creating an OnScreenDislay_Rd function that will allow me to do both. That way when I update/grade QM I won't have to modify the system files again. so to do that would I do the following.

copy OnScreenDislay to OnScreenDislay_Rd
copy OSD_Main to OSD_Main_Rd
copy OSD_WndProc to OSD_WndProc_Rd

and change the references for each?
An old blog on QM coding and automation.

The Macro Hook
#8
OnScreenDisplay, OSD_Main, OSD_WndProc, OSD_Paint.
#9
yep....works great. i think it wouldn't show cuz in the process i used the old OSD which remapped the type OSD var and had to restart QM.

thanks!!
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)