Aktuelle Zeit: 14.05.2024, 12:23

Alle Zeiten sind UTC + 1 Stunde




Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: Unterschied ?
BeitragVerfasst: 26.12.2010, 11:51 
Offline

Registriert: 14.09.2010, 15:29
Beiträge: 11
Wo ist der Unterschied zwischen
IrrlichtDevice::isWindowsActive()
und
IrrlichtDeivice::isWindowFocused()
?

MFG Thalhammer


Nach oben
 Profil  
 
 Betreff des Beitrags: Re: Unterschied ?
BeitragVerfasst: 26.12.2010, 19:43 
Offline
Benutzeravatar

Registriert: 17.04.2007, 08:42
Beiträge: 460
Wohnort: Willich, NRW
IrrlichtDevice::isWindowsActive()

Code:
bool CIrrDeviceWin32::isWindowActive() const
{
   _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
   return (GetActiveWindow() == HWnd);
}


Zitat:
Link: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

The return value is the handle to the active window attached to the calling thread's message queue. Otherwise, the return value is NULL. A system has only one active window, which GetForegroundWindow() returns. GetActiveWindow() seems to return the same window as GetForegroundWindow() if the foreground window belongs to the current thread. Otherwise, it always returns null, rather than the topmost window of the calling thread.


IrrlichtDeivice::isWindowFocused()

Code:
//! returns if window has focus
bool CIrrDeviceWin32::isWindowFocused() const
{
   bool ret = (GetFocus() == HWnd);
   _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
   return ret;
}


Zitat:
Link: http://msdn.microsoft.com/en-us/library ... 85%29.aspx

The return value is the handle to the window with the keyboard focus. If the calling thread's message queue does not have an associated window with the keyboard focus, the return value is NULL. GetFocus returns the window with the keyboard focus for the current thread's message queue. If GetFocus returns NULL, another thread's queue may be attached to a window that has the keyboard focus.


Hab noch nie drüber nachgedacht, meine Deutung:

isWindowActive -> true falls selektiert (aktiv) sonst false
isWindowFocused -> true falls der Keyboardfocus auch wirklich auf dem Window liegt sonst false

Vllt verstehst du ja mehr in der Doku (Link in den quotes) als in meine Worten ;)

_________________
Bild

Irrlicht - From Noob To Pro A Guideline

--

Sonstige Projekte, Blog : http://www.rpdev.net


Nach oben
 Profil  
 
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 2 Beiträge ] 

Alle Zeiten sind UTC + 1 Stunde


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 5 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
cron
Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de