all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* ebrowse problem
@ 2007-01-25 20:19 scianagoryczy
  0 siblings, 0 replies; 2+ messages in thread
From: scianagoryczy @ 2007-01-25 20:19 UTC (permalink / raw)
  To: help-gnu-emacs

hi!
I want to use ebrowse with emacs 21.4.1 but I have a problem with symbol completion function ( C-c b TAB ). I tried to find solution in the archives and rest of internet, I saw that in the past people had the same problem but I didn't find solution. What is the reason that ebrowse complete symbol function dosn't work ? It gives me Invalid function #<hash-table 'equal nil... How to fix it ?
My platform is Ubuntu and Emacs comes from its repositories. I also tried it with ntEmacs 21.3 but it's the same problem.
regards!
tomek

^ permalink raw reply	[flat|nested] 2+ messages in thread

* ebrowse problem
@ 2008-04-21 12:12 brianjiang
  0 siblings, 0 replies; 2+ messages in thread
From: brianjiang @ 2008-04-21 12:12 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 2780 bytes --]

Hi Emacs hacker,
 
I try ebrowse recently and I find in some cases it doesn't parse the
class members correctly. 
 
Here is an example (The source files are attached: MyBtnDlg.CPP and
MyBtnDlg.h):
 
It parses member of CAboutDlg incorrectly:
 
------------------------------------------------------------------------
----
class CAboutDlg:
 
<---------> AddButton                <---------> AddToCell
<---------> AddToCell                <---------> BEGIN_MESSAGE_MAP
<---------> BEGIN_MESSAGE_MAP        <---------> CAboutDlg
<---------> DECLARE_MESSAGE_MAP      <---------> DelButton
<---------> DelFromCell              <---------> DoDataExchange
<---------> HideAll                  <---------> OnActivate
<---------> OnButton4                <---------> OnButtonExtShort
<---------> OnButtonMinAll           <---------> OnButtonShowAll
<---------> OnButtonalignme          <---------> OnButtonminme
<---------> OnButtonshowalign        <---------> OnButtonshowalign2
<---------> OnCHECKCellMode          <---------> OnCHECKHideDeact
<---------> OnCHECKPutty             <---------> OnCreate
<---------> OnDestroy                <---------> OnHotKey
<---------> OnLButtonDblClk          <---------> OnLButtonDown
<---------> OnLButtonUp              <---------> OnMBtnDown
<---------> OnMENUITEMAddButton      <---------> OnMENUITEMAlignButtons
<---------> OnMENUITEMAlignWin       <---------> OnMENUITEMChangeName
<---------> OnMENUITEMRemove         <---------> OnMENUITEMShowBehind
<---------> OnMenuitemAdjustWinPos   <---------> OnMyButtonUp
<---------> OnPaint                  <---------> OnQueryDragIcon
<---------> OnRADIOAlignStyle1       <---------> OnRADIOAlignStyle2
<---------> OnRADIOAlignStyle3       <---------> OnRButtonDown
<---------> OnSelchangeTABCell       <---------> OnSelchangeTABList
<---------> OnSize                   <---------> OnSysCommand
<---------> OnTaskBarCreated         <---------> OnTrayNotify
<---------> PreTranslateMessage      <---------> RegisterWindowMessage
<---------> ShowAll
 

class CDialog:
------------------------------------------------------------------------
----
 
You can check the source file MyBtnDlg.cpp. Actually these member
functions do not belong to class CAboutDlg. They belong to class
CMyBtnDlg.
 
It seem ebrowse is misled by a Windows MFC marco in CMyBtnDlg.cpp (in
line 23): (it is a very general marco in MFC program)
 
  DECLARE_MESSAGE_MAP()
};

 
It seem ebrowse is expecting a ";" after the ")". 
 
If I add a ';" here, then ebrowse can parse the file correctly. Or if I
delete this line, ebrowse can parse the file corrrectly too.
 
Shall we make some changes to let ebrowse may robust?
 
 
 
Regards,
Brian
 
 
 
 
 
 
 

[-- Attachment #1.2: Type: text/html, Size: 7452 bytes --]

[-- Attachment #2: MyBtnDlg.cpp --]
[-- Type: application/octet-stream, Size: 27851 bytes --]

// MyBtnDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MyBtn.h"
#include "MyBtnDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
#include "MyButton.h"

int sysbar_len;
const int spare_in_bottom =3;
const int spare_in_right = 3;


class CAboutDlg : public CDialog
{
public:
	CAboutDlg();

// Dialog Data
	//{{AFX_DATA(CAboutDlg)
	enum { IDD = IDD_ABOUTBOX };
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CAboutDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	//{{AFX_MSG(CAboutDlg)
	//}}AFX_MSG
  DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
	//{{AFX_DATA_INIT(CAboutDlg)
	//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
		// No message handlers
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyBtnDlg dialog

CMyBtnDlg::CMyBtnDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CMyBtnDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CMyBtnDlg)
	m_bCellMode = TRUE;
	m_bPutty = FALSE;
	m_bHideDeact = FALSE;
	m_pCurCell = NULL;
	m_iAlignStyle = 3;
	m_bLarge = TRUE;
	//}}AFX_DATA_INIT
	// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
	m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);


}

void CMyBtnDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMyBtnDlg)
	DDX_Control(pDX, IDC_TABList, m_TabList);
	DDX_Control(pDX, IDC_TABCell, m_TabCell);
	DDX_Check(pDX, IDC_CHECKCellMode, m_bCellMode);
	DDX_Check(pDX, IDC_CHECKPutty, m_bPutty);
	DDX_Check(pDX, IDC_CHECKHideDeact, m_bHideDeact);
	//}}AFX_DATA_MAP
}

const UINT WM_TASKBARCREATED = 
     ::RegisterWindowMessage(_T("TaskbarCreated"));

BEGIN_MESSAGE_MAP(CMyBtnDlg, CDialog)
	//{{AFX_MSG_MAP(CMyBtnDlg)
	ON_WM_SYSCOMMAND()
	ON_WM_PAINT()
	ON_WM_QUERYDRAGICON()
	ON_WM_LBUTTONDOWN()
	ON_WM_LBUTTONUP()
	ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
	ON_WM_DESTROY()
	ON_BN_CLICKED(IDC_BUTTON1, OnButtonShowAll)
	ON_BN_CLICKED(IDC_BUTTONMINALL, OnButtonMinAll)
	ON_BN_CLICKED(IDC_BUTTONALIGNME, OnButtonalignme)
	ON_BN_CLICKED(IDC_BUTTONExtShort, OnButtonExtShort)
	ON_BN_CLICKED(IDC_BUTTONSHOWALIGN, OnButtonshowalign)
	ON_BN_CLICKED(IDC_BUTTONSHOWALIGN2, OnButtonshowalign2)
	ON_BN_CLICKED(IDC_BUTTONMINME, OnButtonminme)
	ON_WM_LBUTTONDBLCLK()
	ON_BN_CLICKED(IDC_CHECKCellMode, OnCHECKCellMode)
	ON_BN_CLICKED(IDC_CHECKPutty, OnCHECKPutty)
	ON_WM_RBUTTONDOWN()
	ON_WM_CREATE()
	ON_WM_SIZE()
	ON_COMMAND(ID_MENUITEMAddButton, OnMENUITEMAddButton)
	ON_COMMAND(ID_MENUITEMChangeName, OnMENUITEMChangeName)
	ON_COMMAND(ID_MENUITEMAlignButtons, OnMENUITEMAlignButtons)
	ON_COMMAND(ID_MENUITEMAlignWin, OnMENUITEMAlignWin)
	ON_COMMAND(ID_MENUITEMRemove, OnMENUITEMRemove)
	ON_BN_CLICKED(IDC_CHECKHideDeact, OnCHECKHideDeact)
	ON_COMMAND(ID_MENUITEMAdjustWinPos, OnMenuitemAdjustWinPos)
	ON_COMMAND(ID_MENUITEMShowBehind, OnMENUITEMShowBehind)
	ON_NOTIFY(TCN_SELCHANGE, IDC_TABList, OnSelchangeTABList)
	ON_NOTIFY(TCN_SELCHANGE, IDC_TABCell, OnSelchangeTABCell)
	ON_BN_CLICKED(IDC_RADIOAlignStyle1, OnRADIOAlignStyle1)
	ON_BN_CLICKED(IDC_RADIOAlignStyle2, OnRADIOAlignStyle2)
	ON_BN_CLICKED(IDC_RADIOAlignStyle3, OnRADIOAlignStyle3)
	//}}AFX_MSG_MAP

	ON_MESSAGE(WM_HOTKEY, OnHotKey)
	ON_MESSAGE(WM_MBUTTONDOWN, OnMBtnDown)
	ON_MESSAGE(WM_TRAYICON,OnTrayNotify)
	ON_MESSAGE(WM_ACTIVATE, OnActivate)

	//tray icon
	ON_REGISTERED_MESSAGE(WM_TASKBARCREATED, OnTaskBarCreated)

END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyBtnDlg message handlers

BOOL CMyBtnDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// Add "About..." menu item to system menu.

	// IDM_ABOUTBOX must be in the system command range.
	ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
	ASSERT(IDM_ABOUTBOX < 0xF000);

	CMenu* pSysMenu = GetSystemMenu(FALSE);
	if (pSysMenu != NULL)
	{
		CString strAboutMenu;
		strAboutMenu.LoadString(IDS_ABOUTBOX);
		if (!strAboutMenu.IsEmpty())
		{
			pSysMenu->AppendMenu(MF_SEPARATOR);
			pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
		}
	}

	// Set the icon for this dialog.  The framework does this automatically
	//  when the application's main window is not a dialog
	SetIcon(m_hIcon, TRUE);			// Set big icon
	SetIcon(m_hIcon, FALSE);		// Set small icon
	
	// TODO: Add extra initialization here

	//LONG myEXStyle = ::GetWindowLong(m_hWnd, GWL_EXSTYLE);
	//myEXStyle |= WS_EX_TOOLWINDOW;
	//::SetWindowLong(m_hWnd, GWL_EXSTYLE, myEXStyle);

	LONG myStyle = ::GetWindowLong(m_hWnd, GWL_STYLE);
	//WS_THICKFRAME
	myStyle |=  WS_MINIMIZEBOX  ;
	::SetWindowLong(m_hWnd, GWL_STYLE,  myStyle);


/*#define LWA_COLORKEY 0x00000001
#define WS_EX_LAYERED 0x00080000
	
	typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
	lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes;
	
	COLORREF maskColor=RGB(77, 12, 28);
	HMODULE hUser32 = GetModuleHandle("user32.dll");
	SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,"SetLayeredWindowAttributes");
	SetWindowLong(GetSafeHwnd(), GWL_EXSTYLE, GetWindowLong(GetSafeHwnd(), GWL_EXSTYLE) | WS_EX_LAYERED);
	SetLayeredWindowAttributes(GetSafeHwnd(), maskColor, 255, LWA_COLORKEY);
	//SetLayeredWindowAttributes(GetSafeHwnd(), maskColor, 230, 3); //when 2, 3, ignore maskColor
	FreeLibrary(hUser32); 

*/

	//BYTE m = (BYTE)m_slider.GetPos();
	//HINSTANCE hinst = LoadLibrary("User32.DLL");
	//if(hinst)
	//{
	//	typedef BOOL (WINAPI *MYFUN)(HWND,COLORREF,BYTE,DWORD);
	//	MYFUN fun = NULL;
	//	fun = (MYFUN)GetProcAddress(hinst,"SetLayeredWindowAttributes");
	//	if(fun)                           
	//	{
	//		fun(AfxGetMainWnd()->GetSafeHwnd(),0,m,2);
	//	}
	//	FreeLibrary(hinst);
	//}  



	//cs.style =WS_POPUP;£»
    //cs.dwExStyle |=WS_EX_TOOLWINDOW;

	//::SetClassLong(m_hWnd, GCL_HBRBACKGROUND, (long)::GetStockObject(BLACK_BRUSH)); 
	
	m_kGetWindow = GlobalAddAtom("WINBOX1");
	if (!::RegisterHotKey(m_hWnd, m_kGetWindow, MOD_WIN, 'A'))
	{
		MessageBox("failed to reg hotkey");	
	}

	m_kBringMe = GlobalAddAtom("WINBOX:BringME");

	if (!::RegisterHotKey(m_hWnd, m_kBringMe, MOD_WIN, 'Z'))
	{
		MessageBox("failed to reg hotkey bringme");	
	}

	m_kShowGroup = GlobalAddAtom("WINBOX:ShowGroup");

	if (!::RegisterHotKey(m_hWnd, m_kShowGroup, MOD_WIN, 'Q'))
	{
		MessageBox("failed to reg hotkey showgroup");	
	}

	m_kAlignWin = GlobalAddAtom("WINBOX:AlignWin");

	if (!::RegisterHotKey(m_hWnd, m_kAlignWin, MOD_WIN, 'P'))
	{
		MessageBox("failed to reg hotkey AlignWin");	
	}

	m_kNextPage = GlobalAddAtom("WINBOX:NextPage");

	if (!::RegisterHotKey(m_hWnd, m_kNextPage, MOD_WIN, 'C'))
	{
		MessageBox("failed to reg hotkey NextPage");	
	}

	m_kPrevPage = GlobalAddAtom("WINBOX:PrevPage");

	if (!::RegisterHotKey(m_hWnd, m_kPrevPage, MOD_WIN, 'X'))
	{
		MessageBox("failed to reg hotkey PrevPage");	
	}

	m_kMinAll = GlobalAddAtom("WINBOX:MinAll");

	if (!::RegisterHotKey(m_hWnd, m_kMinAll, MOD_WIN, 'W'))
	{
		MessageBox("failed to reg hotkey MinAll");	
	}

	this->m_menuCell.LoadMenu(IDR_MENU1);
	//this->SetMenu(&m_menuCell);

	this->GetClientRect(&m_AlignRect);

	CRect rect;

	this->GetWindowRect(&rect);
	m_FullDlgRect.left = 0;
	m_FullDlgRect.top =0;
	m_FullDlgRect.bottom =rect.Height();
	m_FullDlgRect.right = rect.Width();

	this->GetClientRect(&rect);
	sysbar_len = m_FullDlgRect.Height() - rect.Height();

	this->GetDlgItem(IDC_STATIC_V)->GetWindowRect(&rect);
	//m_AlignRect.right = rect.left - spare_in_right;
	m_AlignRect.left = rect.right;

	this->GetDlgItem(IDC_STATIC_H)->GetWindowRect(&rect);
	m_AlignRect.bottom = rect.top - sysbar_len - spare_in_bottom;

	//m_AlignRect.left += 8;
	m_AlignRect.right -= spare_in_right;
	m_AlignRect.top  += 8;
		
	m_orgCursor=(HCURSOR)::GetClassLong(m_hWnd, GCL_HCURSOR);
	//::SetClassLong(m_hWnd, GCL_HCURSOR, NULL);
	//::SetCursor(m_orgCursor);



	this->GetDlgItem(IDC_STATICCellSmall)->GetWindowRect(&m_rCellSmall);
	m_rCellSmall.top -= sysbar_len;
	m_rCellSmall.bottom -= sysbar_len;
	//m_pCurCell->Create(m_rCellSmall, this);


	OnButtonExtShort();


	// Add Tabs
	//Cell TAB:
	CString str;
	int i;
	for (i=0; i< CellCount; i++)
	{
		str.Format("C %d", i+1);
		this->m_TabCell.InsertItem(i, str);
	
		m_CellRectArray[i].Create(m_AlignRect, this);
		m_CellRectArray[i].m_orgCursor = m_orgCursor;
		m_CellRectArray[i].SetBitmap(IDB_BITMAP1, IDB_BITMAP2);
		//m_CellRectArray[i].SetBitmapMode(TRUE);

	}

	this->m_pCurCell = & m_CellRectArray[0];

	for (i=0; i< ListCount; i++)
	{
		str.Format("B %d", i+1);
		this->m_TabList.InsertItem(i, str);
	}

	m_pCurBtnList = & m_BtnListArray[0];

	CButton * pbstyle = (CButton *) GetDlgItem(IDC_RADIOAlignStyle3);
	pbstyle->SetCheck(1);


	return TRUE;  // return TRUE  unless you set the focus to a control
}

void CMyBtnDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
	if ((nID & 0xFFF0) == IDM_ABOUTBOX)
	{
		CAboutDlg dlgAbout;
		dlgAbout.DoModal();
	}
	else if (nID == SC_MINIMIZE )
	{
		ShowWindow(SW_HIDE);
		return;
	}
	else if (nID == SC_CLOSE)
	{
		int ret = MessageBox("Do you really want ot quit", "Warning", MB_OKCANCEL);
	
		if (ret == 2) // cancel
		{
			return;
		}else
		{
			CDialog::OnSysCommand(nID, lParam);
		}
	}
	else
	{
		CDialog::OnSysCommand(nID, lParam);
	}
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CMyBtnDlg::OnPaint() 
{


	if (IsIconic())
	{
		CPaintDC dc(this); // device context for painting

		SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

		// Center icon in client rectangle
		int cxIcon = GetSystemMetrics(SM_CXICON);
		int cyIcon = GetSystemMetrics(SM_CYICON);
		CRect rect;
		GetClientRect(&rect);
		int x = (rect.Width() - cxIcon + 1) / 2;
		int y = (rect.Height() - cyIcon + 1) / 2;

		// Draw the icon
		dc.DrawIcon(x, y, m_hIcon);
	}
	else
	{
		CDialog::OnPaint();
	}

	/*
	CRect staticR, clR, r;

	this->GetDlgItem(IDC_STATICTransport)->GetWindowRect(&staticR);
	this->ScreenToClient(&staticR);

	this->GetClientRect(&clR);

	r.left=staticR.left;
	r.top = staticR.top;
	r.right = staticR.right;
	r.bottom = clR.bottom;

	CClientDC dc(this);

	CBrush br;
	br.CreateSolidBrush(RGB(77, 12, 28));
	CBrush *oldBrush = dc.SelectObject(&br);

	dc.Rectangle(&r);

	if (m_bCellMode)
	{
		CRect cellR;
		this->GetDlgItem(IDC_STATICCellSmall)->GetWindowRect(&cellR);
		this->ScreenToClient(&cellR);
		dc.Rectangle(&cellR);

	}

	dc.SelectObject(oldBrush);
	*/

	this->m_pCurCell->Draw();


}

// The system calls this to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CMyBtnDlg::OnQueryDragIcon()
{
	return (HCURSOR) m_hIcon;
}

void CMyBtnDlg::OnLButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

	this->m_pCurCell->OnLButtonDown(nFlags, point);

	CDialog::OnLButtonDown(nFlags, point);

	//this->SetCapture();
}

void CMyBtnDlg::OnLButtonUp(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

	//ReleaseCapture();
	this->m_pCurCell->OnLButtonUp(nFlags, point);

	CDialog::OnLButtonUp(nFlags, point);
}


void CMyBtnDlg::OnButton4() 
{
	// TODO: Add your control notification handler code here
   
	int ret = MessageBox("Do you really want ot clear all", "Warning", MB_OKCANCEL);
	
	if (ret == 2) // cancel
	{
		return;
	}


	m_pCurBtnList->RemoveAll();

}

void CMyBtnDlg::OnDestroy() 
{
	CDialog::OnDestroy();
	
	// TODO: Add your message handler code here

	Shell_NotifyIcon(NIM_DELETE, &m_trayIcon);

	// Remove the HotKey

	if (!(UnregisterHotKey(m_hWnd, this->m_kGetWindow)))
	{
		MessageBox("Failed to unregister hotkey getwindow");
	}

	if (!(UnregisterHotKey(m_hWnd, this->m_kBringMe)))
	{
		MessageBox("Failed to unregister hotkey bringme");
	}

	if (!(UnregisterHotKey(m_hWnd, this->m_kShowGroup)))
	{
		MessageBox("Failed to unregister hotkey showgroup");
	}

	if (!(UnregisterHotKey(m_hWnd, this->m_kAlignWin)))
	{
		MessageBox("Failed to unregister hotkey AlignWin");
	}

	if (!(UnregisterHotKey(m_hWnd, this->m_kNextPage)))
	{
		MessageBox("Failed to unregister hotkey NextPage");
	}
	
	if (!(UnregisterHotKey(m_hWnd, this->m_kPrevPage)))
	{
		MessageBox("Failed to unregister hotkey PrevPage");
	}

	if (!(UnregisterHotKey(m_hWnd, this->m_kMinAll)))
	{
		MessageBox("Failed to unregister hotkey MinAll");
	}


}

LRESULT CMyBtnDlg::OnMBtnDown(WPARAM wParam,LPARAM lParam)
{

	return m_pCurCell->OnMBtnDown(wParam, lParam);

}

LRESULT CMyBtnDlg::OnHotKey(WPARAM wParam,LPARAM lParam)
{

	if (wParam == m_kGetWindow){
		
		HWND fwin=::GetForegroundWindow();

		if ((fwin != this->m_hWnd)&& (fwin !=::GetDesktopWindow())){

			if (this->m_bCellMode)
			{
				//pBtn->ShowWindow(SW_HIDE);

				this->m_pCurCell->AddToCell(fwin);
				this->m_pCurCell->Draw();
			}
			else
			{
				AddButton(fwin);
			}

		}


		
	} else if (wParam == m_kBringMe){
		if (IsIconic())
		{
			ShowWindow(SW_SHOWNOACTIVATE);
		}

		if (!IsWindowVisible())
		{
			this->ShowWindow(SW_SHOW);
		}

		::SetForegroundWindow(this->m_hWnd);

	} else if (wParam == m_kShowGroup){

		if (m_bPutty)
		{
			this->OnButtonshowalign();
		}
		else
		{
			this->OnButtonshowalign2();
		}

	} else if (wParam == m_kAlignWin){

		int count = m_pCurCell->AlignWnd(this->m_iAlignStyle);

		if ( 1 == count)
		{
			m_pCurCell->ShowGroup();
		}
	
		if (count > 0)
		{
				
			ShowWindow(SW_HIDE);
		}

		m_pCurBtnList->ShowGroupWnd();

	}else if (wParam == m_kMinAll){

		OnButtonMinAll();

	} else if ((wParam == m_kNextPage) || (wParam == m_kPrevPage)){

		int cur = m_TabCell.GetCurSel();

		int np;

		if (wParam == m_kNextPage){
			
			np = (cur + 1) % CellCount;
		} else {
			np = (cur - 1 + CellCount) % CellCount;
		}

		m_TabCell.SetCurSel(np);
		m_pCurCell = & m_CellRectArray[np];

		
		if (this->m_bCellMode) {
			
			m_pCurCell->SetRect(this->m_AlignRect);
			m_pCurCell->SetBitmapMode(FALSE);
			
		} else
		{
			
			m_pCurCell->SetRect(this->m_rCellSmall);
			m_pCurCell->SetBitmapMode(TRUE);
			
		}

		m_pCurCell->Draw();
		m_pCurCell->ShowGroup();


	}

	return 0;
}

void CMyBtnDlg::OnButtonShowAll() 
{
	// TODO: Add your control notification handler code here

	this->m_pCurBtnList->ShowAllWnd();
	this->m_pCurCell->ShowAllWnd();

}


void CMyBtnDlg::OnButtonMinAll() 
{
	// TODO: Add your control notification handler code here
	m_pCurBtnList->MiniAllWnd();
	m_pCurCell->MiniAll();

}



void CMyBtnDlg::OnButtonExtShort() 
{	

	if (m_bLarge)
	{
		CRect rect;

		rect = m_FullDlgRect;

		rect.bottom = m_AlignRect.bottom + sysbar_len + spare_in_bottom;

		this->SetWindowPos(NULL, 0, 0, rect.Width(), rect.Height(),
			SWP_NOMOVE | SWP_NOZORDER);

		this->GetDlgItem(IDC_BUTTONExtShort)->SetWindowText(">>");

		m_bLarge =FALSE;
	}else
	{
		this->SetWindowPos(NULL, 0, 0, m_FullDlgRect.Width(), m_FullDlgRect.Height(),
			SWP_NOMOVE | SWP_NOZORDER);

		this->GetDlgItem(IDC_BUTTONExtShort)->SetWindowText("<<");

		m_bLarge =TRUE;

	}
}

void CMyBtnDlg::OnButtonalignme() 
{
	// TODO: Add your control notification handler code here

	int ret = MessageBox("Do you really want ot align buttons?", "Warning", MB_OKCANCEL);
	
	if (ret == 2) // cancel
	{
		return;
	}

	m_pCurBtnList->AlignMeLayout(this->m_AlignRect);


	this ->Invalidate();
}


void CMyBtnDlg::OnButtonshowalign() 
{
	// TODO: Add your control notification handler code here

	if (!m_bPutty)
	{
	int ret = MessageBox("Do you really want ot align windows", "Warning", MB_OKCANCEL);
	
	if (ret == 2) // cancel
	{
		return;
	}
	}

	int count = m_pCurCell->AlignWnd(this->m_iAlignStyle);

	if ( 1 == count)
	{
		m_pCurCell->ShowGroup();
	}
	
	if (count > 0)
	{
		
		ShowWindow(SW_HIDE);
	}

	m_pCurBtnList->ShowGroupWnd();



}

void CMyBtnDlg::OnButtonshowalign2() 
{
	// TODO: Add your control notification handler code here

	m_pCurCell->ShowGroup();
	m_pCurBtnList->ShowGroupWnd();

}



void CMyBtnDlg::HideAll()
{
	m_pCurBtnList->ShowAllBtn(FALSE);
}

void CMyBtnDlg::ShowAll()
{
	m_pCurBtnList->ShowAllBtn(TRUE);
}


void CMyBtnDlg::OnButtonminme() 
{
	// TODO: Add your control notification handler code here
	this->ShowWindow(SW_SHOWMINIMIZED);
	
}



void CMyBtnDlg::OnLButtonDblClk(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

	if (!m_pCurCell->OnLButtonDblClk(nFlags, point))
	{
		//this->ShowWindow(SW_SHOWMINIMIZED);
		this->ShowWindow(SW_HIDE);

		if (m_bPutty)
		{
			this->OnButtonshowalign();
		}
		else
		{
			this->OnButtonshowalign2();
		}
	}

	CDialog::OnLButtonDblClk(nFlags, point);
}



void CMyBtnDlg::OnCHECKCellMode() 
{
	// TODO: Add your control notification handler code here
	this->UpdateData();

	if (this->m_bCellMode) {
		
		HideAll(); // hide all button;


		m_pCurCell->SetRect(this->m_AlignRect);
		m_pCurCell->SetBitmapMode(FALSE);

	} else
	{
		ShowAll();

		m_pCurCell->SetRect(this->m_rCellSmall);
		m_pCurCell->SetBitmapMode(TRUE);

	}

	this->GetDlgItem(IDC_BUTTONALIGNME)->EnableWindow(!m_bCellMode);
 


	this->Invalidate();
	
}

void CMyBtnDlg::OnCHECKPutty() 
{
	// TODO: Add your control notification handler code here
	this->UpdateData();
}



void CMyBtnDlg::OnRButtonDown(UINT nFlags, CPoint point) 
{
	// TODO: Add your message handler code here and/or call default

	if (m_pCurCell->PtInRect(point))
	{
		m_pCurCell->OnRButtonDown(nFlags, point);
	}
	else
	{
		CPoint pt = point;
		this->ClientToScreen(&pt);

		CMenu * submenu = m_menuCell.GetSubMenu(2);

		if (m_bCellMode)
		{
			submenu->EnableMenuItem(ID_MENUITEMAlignButtons, MF_GRAYED);
		}
		else
		{
			submenu->EnableMenuItem(ID_MENUITEMAlignButtons, MF_ENABLED);
		}

		submenu->TrackPopupMenu(TPM_LEFTALIGN, pt.x, pt.y, this, NULL);

	}


	CDialog::OnRButtonDown(nFlags, point);
}


//void CMyBtnDlg::OnCancel( ){}

BOOL CMyBtnDlg::PreTranslateMessage(MSG*   pMsg)    
{  
    if(pMsg->message==WM_KEYDOWN   &&   pMsg->wParam==VK_ESCAPE)   
	{
		//pMsg->wParam=VK_RETURN;
		return   TRUE;  
	}
    //if(pMsg->message==WM_KEYDOWN   &&   pMsg->wParam==VK_RETURN)   return   TRUE;    
    else      
		return   CDialog::PreTranslateMessage(pMsg);  
 }   


void CMyBtnDlg::AddToCell(HWND hWnd)
{

	this->m_pCurCell->AddToCell(hWnd);
	this->m_pCurCell->Draw();
}

void CMyBtnDlg::AddToCell(HWND hWnd, int row, int col)
{

	this->m_pCurCell->AddCell(hWnd, row, col);
	this->m_pCurCell->Draw();
}



int CMyBtnDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	// TODO: Add your specialized creation code here

	CString str;
	str.LoadString(IDS_TOOLTIP);

	m_trayIcon.cbSize = sizeof(NOTIFYICONDATA);
	m_trayIcon.hIcon = m_hIcon;
		
		//(HICON)LoadImage(AfxGetApp()->m_hInstance,
		//	MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON, 16, 16, 0);
	m_trayIcon.hWnd = m_hWnd;
	m_trayIcon.uID = MAINTRAYICON;
	m_trayIcon.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
	m_trayIcon.uCallbackMessage = WM_TRAYICON;
	strcpy(m_trayIcon.szTip, str);

	Shell_NotifyIcon(NIM_ADD, &m_trayIcon);


	return 0;
}

LRESULT CMyBtnDlg::OnTrayNotify(WPARAM wParam, LPARAM lParam)
{

	if (wParam != MAINTRAYICON)
	{
		return 0;
	}

	switch(lParam)
	{
		
	case WM_LBUTTONUP:

		if (this->IsWindowVisible())
		{
			ShowWindow(SW_HIDE);
		}
		else
		{
			ShowWindow(SW_SHOWNORMAL);
			SetForegroundWindow();
		}
		break;

	//case WM_RBUTTONDOWN:

	//	break;
	//case WM_LBUTTONDBLCLK:

	//	break;
	default:
	break;
	}

	return 0;

}




void CMyBtnDlg::OnSize(UINT nType, int cx, int cy) 
{
	CDialog::OnSize(nType, cx, cy);
	
	// TODO: Add your message handler code here
	this->m_AlignRect.right = cx - spare_in_right;
	this->m_AlignRect.bottom = cy - spare_in_bottom;

	if (m_AlignRect.left > m_AlignRect.right)
	{
		m_AlignRect.right = m_AlignRect.left;
	}

	if (m_AlignRect.top > m_AlignRect.bottom)
	{
		m_AlignRect.bottom = m_AlignRect.top;
	}

	if ((this->m_bCellMode) && (m_pCurCell != NULL))
	{
		m_pCurCell->SetRect(m_AlignRect);
		Invalidate();
	}

	// Adjust TABs
	if (m_pCurCell != NULL)
	{
		CRect r;
		
		this->m_TabCell.GetWindowRect(&r);
		this->ScreenToClient(&r);
		this->m_TabCell.SetWindowPos(NULL, 0, 0, r.Width(), cy-r.top, SWP_NOMOVE | SWP_NOZORDER);
		
		this->m_TabList.GetWindowRect(&r);
		this->ScreenToClient(&r);
		this->m_TabList.SetWindowPos(NULL, 0, 0, r.Width(), cy-r.top, SWP_NOMOVE | SWP_NOZORDER);
	}
}



 LRESULT CMyBtnDlg::OnTaskBarCreated(WPARAM wp, LPARAM lp)
 {

	 Shell_NotifyIcon(NIM_ADD, &m_trayIcon);
     return 0;
 }


void CMyBtnDlg::OnMENUITEMAddButton() 
{
	// TODO: Add your command handler code here
	HWND hWnd = this->m_pCurCell->GetHWndAddBtn();

	AddButton(hWnd);
	
}

CWnd* CMyBtnDlg::AddButton(HWND hWnd, CPoint point)
{
	
	char ch[30];
	::GetWindowText(hWnd, ch, 30);
	
	CString str(ch);
	
	CRect rect;
	
	rect.left = this->m_AlignRect.right - 80;
	rect.top  = this->m_AlignRect.bottom -80;
	rect.bottom = this->m_AlignRect.bottom;
	rect.right = this->m_AlignRect.right;
	
	CMyButton * pBtn;
	
	pBtn = (CMyButton *)m_pCurBtnList->FindBtn(hWnd);
	
	if (pBtn != NULL)
	{
		
		pBtn->SetFocus();
	}
	else
	{
		
		pBtn = new CMyButton();
		pBtn->Create(str, WS_CHILD | BS_DEFPUSHBUTTON |WS_VISIBLE | WS_THICKFRAME, 
			rect, this, 111);
		
		
		pBtn->m_hIcon = (HICON)::GetClassLong(hWnd, GCL_HICONSM);
		pBtn->m_hConnectWnd=hWnd;
		
		pBtn->ModifyStyle(0, BS_OWNERDRAW);
		
		
		
		m_pCurBtnList->AddBtn(pBtn);
		pBtn->SetFocus();
		
	}
	
	if (this->m_bCellMode)
	{
		pBtn->ShowWindow(SW_HIDE);			
	}
	else
	{
		if (m_AlignRect.PtInRect(point))
		{
			pBtn->SetWindowPos(NULL, point.x, point.y, 0 , 0, 
				SWP_NOSIZE | SWP_NOZORDER |SWP_NOACTIVATE);
		}
	}
	
	return pBtn;
	
}

void CMyBtnDlg::OnMENUITEMChangeName() 
{
	// TODO: Add your command handler code here

	this->m_pCurCell->ChangeCellName();
	
}



void CMyBtnDlg::OnMENUITEMAlignButtons() 
{
	// TODO: Add your command handler code here
	OnButtonalignme();
}

void CMyBtnDlg::OnMENUITEMAlignWin() 
{
	// TODO: Add your command handler code here
	OnButtonshowalign();
	
}

//DEL void CMyBtnDlg::OnButton2() 
//DEL {
//DEL 	// TODO: Add your control notification handler code here
//DEL 	//::SetForegroundWindow(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd);
//DEL 	//::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_KEYDOWN, 'a', 0);
//DEL 	::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_CHAR, 'l', 0);
//DEL 	::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_CHAR, 's', 0);
//DEL 	::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_CHAR, ' ', 0);
//DEL 	//::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_KEYUP, 'a', 0);
//DEL 	::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_CHAR, VK_RETURN, 0);
//DEL 
//DEL 	::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_CHAR, 'x', 0);
//DEL 	::SendMessage(this->m_pCurCell->m_CellData[0][0]->m_hConnectWnd, WM_CHAR, VK_RETURN, 0);
//DEL 	
//DEL 			this->ShowWindow(SW_MINIMIZE);
//DEL 
//DEL 	/*STARTUPINFO sui;
//DEL 	PROCESS_INFORMATION pi;
//DEL 	
//DEL 	ZeroMemory(&sui, sizeof(STARTUPINFO));
//DEL 	sui.cb = sizeof(STARTUPINFO);
//DEL 
//DEL 	if (CreateProcess("C:\\Documents and Settings\\WinGer\\×ÀÃæ\\putty.exe", "putty.exe 202.38.33.182", 
//DEL 		NULL, NULL, FALSE, 0, NULL, NULL, &sui, &pi))
//DEL 	{
//DEL 		::CloseHandle(pi.hProcess);
//DEL 		::CloseHandle(pi.hThread);
//DEL 
//DEL 
//DEL 		this->m_pCurCell->AddToCell(::GetForegroundWindow());
//DEL 	}*/
//DEL }

void CMyBtnDlg::OnMENUITEMRemove() 
{
	// TODO: Add your command handler code here
	this->m_pCurCell->DelFromCell(m_pCurCell->GetHWndAddBtn());
	m_pCurCell->Draw();
	
}

BOOL CMyBtnDlg::DelFromCell(HWND hWnd)
{
	if (m_pCurCell->DelFromCell(hWnd))
	{
		m_pCurCell->Draw();
		return TRUE;
	}
	else
	{
		return FALSE;
	}
}

LRESULT CMyBtnDlg::OnActivate(WPARAM wParam, LPARAM lParam)
{
	//fActive = LOWORD(wParam);           // activation flag 
	//fMinimized = (BOOL) HIWORD(wParam); // minimized flag 
	//hwndPrevious = (HWND) lParam;       // window handle 
	
	if (this->m_bHideDeact)
	{
		if (WA_INACTIVE == LOWORD(wParam))
		{
			
			this->ShowWindow(SW_HIDE);
		}
	}
	return 0;

}



void CMyBtnDlg::OnCHECKHideDeact() 
{
	// TODO: Add your control notification handler code here

	this->UpdateData();
}

void CMyBtnDlg::OnMyButtonUp(UINT nFlags, CPoint point, CMyButton *pBtn)
{

	this->m_pCurCell->OnMyButtonUp(nFlags, point, pBtn);
}

BOOL CMyBtnDlg::DelButton(CMyButton *pBtn)
{

	this->m_pCurBtnList->RemoveBtn(pBtn);

	delete pBtn;

	return TRUE;
}

void CMyBtnDlg::OnMenuitemAdjustWinPos() 
{
	// TODO: Add your command handler code here
	m_pCurCell->AdjustWinPos(this->m_iAlignStyle);
	
}

void CMyBtnDlg::OnMENUITEMShowBehind() 
{
	// TODO: Add your command handler code here

	m_pCurCell->SetShowBehind();
	m_pCurCell->Draw();
	
}

void CMyBtnDlg::OnSelchangeTABList(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	
	int cur = m_TabList.GetCurSel();
	
	if (m_bCellMode)
	{
		this->m_pCurBtnList = & m_BtnListArray[cur];
	}
	else
	{
		m_pCurBtnList->ShowAllBtn(FALSE);
		this->m_pCurBtnList = & m_BtnListArray[cur];
		this->m_pCurBtnList->ShowAllBtn(TRUE);
	}

	*pResult = 0;
}

void CMyBtnDlg::OnSelchangeTABCell(NMHDR* pNMHDR, LRESULT* pResult) 
{
	// TODO: Add your control notification handler code here
	

	int cur = m_TabCell.GetCurSel();
	m_pCurCell = & m_CellRectArray[cur];

	if (this->m_bCellMode) {
		
		m_pCurCell->SetRect(this->m_AlignRect);
		m_pCurCell->SetBitmapMode(FALSE);

	} else
	{

		m_pCurCell->SetRect(this->m_rCellSmall);
		m_pCurCell->SetBitmapMode(TRUE);

	}
	m_pCurCell->Draw();

	*pResult = 0;
}

void CMyBtnDlg::OnRADIOAlignStyle1() 
{
	// TODO: Add your control notification handler code here
	this->m_iAlignStyle = 1;
}

void CMyBtnDlg::OnRADIOAlignStyle2() 
{
	// TODO: Add your control notification handler code here
	this->m_iAlignStyle = 2;
	
}

void CMyBtnDlg::OnRADIOAlignStyle3() 
{
	// TODO: Add your control notification handler code here
	this->m_iAlignStyle = 3;
	
}

[-- Attachment #3: BROWSE --]
[-- Type: application/octet-stream, Size: 14521 bytes --]

[ebrowse-hs "ebrowse 5.0" " -x" () ()][ebrowse-ts [ebrowse-cs "CDialog" () 0() () 0() ]
([ebrowse-ts [ebrowse-cs "CAboutDlg" () 0"MyBtnDlg.cpp" "class CAboutDlg :" 436"MyBtnDlg.cpp" ]
()()
([ebrowse-ms "AddButton" () 0 () "CWnd* CMyBtnDlg::AddButton(HWND" 21165 1  () "CWnd* CMyBtnDlg::AddButton(HWND" 21165]
[ebrowse-ms "AddToCell" () 0 () "void CMyBtnDlg::AddToCell(HWND" 18780 1  () "void CMyBtnDlg::AddToCell(HWND" 18780]
[ebrowse-ms "AddToCell" () 0 () "void CMyBtnDlg::AddToCell(HWND" 18674 1  () "void CMyBtnDlg::AddToCell(HWND" 18674]
[ebrowse-ms "BEGIN_MESSAGE_MAP" () 0 () "BEGIN_MESSAGE_MAP(CMyBtnDlg" 2159 1  () "BEGIN_MESSAGE_MAP(CMyBtnDlg" 2159]
[ebrowse-ms "BEGIN_MESSAGE_MAP" () 0 () "BEGIN_MESSAGE_MAP(CAboutDlg" 1103 1  () "BEGIN_MESSAGE_MAP(CAboutDlg" 1103]
[ebrowse-ms "CAboutDlg" () 0 () "CAboutDlg::CAboutDlg() :" 861 1  () "CAboutDlg::CAboutDlg() :" 861]
[ebrowse-ms "DECLARE_MESSAGE_MAP" () 0 () "  DECLARE_MESSAGE_MAP()" 834 1  () () 0]
[ebrowse-ms "DelButton" () 0 () "BOOL CMyBtnDlg::DelButton(CMyButton" 24959 1  () "BOOL CMyBtnDlg::DelButton(CMyButton" 24959]
[ebrowse-ms "DelFromCell" () 0 () "BOOL CMyBtnDlg::DelFromCell(HWND" 24186 1  () "BOOL CMyBtnDlg::DelFromCell(HWND" 24186]
[ebrowse-ms "DoDataExchange" () 0 () "void CMyBtnDlg::DoDataExchange(CDataExchange" 1728 1  () "void CMyBtnDlg::DoDataExchange(CDataExchange" 1728]
[ebrowse-ms "HideAll" () 0 () "void CMyBtnDlg::HideAll()" 16440 1  () "void CMyBtnDlg::HideAll()" 16440]
[ebrowse-ms "OnActivate" () 0 () "LRESULT CMyBtnDlg::OnActivate(WPARAM" 24341 1  () "LRESULT CMyBtnDlg::OnActivate(WPARAM" 24341]
[ebrowse-ms "OnButton4" () 0 () "void CMyBtnDlg::OnButton4()" 11700 1  () "void CMyBtnDlg::OnButton4()" 11700]
[ebrowse-ms "OnButtonExtShort" () 0 () "void CMyBtnDlg::OnButtonExtShort()" 14984 1  () "void CMyBtnDlg::OnButtonExtShort()" 14984]
[ebrowse-ms "OnButtonMinAll" () 0 () "void CMyBtnDlg::OnButtonMinAll()" 14828 1  () "void CMyBtnDlg::OnButtonMinAll()" 14828]
[ebrowse-ms "OnButtonShowAll" () 0 () "void CMyBtnDlg::OnButtonShowAll()" 14659 1  () "void CMyBtnDlg::OnButtonShowAll()" 14659]
[ebrowse-ms "OnButtonalignme" () 0 () "void CMyBtnDlg::OnButtonalignme()" 15533 1  () "void CMyBtnDlg::OnButtonalignme()" 15533]
[ebrowse-ms "OnButtonminme" () 0 () "void CMyBtnDlg::OnButtonminme()" 16578 1  () "void CMyBtnDlg::OnButtonminme()" 16578]
[ebrowse-ms "OnButtonshowalign" () 0 () "void CMyBtnDlg::OnButtonshowalign()" 15840 1  () "void CMyBtnDlg::OnButtonshowalign()" 15840]
[ebrowse-ms "OnButtonshowalign2" () 0 () "void CMyBtnDlg::OnButtonshowalign2()" 16288 1  () "void CMyBtnDlg::OnButtonshowalign2()" 16288]
[ebrowse-ms "OnCHECKCellMode" () 0 () "void CMyBtnDlg::OnCHECKCellMode()" 17119 1  () "void CMyBtnDlg::OnCHECKCellMode()" 17119]
[ebrowse-ms "OnCHECKHideDeact" () 0 () "void CMyBtnDlg::OnCHECKHideDeact()" 24704 1  () "void CMyBtnDlg::OnCHECKHideDeact()" 24704]
[ebrowse-ms "OnCHECKPutty" () 0 () "void CMyBtnDlg::OnCHECKPutty()" 17580 1  () "void CMyBtnDlg::OnCHECKPutty()" 17580]
[ebrowse-ms "OnCreate" () 0 () "int CMyBtnDlg::OnCreate(LPCREATESTRUCT" 18922 1  () "int CMyBtnDlg::OnCreate(LPCREATESTRUCT" 18922]
[ebrowse-ms "OnDestroy" () 0 () "void CMyBtnDlg::OnDestroy()" 11953 1  () "void CMyBtnDlg::OnDestroy()" 11953]
[ebrowse-ms "OnHotKey" () 0 () "LRESULT CMyBtnDlg::OnHotKey(WPARAM" 13045 1  () "LRESULT CMyBtnDlg::OnHotKey(WPARAM" 13045]
[ebrowse-ms "OnLButtonDblClk" () 0 () "void CMyBtnDlg::OnLButtonDblClk(UINT" 16720 1  () "void CMyBtnDlg::OnLButtonDblClk(UINT" 16720]
[ebrowse-ms "OnLButtonDown" () 0 () "void CMyBtnDlg::OnLButtonDown(UINT" 11229 1  () "void CMyBtnDlg::OnLButtonDown(UINT" 11229]
[ebrowse-ms "OnLButtonUp" () 0 () "void CMyBtnDlg::OnLButtonUp(UINT" 11470 1  () "void CMyBtnDlg::OnLButtonUp(UINT" 11470]
[ebrowse-ms "OnMBtnDown" () 0 () "LRESULT CMyBtnDlg::OnMBtnDown(WPARAM" 12933 1  () "LRESULT CMyBtnDlg::OnMBtnDown(WPARAM" 12933]
[ebrowse-ms "OnMENUITEMAddButton" () 0 () "void CMyBtnDlg::OnMENUITEMAddButton()" 21013 1  () "void CMyBtnDlg::OnMENUITEMAddButton()" 21013]
[ebrowse-ms "OnMENUITEMAlignButtons" () 0 () "void CMyBtnDlg::OnMENUITEMAlignButtons()" 22315 1  () "void CMyBtnDlg::OnMENUITEMAlignButtons()" 22315]
[ebrowse-ms "OnMENUITEMAlignWin" () 0 () "void CMyBtnDlg::OnMENUITEMAlignWin()" 22423 1  () "void CMyBtnDlg::OnMENUITEMAlignWin()" 22423]
[ebrowse-ms "OnMENUITEMChangeName" () 0 () "void CMyBtnDlg::OnMENUITEMChangeName()" 22181 1  () "void CMyBtnDlg::OnMENUITEMChangeName()" 22181]
[ebrowse-ms "OnMENUITEMRemove" () 0 () "void CMyBtnDlg::OnMENUITEMRemove()" 24018 1  () "void CMyBtnDlg::OnMENUITEMRemove()" 24018]
[ebrowse-ms "OnMENUITEMShowBehind" () 0 () "void CMyBtnDlg::OnMENUITEMShowBehind()" 25222 1  () "void CMyBtnDlg::OnMENUITEMShowBehind()" 25222]
[ebrowse-ms "OnMenuitemAdjustWinPos" () 0 () "void CMyBtnDlg::OnMenuitemAdjustWinPos()" 25082 1  () "void CMyBtnDlg::OnMenuitemAdjustWinPos()" 25082]
[ebrowse-ms "OnMyButtonUp" () 0 () "void CMyBtnDlg::OnMyButtonUp(UINT" 24824 1  () "void CMyBtnDlg::OnMyButtonUp(UINT" 24824]
[ebrowse-ms "OnPaint" () 0 () "void CMyBtnDlg::OnPaint()" 9927 1  () "void CMyBtnDlg::OnPaint()" 9927]
[ebrowse-ms "OnQueryDragIcon" () 0 () "HCURSOR CMyBtnDlg::OnQueryDragIcon()" 11162 1  () "HCURSOR CMyBtnDlg::OnQueryDragIcon()" 11162]
[ebrowse-ms "OnRADIOAlignStyle1" () 0 () "void CMyBtnDlg::OnRADIOAlignStyle1()" 26204 1  () "void CMyBtnDlg::OnRADIOAlignStyle1()" 26204]
[ebrowse-ms "OnRADIOAlignStyle2" () 0 () "void CMyBtnDlg::OnRADIOAlignStyle2()" 26331 1  () "void CMyBtnDlg::OnRADIOAlignStyle2()" 26331]
[ebrowse-ms "OnRADIOAlignStyle3" () 0 () "void CMyBtnDlg::OnRADIOAlignStyle3()" 26460 1  () "void CMyBtnDlg::OnRADIOAlignStyle3()" 26460]
[ebrowse-ms "OnRButtonDown" () 0 () "void CMyBtnDlg::OnRButtonDown(UINT" 17702 1  () "void CMyBtnDlg::OnRButtonDown(UINT" 17702]
[ebrowse-ms "OnSelchangeTABCell" () 0 () "void CMyBtnDlg::OnSelchangeTABCell(NMHDR" 25761 1  () "void CMyBtnDlg::OnSelchangeTABCell(NMHDR" 25761]
[ebrowse-ms "OnSelchangeTABList" () 0 () "void CMyBtnDlg::OnSelchangeTABList(NMHDR" 25368 1  () "void CMyBtnDlg::OnSelchangeTABList(NMHDR" 25368]
[ebrowse-ms "OnSize" () 0 () "void CMyBtnDlg::OnSize(UINT" 19973 1  () "void CMyBtnDlg::OnSize(UINT" 19973]
[ebrowse-ms "OnSysCommand" () 0 () "void CMyBtnDlg::OnSysCommand(UINT" 9250 1  () "void CMyBtnDlg::OnSysCommand(UINT" 9250]
[ebrowse-ms "OnTaskBarCreated" () 0 () " LRESULT CMyBtnDlg::OnTaskBarCreated(WPARAM" 20894 1  () " LRESULT CMyBtnDlg::OnTaskBarCreated(WPARAM" 20894]
[ebrowse-ms "OnTrayNotify" () 0 () "LRESULT CMyBtnDlg::OnTrayNotify(WPARAM" 19570 1  () "LRESULT CMyBtnDlg::OnTrayNotify(WPARAM" 19570]
[ebrowse-ms "PreTranslateMessage" () 0 () "BOOL CMyBtnDlg::PreTranslateMessage(MSG" 18345 1  () "BOOL CMyBtnDlg::PreTranslateMessage(MSG" 18345]
[ebrowse-ms "RegisterWindowMessage" () 0 () "     ::RegisterWindowMessage(_T" 2110 1  () () 0]
[ebrowse-ms "ShowAll" () 0 () "void CMyBtnDlg::ShowAll()" 16506 1  () "void CMyBtnDlg::ShowAll()" 16506]
)
()
()
()
()
()()
][ebrowse-ts [ebrowse-cs "CMyBtnDlg" () 0"MyBtnDlg.h" "class CMyBtnDlg :" 665() ]
()([ebrowse-ms "m_AlignRect" () 0 () "	CRect m_AlignRect;" 1294 0  () () 0]
[ebrowse-ms "m_BtnListArray" () 0 () "	CBtnList m_BtnListArray[ListCount];" 1496 0  () () 0]
[ebrowse-ms "m_CellRectArray" () 0 () "	CCellRect m_CellRectArray[CellCount];" 1249 0  () () 0]
[ebrowse-ms "m_FullDlgRect" () 0 () "	CRect m_FullDlgRect;" 1337 0  () () 0]
[ebrowse-ms "m_TabCell" () 0 () "	CMyTabCtrl	m_TabCell;" 1839 0  () () 0]
[ebrowse-ms "m_TabList" () 0 () "	CMyTabCtrl	m_TabList;" 1816 0  () () 0]
[ebrowse-ms "m_bCellMode" () 0 () "	BOOL	m_bCellMode;" 1858 0  () () 0]
[ebrowse-ms "m_bHideDeact" () 0 () "	BOOL	m_bHideDeact;" 1894 0  () () 0]
[ebrowse-ms "m_bLarge" () 0 () "	BOOL m_bLarge;" 1354 0  () () 0]
[ebrowse-ms "m_bPutty" () 0 () "	BOOL	m_bPutty;" 1874 0  () () 0]
[ebrowse-ms "m_hIcon" () 0 () "	HICON m_hIcon;" 2134 1  () () 0]
[ebrowse-ms "m_iAlignStyle" () 0 () "	int m_iAlignStyle;" 726 0  () () 0]
[ebrowse-ms "m_kAlignWin" () 0 () "	ATOM m_kAlignWin;" 1610 0  () () 0]
[ebrowse-ms "m_kBringMe" () 0 () "	ATOM m_kBringMe;" 1571 0  () () 0]
[ebrowse-ms "m_kGetWindow" () 0 () "	ATOM m_kGetWindow;" 1553 0  () () 0]
[ebrowse-ms "m_kMinAll" () 0 () "	ATOM m_kMinAll;" 1665 0  () () 0]
[ebrowse-ms "m_kNextPage" () 0 () "	ATOM m_kNextPage;" 1629 0  () () 0]
[ebrowse-ms "m_kPrevPage" () 0 () "	ATOM m_kPrevPage;" 1648 0  () () 0]
[ebrowse-ms "m_kShowGroup" () 0 () "	ATOM m_kShowGroup;" 1591 0  () () 0]
[ebrowse-ms "m_menuCell" () 0 () "	CMenu m_menuCell;" 1374 0  () () 0]
[ebrowse-ms "m_orgCursor" () 0 () "	HCURSOR m_orgCursor;" 1396 0  () () 0]
[ebrowse-ms "m_pCurBtnList" () 0 () "	CBtnList *m_pCurBtnList;" 1522 0  () () 0]
[ebrowse-ms "m_pCurCell" () 0 () "	CCellRect *m_pCurCell;" 1273 0  () () 0]
[ebrowse-ms "m_rCellSmall" () 0 () "	CRect m_rCellSmall;" 1315 0  () () 0]
[ebrowse-ms "m_trayIcon" () 0 () "	NOTIFYICONDATA m_trayIcon;" 1694 0  () () 0]
)
([ebrowse-ms "AddButton" () 0 () "	CWnd * AddButton(HWND" 879 0  () () 0]
[ebrowse-ms "AddToCell" () 0 () "	void AddToCell(HWND" 1018 0  () () 0]
[ebrowse-ms "AddToCell" () 0 () "	void AddToCell(HWND" 990 0  () () 0]
[ebrowse-ms "CMyBtnDlg" () 0 () "	CMyBtnDlg(CWnd* pParent = NULL);" 1121 0  () () 0]
[ebrowse-ms "DECLARE_MESSAGE_MAP" () 0 () "	DECLARE_MESSAGE_MAP()" 3866 1  () () 0]
[ebrowse-ms "DelButton" () 0 () "	BOOL DelButton(CMyButton" 752 0  () () 0]
[ebrowse-ms "DelFromCell" () 0 () "	BOOL DelFromCell(HWND" 849 0  () () 0]
[ebrowse-ms "DoDataExchange" () 1 () "	virtual void DoDataExchange(CDataExchange" 2045 1  () () 0]
[ebrowse-ms "HideAll" () 0 () "	void HideAll()" 924 0  () () 0]
[ebrowse-ms "OnActivate" () 0 () "	LRESULT OnActivate(WPARAM" 3818 1  () () 0]
[ebrowse-ms "OnButton4" () 0 () "	afx_msg void OnButton4()" 2475 1  () () 0]
[ebrowse-ms "OnButtonExtShort" () 0 () "	afx_msg void OnButtonExtShort()" 2634 1  () () 0]
[ebrowse-ms "OnButtonMinAll" () 0 () "	afx_msg void OnButtonMinAll()" 2567 1  () () 0]
[ebrowse-ms "OnButtonShowAll" () 0 () "	afx_msg void OnButtonShowAll()" 2535 1  () () 0]
[ebrowse-ms "OnButtonalignme" () 0 () "	afx_msg void OnButtonalignme()" 2600 1  () () 0]
[ebrowse-ms "OnButtonminme" () 0 () "	afx_msg void OnButtonminme()" 2736 1  () () 0]
[ebrowse-ms "OnButtonshowalign" () 0 () "	afx_msg void OnButtonshowalign()" 2669 1  () () 0]
[ebrowse-ms "OnButtonshowalign2" () 0 () "	afx_msg void OnButtonshowalign2()" 2705 1  () () 0]
[ebrowse-ms "OnCHECKCellMode" () 0 () "	afx_msg void OnCHECKCellMode()" 2827 1  () () 0]
[ebrowse-ms "OnCHECKHideDeact" () 0 () "	afx_msg void OnCHECKHideDeact()" 3236 1  () () 0]
[ebrowse-ms "OnCHECKPutty" () 0 () "	afx_msg void OnCHECKPutty()" 2857 1  () () 0]
[ebrowse-ms "OnCreate" () 0 () "	afx_msg int OnCreate(LPCREATESTRUCT" 2951 1  () () 0]
[ebrowse-ms "OnDestroy" () 0 () "	afx_msg void OnDestroy()" 2502 1  () () 0]
[ebrowse-ms "OnHotKey" () 0 () "	LRESULT OnHotKey(WPARAM" 3598 1  () () 0]
[ebrowse-ms "OnInitDialog" () 1 () "	virtual BOOL OnInitDialog()" 2224 1  () () 0]
[ebrowse-ms "OnLButtonDblClk" () 0 () "	afx_msg void OnLButtonDblClk(UINT" 2772 1  () () 0]
[ebrowse-ms "OnLButtonDown" () 0 () "	afx_msg void OnLButtonDown(UINT" 2372 1  () () 0]
[ebrowse-ms "OnLButtonUp" () 0 () "	afx_msg void OnLButtonUp(UINT" 2426 1  () () 0]
[ebrowse-ms "OnMBtnDown" () 0 () "	LRESULT OnMBtnDown(WPARAM" 3648 1  () () 0]
[ebrowse-ms "OnMENUITEMAddButton" () 0 () "	afx_msg void OnMENUITEMAddButton()" 3054 1  () () 0]
[ebrowse-ms "OnMENUITEMAlignButtons" () 0 () "	afx_msg void OnMENUITEMAlignButtons()" 3132 1  () () 0]
[ebrowse-ms "OnMENUITEMAlignWin" () 0 () "	afx_msg void OnMENUITEMAlignWin()" 3168 1  () () 0]
[ebrowse-ms "OnMENUITEMChangeName" () 0 () "	afx_msg void OnMENUITEMChangeName()" 3092 1  () () 0]
[ebrowse-ms "OnMENUITEMRemove" () 0 () "	afx_msg void OnMENUITEMRemove()" 3202 1  () () 0]
[ebrowse-ms "OnMENUITEMShowBehind" () 0 () "	afx_msg void OnMENUITEMShowBehind()" 3314 1  () () 0]
[ebrowse-ms "OnMenuitemAdjustWinPos" () 0 () "	afx_msg void OnMenuitemAdjustWinPos()" 3276 1  () () 0]
[ebrowse-ms "OnMyButtonUp" () 0 () "	void OnMyButtonUp(UINT" 785 0  () () 0]
[ebrowse-ms "OnPaint" () 0 () "	afx_msg void OnPaint()" 2302 1  () () 0]
[ebrowse-ms "OnQueryDragIcon" () 0 () "	afx_msg HCURSOR OnQueryDragIcon()" 2338 1  () () 0]
[ebrowse-ms "OnRADIOAlignStyle1" () 0 () "	afx_msg void OnRADIOAlignStyle1()" 3484 1  () () 0]
[ebrowse-ms "OnRADIOAlignStyle2" () 0 () "	afx_msg void OnRADIOAlignStyle2()" 3520 1  () () 0]
[ebrowse-ms "OnRADIOAlignStyle3" () 0 () "	afx_msg void OnRADIOAlignStyle3()" 3556 1  () () 0]
[ebrowse-ms "OnRButtonDown" () 0 () "	afx_msg void OnRButtonDown(UINT" 2891 1  () () 0]
[ebrowse-ms "OnSelchangeTABCell" () 0 () "	afx_msg void OnSelchangeTABCell(NMHDR" 3421 1  () () 0]
[ebrowse-ms "OnSelchangeTABList" () 0 () "	afx_msg void OnSelchangeTABList(NMHDR" 3354 1  () () 0]
[ebrowse-ms "OnSize" () 0 () "	afx_msg void OnSize(UINT" 2994 1  () () 0]
[ebrowse-ms "OnSysCommand" () 0 () "	afx_msg void OnSysCommand(UINT" 2257 1  () () 0]
[ebrowse-ms "OnTaskBarCreated" () 0 () "	LRESULT OnTaskBarCreated(WPARAM" 3770 1  () () 0]
[ebrowse-ms "OnTrayNotify" () 0 () "	LRESULT OnTrayNotify(WPARAM" 3713 1  () () 0]
[ebrowse-ms "PreTranslateMessage" () 0 () "	BOOL PreTranslateMessage(MSG" 1097 0  () () 0]
[ebrowse-ms "ShowAll" () 0 () "	void ShowAll()" 941 0  () () 0]
)
()
()
()
()
()()
])()
()
()
()
()
()
()()
][ebrowse-ts [ebrowse-cs "*Globals*" () 0() () 0"MyBtnDlg.h" ]
()([ebrowse-ms "CellCount" () 0 () () 0 0  () "const int CellCount = 5;" 621]
[ebrowse-ms "ListCount" () 0 () () 0 0  () "const int ListCount = 5;" 646]
[ebrowse-ms "spare_in_bottom" () 0 () () 0 0  "MyBtnDlg.cpp" "const int spare_in_bottom =3;" 386]
[ebrowse-ms "spare_in_right" () 0 () () 0 0  "MyBtnDlg.cpp" "const int spare_in_right = 3;" 416]
[ebrowse-ms "sysbar_len" () 0 () () 0 0  "MyBtnDlg.cpp" "int sysbar_len;" 356]
)
()
([ebrowse-ms "THIS_FILE" () 0 () () 0 0  "MyBtnDlg.cpp" "static char THIS_FILE[] = __FILE__;" 192]
)
()
([ebrowse-ms "AFX_MYBTNDLG_H__529A1F28_E203_4623_AD8D_E190334CF60D__INCLUDED_" () 512 () () 0 0  () "529A1F28_E203_4623_AD8D_E190334CF60D__INCLUDED_
" 182]
[ebrowse-ms "MAINTRAYICON" () 512 () () 0 0  () "#define MAINTRAYICON	" 591]
[ebrowse-ms "WM_TRAYICON" () 512 () () 0 0  () "#define	WM_TRAYICON	" 558]
[ebrowse-ms "new" () 512 () () 0 0  "MyBtnDlg.cpp" "#define new " 130]
)
()
()()
]

[-- Attachment #4: MyBtnDlg.h --]
[-- Type: application/octet-stream, Size: 4250 bytes --]

// MyBtnDlg.h : header file
//

#if !defined(AFX_MYBTNDLG_H__529A1F28_E203_4623_AD8D_E190334CF60D__INCLUDED_)
#define AFX_MYBTNDLG_H__529A1F28_E203_4623_AD8D_E190334CF60D__INCLUDED_

#include "BtnList.h"	// Added by ClassView
#include "MyBtn.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CMyBtnDlg dialog

#include "MyButton.h"
#include "InputDlg.h"
#include "CellRect.h"	// Added by ClassView
#include "MyTabCtrl.h"

#define	WM_TRAYICON		WM_USER+1

#define MAINTRAYICON	1234

const int CellCount = 5;
const int ListCount = 5;

class CMyBtnDlg : public CDialog
{
// Construction
public:
	int m_iAlignStyle;
	BOOL DelButton(CMyButton * pBtn);
	void OnMyButtonUp(UINT nFlags, CPoint point, CMyButton * pBtn);
	BOOL DelFromCell(HWND hWnd);
	CWnd * AddButton(HWND hWnd, CPoint point = NULL);

	void HideAll();
	void ShowAll();

	//Interface to CMyButton
	void AddToCell(HWND hWnd);
	void AddToCell(HWND hWnd, int row, int col);



	//void OnCancel( );
	BOOL PreTranslateMessage(MSG* pMsg);
	CMyBtnDlg(CWnd* pParent = NULL);	// standard constructor


	//Cell Rect Object
	//CCellRect m_CellRect;
	CCellRect m_CellRectArray[CellCount];
	CCellRect *m_pCurCell;

	CRect m_AlignRect;
	CRect m_rCellSmall;
	CRect m_FullDlgRect;

	BOOL m_bLarge;

	CMenu m_menuCell;
	HCURSOR m_orgCursor;


	//Button List
	//CObList m_BtnList;
	//CBtnList m_oBtnList;
	CBtnList m_BtnListArray[ListCount];
	CBtnList *m_pCurBtnList;

	//HotKey
	ATOM m_kGetWindow;
	ATOM m_kBringMe;
	ATOM m_kShowGroup;
	ATOM m_kAlignWin;
	ATOM m_kNextPage;
	ATOM m_kPrevPage;
	ATOM m_kMinAll;

	NOTIFYICONDATA m_trayIcon;
	//CMenu m_menuTray;




// Dialog Data
	//{{AFX_DATA(CMyBtnDlg)
	enum { IDD = IDD_MYBTN_DIALOG };
	CMyTabCtrl	m_TabList;
	CMyTabCtrl	m_TabCell;
	BOOL	m_bCellMode;
	BOOL	m_bPutty;
	BOOL	m_bHideDeact;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMyBtnDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CMyBtnDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnButton4();
	afx_msg void OnDestroy();
	afx_msg void OnButtonShowAll();
	afx_msg void OnButtonMinAll();
	afx_msg void OnButtonalignme();
	afx_msg void OnButtonExtShort();
	afx_msg void OnButtonshowalign();
	afx_msg void OnButtonshowalign2();
	afx_msg void OnButtonminme();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnCHECKCellMode();
	afx_msg void OnCHECKPutty();
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnMENUITEMAddButton();
	afx_msg void OnMENUITEMChangeName();
	afx_msg void OnMENUITEMAlignButtons();
	afx_msg void OnMENUITEMAlignWin();
	afx_msg void OnMENUITEMRemove();
	afx_msg void OnCHECKHideDeact();
	afx_msg void OnMenuitemAdjustWinPos();
	afx_msg void OnMENUITEMShowBehind();
	afx_msg void OnSelchangeTABList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSelchangeTABCell(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRADIOAlignStyle1();
	afx_msg void OnRADIOAlignStyle2();
	afx_msg void OnRADIOAlignStyle3();
	//}}AFX_MSG



	LRESULT OnHotKey(WPARAM wParam,LPARAM lParam);
	LRESULT OnMBtnDown(WPARAM wParam,LPARAM lParam);

	//TrayIcon
	LRESULT OnTrayNotify(WPARAM wParam, LPARAM lParam);
	LRESULT OnTaskBarCreated(WPARAM wp, LPARAM lp);

	//
	LRESULT OnActivate(WPARAM wParam, LPARAM lParam);

	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MYBTNDLG_H__529A1F28_E203_4623_AD8D_E190334CF60D__INCLUDED_)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-21 12:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-25 20:19 ebrowse problem scianagoryczy
  -- strict thread matches above, loose matches on Subject: below --
2008-04-21 12:12 brianjiang

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.