| | #1 (permalink) |
| Retired Team Member Join Date: Jan 2007
Posts: 72
Thanks: 1
Thanked 1 Time in 1 Post
Country: | Hi guys, has anyone got a MP-skin usable for a touchscreen? I've got a Zalman HD160XT case which comes with a built-in touchscreen (secondary screen). I have a little app running that mirrors the display of the primary screen on the touchscreen (stretchblit) and which forwards mouse clicks on the touchscreen into mouse down/up onto the primary screen. But, the default MP-skin is NOT usable with a touchscreen. For example, when I click a button on the home screen, the menu starts to scroll like crazy... Regards dero |
| | |
| | #2 (permalink) |
| Portal Member Join Date: Jan 2006
Posts: 136
Thanks: 1
Thanked 2 Times in 2 Posts
| Hi dero! As far as I know there is no special touch-screen skin for MP. But I remember some people using the standard blue two but with home interface instead of the normal interface. But still there's nothing like volume-buttons etc. As to stretchblit: Does this program really clone your primary display to your secondary display without messing up your DirectX acceleration on the primary display? I've been looking for something like that a long time... thanks, Michael |
| | |
| | #3 (permalink) | ||
| Retired Team Member Join Date: Jan 2007
Posts: 72
Thanks: 1
Thanked 1 Time in 1 Post
Country: | Hi MJ, Quote:
Quote:
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;
dero | ||
| | |
| | #4 (permalink) |
| Portal Member Join Date: Jan 2006
Posts: 136
Thanks: 1
Thanked 2 Times in 2 Posts
| Hi dero! Thanks a lot! This sounds really cool! Unfortunately I won't have the time to do some coding at least for the next two or three weeks. But after that, I'll definately give it a try. (Shouldn't be too hard to translate this into c++ as I have no clue of Delphi at all...) Thanks again, Michael PS: I wouldn't complain if you were the one to start a touch screen skin ;-) Anyways, there are many discussions atm (or should I say rumors of discussions ;-) )about MP NG (new generation) and I guess they will implement this fancy new skinning language (WPF if I don't mix it up with some fancy other MS-abbreviation...) perhaps you should therefore head for this (new) type of skin. Would be a shame if your skin was outdated only a few weeks / months after you finished it... |
| | |
| | #5 (permalink) | ||
| Retired Team Member Join Date: Jan 2007
Posts: 72
Thanks: 1
Thanked 1 Time in 1 Post
Country: | Quote:
Quote:
Regards dero | ||
| | |
![]() |
| Bookmarks |
| Tags |
| skin, touchscreen |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MP with Touchscreen | Hivanoe | Improvement Suggestions | 4 | 2007-12-18 13:51 |
| Touchscreen Skin | smithft | Skins | 11 | 2006-01-22 12:48 |
| ProjectX skin with touchscreen. How to use fullscreen TV? | tommer | Skins | 4 | 2005-08-02 09:06 |
| HTPC with Touchscreen? | hwahrmann | HTPC Projects | 5 | 2005-06-21 13:33 |
| Touchscreen compatable | Anonymous | Improvement Suggestions | 3 | 2004-07-25 00:48 |