Window Class DATA bTaskBar ?

Window Class DATA bTaskBar ?

Postby nageswaragunupudi » Mon Jan 28, 2008 2:39 am

Can any one enlighten me about the practical use of bTaskBar data in the Window Class please ?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10656
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Antonio Linares » Mon Jan 28, 2008 7:53 am

Nageswararao,

Please review fwh\classes\TTray.prg

Basically it lets you response to the WM_TASKBAR windows msg. Here you have a C sample:
Code: Select all  Expand view  RUN
   case WM_TASKBAR:
      switch(lParam)
      {
      case WM_LBUTTONDBLCLK:
         systray_del(hwnd,IDI_ICON1);
         ShowWindow(hwnd, SW_RESTORE);
         SetForegroundWindow(hwnd);
         break;
      case WM_RBUTTONUP:
         hmenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_SYSTRAY));
         hmenu = GetSubMenu(hmenu,0);
         GetCursorPos(&p);
         SetForegroundWindow(hwnd);
         TrackPopupMenu(hmenu,TPM_LEFTALIGN|TPM_LEFTBUTTON|TPM_RIGHTBUTTON,p.x,p.y,0,hwnd,NULL);
         break;
      }
      return 0;

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Mon Jan 28, 2008 12:17 pm

Antonio,

This is an Idea :

It can be insert on windows class ....

DEFINE WINDOW oWnd FROM x,y to x,y ;
TITLE " test window" ;
MENUbuildmenu () ;
COLOR CLR_HGRAY,CLR_HGRAY ;
TRAY ;
MENUTRAY Buildmenutray() ;
TRAYICON icontray;
TRAYCLICK CLickfunc() ;
ICON ICONSYS;
TRAYNOSHOW

TRAY = .t. or .f

MENUTRAY is the menu of the tray

TRAY ICON is the icon

TRAYICLICK is on CLICK

TRAYNOSHOW = .t. ot .f.




Do you think about it ?

it ispossible to implement it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano and 29 guests