Ignore:
Timestamp:
May 26, 2000, 8:43:35 PM (25 years ago)
Author:
sandervl
Message:

Tasklist fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/oslibwin.cpp

    r3581 r3610  
    1 /* $Id: oslibwin.cpp,v 1.77 2000-05-20 14:57:19 sandervl Exp $ */
     1/* $Id: oslibwin.cpp,v 1.78 2000-05-26 18:43:34 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    1313#define  INCL_WIN
    1414#define  INCL_PM
     15#define  INCL_WINSWITCHLIST
    1516#include <os2wrap.h>
    1617#include <stdlib.h>
     
    8485  if(fTaskList)
    8586  {
    86     dwFrameStyle |= FCF_TASKLIST | FCF_NOMOVEWITHOWNER;
     87        dwFrameStyle |= FCF_NOMOVEWITHOWNER;
    8788  }
    8889  if (fShellPosition) dwFrameStyle |= FCF_SHELLPOSITION;
     
    955956//******************************************************************************
    956957//******************************************************************************
     958BOOL OSLibWinRemoveFromTasklist(HANDLE hTaskList)
     959{
     960  return (WinRemoveSwitchEntry(hTaskList)) ? FALSE : TRUE;
     961}
     962//******************************************************************************
     963//******************************************************************************
     964HANDLE OSLibWinAddToTaskList(HWND hwndFrame, char *title, BOOL fVisible)
     965{
     966 SWCNTRL swctrl;
     967 ULONG   tid;
     968
     969  swctrl.hwnd          = hwndFrame;
     970  swctrl.hwndIcon      = 0;
     971  swctrl.hprog         = 0;
     972  WinQueryWindowProcess(hwndFrame, (PPID)&swctrl.idProcess, (PTID)&tid);
     973  swctrl.idSession     = 0;
     974  swctrl.uchVisibility = (fVisible) ? SWL_VISIBLE : SWL_INVISIBLE;
     975  swctrl.fbJump        = SWL_JUMPABLE;
     976  swctrl.bProgType     = PROG_PM;
     977  if(title) {
     978        strncpy(swctrl.szSwtitle, title, MAXNAMEL+4);
     979  }
     980  else {
     981        swctrl.szSwtitle[0] = 0;
     982        swctrl.uchVisibility    = SWL_INVISIBLE;
     983  }
     984  return WinAddSwitchEntry(&swctrl);
     985}
     986//******************************************************************************
     987//******************************************************************************
     988BOOL OSLibWinChangeTaskList(HANDLE hTaskList, HWND hwndFrame, char *title, BOOL fVisible)
     989{
     990 SWCNTRL swctrl;
     991 ULONG   tid;
     992 
     993  swctrl.hwnd          = hwndFrame;
     994  swctrl.hwndIcon      = 0;
     995  swctrl.hprog         = 0;
     996  WinQueryWindowProcess(hwndFrame, (PPID)&swctrl.idProcess, (PTID)&tid);
     997  swctrl.idSession     = 0;
     998  swctrl.uchVisibility = (fVisible) ? SWL_VISIBLE : SWL_INVISIBLE;
     999  swctrl.fbJump        = SWL_JUMPABLE;
     1000  swctrl.bProgType     = PROG_PM;
     1001  if(title) {
     1002        strncpy(swctrl.szSwtitle, title, MAXNAMEL+4);
     1003  }
     1004  else {
     1005        swctrl.szSwtitle[0] = 0;
     1006        swctrl.uchVisibility    = SWL_INVISIBLE;
     1007  }
     1008  return (WinChangeSwitchEntry(hTaskList, &swctrl)) ? FALSE : TRUE;
     1009}
     1010//******************************************************************************
     1011//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.