home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
x
/
xfeel.zip
/
XFEEL2.C
< prev
Wrap
Text File
|
1992-12-18
|
3KB
|
99 lines
/*-------------------------------------------------------------------------*/
/* */
/* XFEEL2.C : Compile this Module to XFEEL.DLL and place it in the */
/* LIBPATH. */
/* */
/* Version : V1.00 */
/* */
/* Date : 31.07.92 */
/* */
/* Copyright : Roman Fischer Markus Hof */
/* */
/* History:
28.10.92 MH Entfernen von Shared Segment
11.11.92 MH Spezialbehandlung fuer verschieden Windowklassen
*/
/*-------------------------------------------------------------------------*/
#define INCL_DOSPROCESS
#define INCL_WININPUT
#define INCL_WINWINDOWMGR
#define INCL_WINFRAMEMGR
#define INCL_DOSMEMMGR
#include <os2pm.h>
#include <stdio.h>
BOOL PASCAL XFUNC (HAB hab, PQMSG qmsg, USHORT msgf)
{
HWND active;
HWND w, wo;
HWND parent, desktop;
char classname[31];
/*-------------------------------------------------------------*/
/* Wenn Maus gecaptured tue ich nichts */
if (WinQueryCapture (HWND_DESKTOP, FALSE))
return (FALSE);
/*-------------------------------------------------------------*/
/* Ich behandle nur Nachrichten ueber Mausbewegungen */
if (qmsg->msg != WM_MOUSEMOVE)
return (FALSE);
/*-------------------------------------------------------------*/
/* Hole aktives Fenster. Breche ab, falls das aktive Fenster */
/* ein Frame ist und der Titel 'Window List' ist. In diesem */
/* Fall Ist die Tasklist aktiv, bei welcher ich nichts aendere.*/
active = WinQueryActiveWindow (HWND_DESKTOP, FALSE);
WinQueryClassName (active, 30, (PCH)classname);
if (classname[1]=='1')
{
WinQueryWindowText (active, 30, (PCH)classname);
if (!strcmp (classname, "Window List"))
return (FALSE);
}
/*-------------------------------------------------------------*/
/* Hole Informationen ueber das neue Fenster. */
desktop = WinQueryDesktopWindow (hab, NULL);
wo = w = qmsg->hwnd;
parent = WinQueryWindow (w, QW_PARENT, FALSE);
while (parent != desktop)
{
wo = w;
w = parent;
parent = WinQueryWindow (w, QW_PARENT, FALSE);
}
/*-------------------------------------------------------------*/
/* Wenn neues Window der Desktop ist, breche ab */
WinQueryWindowText (w, 30, (PCH)classname);
if (!strcmp (classname, "OS/2 2.0 Desktop"))
return (FALSE);
/*-------------------------------------------------------------*/
/* Falls neues ein Menu ist brich ab */
WinQueryClassName (wo, 30, (PCH)classname);
if (!strcmp (classname, "#4"))
return (FALSE);
/*-------------------------------------------------------------*/
/* Mache neues aktiv, wenn es nicht schon aktiv ist. */
if (w!=active)
WinSetFocus (HWND_DESKTOP, qmsg->hwnd);
return (FALSE);
}