As title...
Respectly,
emarti
How to prevent mouse & key events for wxSplashScreen? Topic is solved
-
- Filthy Rich wx Solver
- Posts: 210
- Joined: Sat May 07, 2005 8:24 pm
- Location: Eskisehir, TURKEY
- Contact:
How to prevent mouse & key events for wxSplashScreen?
- T U R K E Y ?
- I love this country!
WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
- I love this country!
WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
-
- Filthy Rich wx Solver
- Posts: 210
- Joined: Sat May 07, 2005 8:24 pm
- Location: Eskisehir, TURKEY
- Contact:
Hi,
I wanna do that....
My project is using wxSplashScreen & wxMediaCtrl. After splash screen displayed & media file played, I wanna created wxFrame.
I create wxFrame in EVT_MEDIA_FINISHED not wxApp::OnInit(void). Everything is OK but while application starting, when I click on splash screen (or press any key), project halts.
In wxSplashScreen,I wanna prevent key & mouse events. How to do? I can do it without using wxSplashScreen ( but I have to use it. )
I wanna do that....
My project is using wxSplashScreen & wxMediaCtrl. After splash screen displayed & media file played, I wanna created wxFrame.
I create wxFrame in EVT_MEDIA_FINISHED not wxApp::OnInit(void). Everything is OK but while application starting, when I click on splash screen (or press any key), project halts.
In wxSplashScreen,I wanna prevent key & mouse events. How to do? I can do it without using wxSplashScreen ( but I have to use it. )
- T U R K E Y ?
- I love this country!
WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
- I love this country!
WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
- Ryan Norton
- wxWorld Domination!
- Posts: 1319
- Joined: Mon Aug 30, 2004 6:01 pm
Try stealing events from the wxSplashScreen by directly Connect() to it.
The key here is in src/generic/splash.cpp
Just prevent that via
where
it is kind of nefarious but it'll probably work :D:D
The key here is in src/generic/splash.cpp
Code: Select all
void wxSplashScreenWindow::OnMouseEvent(wxMouseEvent& event)
{
if (event.LeftDown() || event.RightDown())
GetParent()->Close(true);
}
Code: Select all
mysplash->Connect(-1, wxEVT_LEFT_DOWN,
wxMouseEventHandler(wxMySplash::OnMouse));
mysplash->Connect(-1, wxEVT_RIGHT_DOWN,
wxMouseEventHandler(wxMySplash::OnMouse));
Code: Select all
void wxMySplash::OnMouse(wxMouseEvent& e)
{
}
[Mostly retired moderator, still check in to clean up some stuff]
Hi,
As someone suggest me a few time ago...
You may perhaps use:
int wxApp::FilterEvent(wxEvent& event)
http://www.wxwidgets.org/manuals/2.6.3/ ... ilterevent
Bye...
As someone suggest me a few time ago...
You may perhaps use:
int wxApp::FilterEvent(wxEvent& event)
http://www.wxwidgets.org/manuals/2.6.3/ ... ilterevent
Bye...
-
- Filthy Rich wx Solver
- Posts: 210
- Joined: Sat May 07, 2005 8:24 pm
- Location: Eskisehir, TURKEY
- Contact:
In wxWidgets source ($WXWIN\include\generic\splash.h & $WXWIN\src\generic\splash.cpp), when I removed or remarked lines that releationship key & mouse events, it is OK!. Of course, you have to build wxWidgets library again. But this way is not legal, I think. Is it legal?
In fact, if I select this way, the problem occurs to compile & share source code.
In fact, if I select this way, the problem occurs to compile & share source code.
- T U R K E Y ?
- I love this country!
WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
- I love this country!
WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/