SDL 2.0 windows 8 turn off alt+enter fullscreen - windows-8

I'm writing a game based on SDL 2.0 with OpenGL render. I need custom handling of fullscreen mode, but alt+enter on Windows 8 lead to forced fullscreen mode.
How can I turn off automatic turning on fullscreen mode via alt+enter on Windows 8?
How can I avoid toggling fullscreen mode via alt+enter on Windows 8 in general, not only using SDL 2.0?

I have realised that via Direct3D I can do what I need:
IDXGIDevice * pDXGIDevice;
g_d3dDevice->QueryInterface(__uuidof(IDXGIDevice), (void**)&pDXGIDevice);
IDXGIAdapter * pDXGIAdapter;
pDXGIDevice->GetParent(__uuidof(IDXGIAdapter), (void **)&pDXGIAdapter);
IDXGIFactory * pIDXGIFactory;
pDXGIAdapter->GetParent(__uuidof(IDXGIFactory), (void **)&pIDXGIFactory);
pIDXGIFactory->MakeWindowAssociation(g_hWnd, DXGI_MWA_NO_ALT_ENTER);
Now I want to figure out how to get IDXGIFactory* in OpenGL code.
I tried to create new factory, enumerate adapters, but all adapters give me newly created factory which can't change any windowAssociations...

Related

UWP transparent window

I realize something like this has been asked before, but I would like to create an app with UI elements atop a transparent window (basically, an app without a window frame and with transparent background).
I've read the following posts:
transparent app in windows 10 uwp
Transparent UWP windows 10
I checked the BlurPlayground.
It seems that this isn't possible. However, the Sticky Notes application in Windows 10 is definitely managing to do this. Either this is some special API only available to Microsoft, or it can be done.
Can someone confirm?
This cannot be done in UWP today. The custom frame you see in Sticky Notes is a one-off implementation that does not have a public API.
Curious what is your scenario you want to accomplish here? (feel free to ping me offline - swick [at] Microsoft.com)
Thanks,
Stefan Wick - Windows Developer Platform

Activating touch-enabled controls in JavaFX

I want to use the touch-enabled controls described in http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm. I'm building my application on a Windows 8 tablet, but the ScrollPanes are desktop-style, i.e. with scrollbars and no reaction to finger-dragging. How do I tell JavaFX that I'm on a mobile platform?
Edit: I just realized that the standard, desktop-style ScrollPane does react to finger-dragging, but it doesn't look like the example one in the link above.
Solution: the features can be enabled by setting -Dcom.sun.javafx.isEmbedded=true and -Dcom.sun.javafx.touch=true
There should not be a need to enable these capabilities, but JavaFX decides by itself if they are supported. You can query the capabilities programmatically, e.g. by PlatformImpl.isSupported(ConditionalFeature.INPUT_TOUCH).

Live Streaming on WindowsPhone8

I am developing wp8 app,In that i need to play live-streaming of video.Can any one give samples or tutorials to play live streaming on wp8 app.
I followed below link but its not working
https://playerframework.codeplex.com/wikipage?title=Getting%20Started:%20WP8%20Smooth%20Streaming%20Player
Regards
chandu
You have plenty of options:
Option 1: Here is a good tutorial that explains how to implement video streaming using the Smooth Streaming Client SDK: http://mingfeiy.com/building-windows-store-apps-smooth-streaming-client-sdk-beta-2
Option 2: Another approach is to use the Player Framework for Windows 8 Metro Style Applications To summarize, this is an open source, robust video player framework for Windows 8, HTML5, Silverlight, Windows Phone and other application platforms.
Find it here: http://www.geekchamp.com/marketplace/components/media-platform-player-framework
Option 3: A Simple Windows 8 Smooth Streaming Media Player with a Slider Bar Control as in here : http://code.msdn.microsoft.com/windowsapps/A-simple-Windows-8-Smooth-ee98f63a
To summarize: This sample shows how to use Smooth Streaming Client SDK for Windows 8 to create a Windows Store application to playback Smooth Streaming content. In the sample, the MediaElement control is used to show the media content, and a slider bar control is used to control the progress. That`s is from me, just pick one of the options and you are ready to go.

Force WinRT app to snapped view

For one of my apps I'd like to send the app to snapped view after tapping a button. As far as I know there's no public API available to send a running application to snapped view. Did anyone find a workaround to do this?
Somehow it should be possible since you're able to do it in Windows 8 itself, and snap one of the running apps.
Update: Being able to trigger a Win+. might do the same trick, but the SendKeys API isn't available in WinRT either.
There is no way to force an application into snapped mode - it has to be a user initiated action.
An application can request to be unsnapped through:
Windows.UI.ViewManagement.ApplicationView.TryUnsnap();
Which tries to push the app into fill mode.
Windows 10 has a ApplicationView.TryResizeView method
So... to summarize the interesting WinRT journey:
Windows 8
Has a a 'Snapped' mode that a only a user can initiate. the developer can try to unsnap with the TryUnsnap method
Windows 8.1
Does not have Snapped mode, and TryUnsnap is deprecated. The dev can still listen for window size changes and know if the app view is in a smaller size as before.
Windows 10
Introduced the ApplicationView.TryResizeView method, where the dev can try to resize. Window size changed event is still there.
ApplicationView.GetForCurrentView().TryResizeView(new size(width, height)));

is there something like a hubtile (WP7) in win 8 metro style?

i want to port one of my windows phone 7 apps to the windows 8 metro style plattform.
the problem is, that i need a element like the hubtile which i use from the silverlight toolkit for windows phone.
is there something equal in the windows 8 metro style platform? maybe open source like the silverlight toolkit.
i dont want to add the livetile outside my app, this is easy. i want to have something like hubtile for WP7 for win8. This means a tile which is inside my application.
If I'm right I'm planning to do the same task. I didn't find any reference of a control which performs like a HubTile. Thus, I decided importing the one from the Silverlight Toolkit (for Windows Phone). Luckily it worked almost smoothly, you can see my sample at:
https://github.com/hmadrigal/playground-dotnet/tree/master/MsWinPhone.EmbedFont (tested on Windows 8 RP and Visual Studio 2012 RC)
Kind regards,
Herber
you can work with the live tiles of course and in several ways. You can use badge notifications, toast notifications, and so on.
I'll suggest you to take a look to this documentation.
And also take a look to those two samples: App tiles and badge sample and Push and periodic notifications client-side sample
By the way don't forget to enable the features you need in the package manifest.