home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Skins
Touchscreen skin
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="dero" data-source="post: 126981" data-attributes="member: 29291"><p>Hi MJ,</p><p></p><p></p><p></p><p>Then maybe someone should design such a skin... I am quite new to MP, but perhaps I give it a try.</p><p></p><p></p><p></p><p>I don't know whether it messes up DirectX acceleration. However, I cannot see any difference. But, it flickers a little bit when you have running something in non-fullscreen (i.e. in the little box at the lower left).</p><p></p><p>How to do it:</p><p></p><p>You get the DesktopDC using CreateDC('DISPLAY', nil, nil, nil). You bitblt the contents to an offscreen bitmap. You stretchblt this offscreen bitmap to another offscreen bitmap. You blit the result to your window or you get the DesktopDC again and blit directly into the second display. Delphi-Code:</p><p></p><p>[CODE] </p><p> sw := Screen.Monitors[0].Width;</p><p> sh := Screen.Monitors[0].Height;</p><p></p><p> if ScreenBuffer = nil then</p><p> begin</p><p> ScreenBuffer := TBitmap.Create;</p><p> ScreenBuffer.Width := sw;</p><p> ScreenBuffer.Height := sh;</p><p> end;</p><p></p><p> if DisplayBuffer = nil then</p><p> DisplayBuffer := TBitmap.Create;</p><p></p><p> DisplayBuffer.Width := pbDisplay.ClientWidth;</p><p> DisplayBuffer.Height := pbDisplay.ClientHeight;</p><p></p><p> ScreenBuffer.Canvas.Lock;</p><p> DisplayBuffer.Canvas.Lock;</p><p></p><p> // scr -> buf</p><p> DesktopDC := CreateDC('DISPLAY', nil, nil, nil);</p><p> try</p><p> BitBlt( ScreenBuffer.Canvas.Handle, 0, 0, ScreenBuffer.Width, ScreenBuffer.Height, DesktopDC, 0, 0, SRCCOPY );</p><p> finally</p><p> DeleteDC( DesktopDC );</p><p> end;</p><p></p><p> // buf -> dbuf</p><p> PDC := DisplayBuffer.Canvas.Handle;</p><p> if setDisplayHighQuality then SetStretchBltMode( PDC, STRETCH_HALFTONE )</p><p> else SetStretchBltMode( PDC, STRETCH_DELETESCANS );</p><p></p><p> StretchBlt( PDC, 0, 0, pbDisplay.ClientWidth, pbDisplay.ClientHeight, ScreenBuffer.Canvas.Handle,</p><p> 0, 0, sw, sh, SRCCOPY );</p><p></p><p> // dbuf -> scr</p><p> ul := pbDisplay.ClientToScreen( Point( 0, 0 ) );</p><p></p><p> PDC := CreateDC('DISPLAY', nil, nil, nil);</p><p> try</p><p> BitBlt( PDC, ul.X, ul.Y, pbDisplay.ClientWidth, pbDisplay.ClientHeight, DisplayBuffer.Canvas.Handle,</p><p> 0, 0, SRCCOPY );</p><p> finally</p><p> DeleteDC( PDC );</p><p> end;</p><p></p><p> DisplayBuffer.Canvas.Unlock;</p><p> ScreenBuffer.Canvas.Unlock;</p><p></p><p>[/CODE]</p><p></p><p>Regards,</p><p></p><p>dero</p></blockquote><p></p>
[QUOTE="dero, post: 126981, member: 29291"] Hi MJ, Then maybe someone should design such a skin... I am quite new to MP, but perhaps I give it a try. I don't know whether it messes up DirectX acceleration. However, I cannot see any difference. But, it flickers a little bit when you have running something in non-fullscreen (i.e. in the little box at the lower left). How to do it: You get the DesktopDC using CreateDC('DISPLAY', nil, nil, nil). You bitblt the contents to an offscreen bitmap. You stretchblt this offscreen bitmap to another offscreen bitmap. You blit the result to your window or you get the DesktopDC again and blit directly into the second display. Delphi-Code: [CODE] sw := Screen.Monitors[0].Width; sh := Screen.Monitors[0].Height; if ScreenBuffer = nil then begin ScreenBuffer := TBitmap.Create; ScreenBuffer.Width := sw; ScreenBuffer.Height := sh; end; if DisplayBuffer = nil then DisplayBuffer := TBitmap.Create; DisplayBuffer.Width := pbDisplay.ClientWidth; DisplayBuffer.Height := pbDisplay.ClientHeight; ScreenBuffer.Canvas.Lock; DisplayBuffer.Canvas.Lock; // scr -> buf DesktopDC := CreateDC('DISPLAY', nil, nil, nil); try BitBlt( ScreenBuffer.Canvas.Handle, 0, 0, ScreenBuffer.Width, ScreenBuffer.Height, DesktopDC, 0, 0, SRCCOPY ); finally DeleteDC( DesktopDC ); end; // buf -> dbuf PDC := DisplayBuffer.Canvas.Handle; if setDisplayHighQuality then SetStretchBltMode( PDC, STRETCH_HALFTONE ) else SetStretchBltMode( PDC, STRETCH_DELETESCANS ); StretchBlt( PDC, 0, 0, pbDisplay.ClientWidth, pbDisplay.ClientHeight, ScreenBuffer.Canvas.Handle, 0, 0, sw, sh, SRCCOPY ); // dbuf -> scr ul := pbDisplay.ClientToScreen( Point( 0, 0 ) ); PDC := CreateDC('DISPLAY', nil, nil, nil); try BitBlt( PDC, ul.X, ul.Y, pbDisplay.ClientWidth, pbDisplay.ClientHeight, DisplayBuffer.Canvas.Handle, 0, 0, SRCCOPY ); finally DeleteDC( PDC ); end; DisplayBuffer.Canvas.Unlock; ScreenBuffer.Canvas.Unlock; [/CODE] Regards, dero [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Skins
Touchscreen skin
Contact us
RSS
Top
Bottom