Posts: 1,769
Threads: 410
Joined: Feb 2003
Exasperating Question of the Day (EQD):
is there a way to have the OnScreenDisplay show with rounded corners?
thanks.
Ken
Posts: 12,097
Threads: 142
Joined: Dec 2002
Modify OSD_WndProc:
After
,else SetWindowPos hWnd 0 rt.left rt.top wid hei SWP_NOACTIVATE|SWP_NOZORDER|SWP_SHOWWINDOW
Insert
,SetWindowRgn hWnd CreateRoundRectRgn(1 1 wid-2 hei-2 10 10) 1
If need edge, modify OSD_Paint:
After
Insert
int r2=CreateRoundRectRgn(0 0 r.right-1 r.bottom-1 10 10)
FrameRgn hdc r2 GetStockObject(BLACK_BRUSH) 1 1
DeleteObject r2
_____________
Example
OnScreenDisplay " rounded corners " 0 0 0 0 0 0 5
Posts: 1,769
Threads: 410
Joined: Feb 2003
wow this works great!
i made just a couple of adjustments to get the text squared up...
,SetWindowRgn hWnd CreateRoundRectRgn(1 1 wid hei 10 10) 1
and here in the paint function.
int r2=CreateRoundRectRgn(0 0 r.right+1 r.bottom+1 10 10)
thanks!!!
Posts: 1,006
Threads: 330
Joined: Mar 2007
Posts: 1,769
Threads: 410
Joined: Feb 2003
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.
Posts: 12,097
Threads: 142
Joined: Dec 2002
These parts of code are the same. One is in OSD_WndProc, other in OSD_Paint. I tested, still works.
Posts: 1,769
Threads: 410
Joined: Feb 2003
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?
Posts: 12,097
Threads: 142
Joined: Dec 2002
OnScreenDisplay, OSD_Main, OSD_WndProc, OSD_Paint.
Posts: 1,769
Threads: 410
Joined: Feb 2003
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!!