[osg-users] Problem with fullscreen hiding dialog window
Hi, I run my osg program in fullscreen mode by setting traits width height to the same as desktop, x and y position to 0 and disabling window decoration. This prevents my windows file input dialog to show (it opens behind the osg window and I need to alt+tab to it). It shows at top level when running in a smaller osg window that doesn't cover the the whole desktop. Can I set the osg window options to have full screen specifications without the program going into fullscreen mode? Just having the window floating on top. I use http://msdn.microsoft.com/en-us/library/windows/desktop/bb776913%28v=vs.85%29.aspx to open the file dialog on Windows 7 x64 and OSG version 3.1.3. Maybe there are better approaches to do this? Thank you! Cheers, David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53075#53075 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with fullscreen hiding dialog window
There should be a flag for your Dialog to set it always on top or something like this Nick On Wed, Mar 13, 2013 at 11:19 AM, David Sellin davse...@student.liu.sewrote: Hi, I run my osg program in fullscreen mode by setting traits width height to the same as desktop, x and y position to 0 and disabling window decoration. This prevents my windows file input dialog to show (it opens behind the osg window and I need to alt+tab to it). It shows at top level when running in a smaller osg window that doesn't cover the the whole desktop. Can I set the osg window options to have full screen specifications without the program going into fullscreen mode? Just having the window floating on top. I use http://msdn.microsoft.com/en-us/library/windows/desktop/bb776913%28v=vs.85%29.aspxto open the file dialog on Windows 7 x64 and OSG version 3.1.3. Maybe there are better approaches to do this? Thank you! Cheers, David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53075#53075 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with fullscreen hiding dialog window
It doesn't seem to be a flag for that, not that I can see. But I don't have any experince of the windows api. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53080#53080 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with fullscreen hiding dialog window
What do you use for your Dialog code? Can you pass the code snippet of the dialog creation? On Wed, Mar 13, 2013 at 3:17 PM, David Sellin davse...@student.liu.sewrote: It doesn't seem to be a flag for that, not that I can see. But I don't have any experince of the windows api. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53080#53080 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with fullscreen hiding dialog window
Here's the code which is basically the same as in the link in my initial post, slightly modified. Code: // Indices of file types #define INDEX_COLLADA 1 #define INDEX_OPENSCENEGRAPH 2 #define INDEX_KEYHOLEMARKUPLANGUAGE 3 #define INDEX_ALLFILES 4 #define FILE_TYPE_MODELS 1 #define FILE_TYPE_IMAGES 2 #define FILE_TYPE_TERRAFORM 3 class CDialogEventHandler : public IFileDialogEvents, public IFileDialogControlEvents { public: // IUnknown methods IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) { static const QITAB qit[] = { QITABENT(CDialogEventHandler, IFileDialogEvents), QITABENT(CDialogEventHandler, IFileDialogControlEvents), { 0 }, }; return QISearch(this, qit, riid, ppv); } IFACEMETHODIMP_(ULONG) AddRef() { return InterlockedIncrement(_cRef); } IFACEMETHODIMP_(ULONG) Release() { long cRef = InterlockedDecrement(_cRef); if (!cRef) delete this; return cRef; } // IFileDialogEvents methods IFACEMETHODIMP OnFileOk(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnFolderChange(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnFolderChanging(IFileDialog *, IShellItem *) { return S_OK; }; IFACEMETHODIMP OnHelp(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnSelectionChange(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnShareViolation(IFileDialog *, IShellItem *, FDE_SHAREVIOLATION_RESPONSE *) { return S_OK; }; IFACEMETHODIMP OnTypeChange(IFileDialog *pfd) { return S_OK; }; IFACEMETHODIMP OnOverwrite(IFileDialog *, IShellItem *, FDE_OVERWRITE_RESPONSE *) { return S_OK; }; // IFileDialogControlEvents methods IFACEMETHODIMP OnItemSelected(IFileDialogCustomize *pfdc, DWORD dwIDCtl, DWORD dwIDItem) { return S_OK; }; IFACEMETHODIMP OnButtonClicked(IFileDialogCustomize *, DWORD) { return S_OK; }; IFACEMETHODIMP OnCheckButtonToggled(IFileDialogCustomize *, DWORD, BOOL) { return S_OK; }; IFACEMETHODIMP OnControlActivating(IFileDialogCustomize *, DWORD) { return S_OK; }; CDialogEventHandler() : _cRef(1) { }; private: ~CDialogEventHandler() { }; long _cRef; }; // Instance creation helper HRESULT CDialogEventHandler_CreateInstance(REFIID riid, void **ppv) { *ppv = NULL; CDialogEventHandler *pDialogEventHandler = new (std::nothrow) CDialogEventHandler(); HRESULT hr = pDialogEventHandler ? S_OK : E_OUTOFMEMORY; if (SUCCEEDED(hr)) { hr = pDialogEventHandler-QueryInterface(riid, ppv); pDialogEventHandler-Release(); } return hr; } HRESULT basicFileOpen(std::wstring foundPath, int fileTypes ) { // CoCreate the File Open Dialog object. IFileDialog *pfd = NULL; HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(pfd)); pfd-SetTitle( LUrban Explorer - Open ); const COMDLG_FILTERSPEC modelSaveTypes[] = { {LCOLLADA (*.dae), L*.dae}, {LOpenSceneGraph (*.osg; *.osgb), L*.osg;*.osgb}, {LKeyhole Markup Language (*.kmz), L*.kmz}, {LAll Files (*.*), L*.*} }; const COMDLG_FILTERSPEC imageSaveTypes[] = { {LPNG (*.png), L*.png}, {LJPG (*.jpg), L*.jpg}, {LAll Files (*.*), L*.*} }; const COMDLG_FILTERSPEC terraformSaveTypes[] = { {LTFI (*.terraformImage), L*.terraformImage}, {LAll Files (*.*), L*.*} }; if (SUCCEEDED(hr)) { // Create an event handling object, and hook it up to the dialog. IFileDialogEvents *pfde = NULL; hr = CDialogEventHandler_CreateInstance(IID_PPV_ARGS(pfde)); if (SUCCEEDED(hr)) { // Hook up the event handler. DWORD dwCookie; hr = pfd-Advise(pfde, dwCookie); if (SUCCEEDED(hr))
Re: [osg-users] Problem with fullscreen hiding dialog window
Something like this somewhere on your code http://www.codeguru.com/cpp/w-d/dislog/article.php/c1857/Making-a-Window-Always-On-Top.htm Look for HWND_TOPMOST in MSDN On Wed, Mar 13, 2013 at 3:45 PM, David Sellin davse...@student.liu.sewrote: Here's the code which is basically the same as in the link in my initial post, slightly modified. Code: // Indices of file types #define INDEX_COLLADA 1 #define INDEX_OPENSCENEGRAPH 2 #define INDEX_KEYHOLEMARKUPLANGUAGE 3 #define INDEX_ALLFILES 4 #define FILE_TYPE_MODELS 1 #define FILE_TYPE_IMAGES 2 #define FILE_TYPE_TERRAFORM 3 class CDialogEventHandler : public IFileDialogEvents, public IFileDialogControlEvents { public: // IUnknown methods IFACEMETHODIMP QueryInterface(REFIID riid, void** ppv) { static const QITAB qit[] = { QITABENT(CDialogEventHandler, IFileDialogEvents), QITABENT(CDialogEventHandler, IFileDialogControlEvents), { 0 }, }; return QISearch(this, qit, riid, ppv); } IFACEMETHODIMP_(ULONG) AddRef() { return InterlockedIncrement(_cRef); } IFACEMETHODIMP_(ULONG) Release() { long cRef = InterlockedDecrement(_cRef); if (!cRef) delete this; return cRef; } // IFileDialogEvents methods IFACEMETHODIMP OnFileOk(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnFolderChange(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnFolderChanging(IFileDialog *, IShellItem *) { return S_OK; }; IFACEMETHODIMP OnHelp(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnSelectionChange(IFileDialog *) { return S_OK; }; IFACEMETHODIMP OnShareViolation(IFileDialog *, IShellItem *, FDE_SHAREVIOLATION_RESPONSE *) { return S_OK; }; IFACEMETHODIMP OnTypeChange(IFileDialog *pfd) { return S_OK; }; IFACEMETHODIMP OnOverwrite(IFileDialog *, IShellItem *, FDE_OVERWRITE_RESPONSE *) { return S_OK; }; // IFileDialogControlEvents methods IFACEMETHODIMP OnItemSelected(IFileDialogCustomize *pfdc, DWORD dwIDCtl, DWORD dwIDItem) { return S_OK; }; IFACEMETHODIMP OnButtonClicked(IFileDialogCustomize *, DWORD) { return S_OK; }; IFACEMETHODIMP OnCheckButtonToggled(IFileDialogCustomize *, DWORD, BOOL) { return S_OK; }; IFACEMETHODIMP OnControlActivating(IFileDialogCustomize *, DWORD) { return S_OK; }; CDialogEventHandler() : _cRef(1) { }; private: ~CDialogEventHandler() { }; long _cRef; }; // Instance creation helper HRESULT CDialogEventHandler_CreateInstance(REFIID riid, void **ppv) { *ppv = NULL; CDialogEventHandler *pDialogEventHandler = new (std::nothrow) CDialogEventHandler(); HRESULT hr = pDialogEventHandler ? S_OK : E_OUTOFMEMORY; if (SUCCEEDED(hr)) { hr = pDialogEventHandler-QueryInterface(riid, ppv); pDialogEventHandler-Release(); } return hr; } HRESULT basicFileOpen(std::wstring foundPath, int fileTypes ) { // CoCreate the File Open Dialog object. IFileDialog *pfd = NULL; HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(pfd)); pfd-SetTitle( LUrban Explorer - Open ); const COMDLG_FILTERSPEC modelSaveTypes[] = { {LCOLLADA (*.dae), L*.dae}, {LOpenSceneGraph (*.osg; *.osgb), L*.osg;*.osgb}, {LKeyhole Markup Language (*.kmz), L*.kmz}, {LAll Files (*.*), L*.*} }; const COMDLG_FILTERSPEC imageSaveTypes[] = { {LPNG (*.png), L*.png}, {LJPG (*.jpg), L*.jpg}, {LAll Files (*.*), L*.*} }; const COMDLG_FILTERSPEC terraformSaveTypes[] = { {LTFI (*.terraformImage), L*.terraformImage}, {LAll Files (*.*), L*.*} }; if (SUCCEEDED(hr)) { // Create an event handling object, and hook it up to the dialog. IFileDialogEvents *pfde = NULL; hr = CDialogEventHandler_CreateInstance(IID_PPV_ARGS(pfde));
[osg-users] problem with fullscreen
Hi, i have a little problem if i turn on the fullscreen on : if i click inside the viewer window my app loose the focus , and it happens in any osg app including the demos any help is welcome thanks and good day -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36150#36150 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org