Page 1 of 1

Window Class DATA bTaskBar ?

Posted: Mon Jan 28, 2008 2:39 am
by nageswaragunupudi
Can any one enlighten me about the practical use of bTaskBar data in the Window Class please ?

Posted: Mon Jan 28, 2008 7:53 am
by Antonio Linares
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

	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;


Posted: Mon Jan 28, 2008 12:17 pm
by Silvio
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 ?