Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gibt das WHANDLE-Fensterhandle des Fensters zurück, das momentan für Ausgaben der Benutzer ausgewählt ist.
WHANDLE _WGetPort(void any)
void any; /* Pointer. */
Beispiel
Im folgenden Beispiel wird das Fensterhandle angezeigt, das von _WGetPort( ) zurückgegeben wird, wenn der aktuelle Ausgabeanschluss (Port) geändert wird.
Visual FoxPro-Code
SET LIBRARY TO WGETPORT
C-Code
#include <pro_ext.h>
void putLong(long n, int width)
{
Value val;
val.ev_type = 'I';
val.ev_long = n;
val.ev_width = width;
_PutValue(&val);
}
FAR Example(ParamBlk FAR *parm)
{
WHANDLE wh;
WHANDLE oldPort;
wh = _WOpen(2,10,23,70,WEVENT | CLOSE,WINDOW_SCHEME,(Scheme FAR *)0,
WO_SYSTEMBORDER);
_WShow(wh);
_PutStr("\n1) _WGetPort() ="); putLong(_WGetPort(), 10);
oldPort = _WSetPort(wh);
_PutStr("\n2) _WSetPort(wh) ="); putLong(oldPort, 10);
_PutStr("\n3) _WGetPort() ="); putLong(_WGetPort(), 10);
oldPort = _WSetPort(oldPort);
_PutStr("\n4) _WSetPort(oldPort) ="); putLong(oldPort, 10);
_PutStr("\nShould be back where we started.");
}
FoxInfo myFoxInfo[] = {
{"ONLOAD", (FPFI) Example, CALLONLOAD, ""},
};
FoxTable _FoxTable = {
(FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};
Siehe auch
_WhToHwnd( ), API-Bibliotheksroutine | _WGetObjectClientWindow( ), API-Bibliotheksroutine | _GetObjectProperty( ), API-Bibliotheksroutine | GETOBJECT( )-Funktion