Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
GroupsMenu.cpp
Package: propgrid.zip [view]
Upload User: yangzi5763
Upload Date: 2007-01-02
Package Size: 239k
Code Size: 2k
Category:
ActiveX-DCOM-ATL
Development Platform:
Visual C++
- /************************************
- REVISION LOG ENTRY
- Revision By: Mihai Filimon
- Revised on 12/4/98 1:51:42 PM
- Comments: GroupsMenu.cpp: implementation of the CGroupsMenu class.
- ************************************/
- #include "stdafx.h"
- #include "xpropertieswnd.h"
- #include "GroupsMenu.h"
- #include "PageListCtrlDesign.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- // Function name : CGroupsMenu::CGroupsMenu
- // Description :
- // Return type :
- CGroupsMenu::CGroupsMenu(CPageListCtrlDesign* pSourceList)
- {
- SetParent(pSourceList);
- }
- // Function name : CGroupsMenu::~CGroupsMenu
- // Description :
- // Return type :
- CGroupsMenu::~CGroupsMenu()
- {
- }
- // Function name : CGroupsMenu::SetParent
- // Description : Set a responsabile!
- // Return type : void
- // Argument : CPageListCtrlDesign* pSourceList
- void CGroupsMenu::SetParent(CPageListCtrlDesign* pSourceList)
- {
- m_pSourceList = pSourceList;
- }
- // Function name : CGroupsMenu::Add2Menu
- // Description : Append all item
- // Return type : void
- // Argument : CMenu *pMenu
- void CGroupsMenu::Add2Menu(CMenu *pMenu)
- {
- ASSERT (m_pSourceList && ::IsWindow(m_pSourceList->m_hWnd));
- int iItem = NULL;
- if (LPCTSTR lpszGroup = m_pSourceList->GetFirstGroupName(iItem))
- {
- DestroyMenu();
- m_mapIDs.RemoveAll();
- if (CreateMenu())
- {
- UINT idCommand = m_pSourceList->GetFirstIDFree();
- AppendMenu(MF_STRING, idCommand++ , _T(""));
- while (lpszGroup)
- {
- m_mapIDs[idCommand] = iItem;
- AppendMenu(MF_STRING, idCommand++ , lpszGroup);
- lpszGroup = m_pSourceList->GetNextGroupName(iItem);
- }
- pMenu->AppendMenu(MF_POPUP, (UINT)m_hMenu, _T("Groups"));
- }
- }
- }
- // Function name : CGroupsMenu::Get
- // Description : get the name of idCommand
- // Return type : CString
- // Argument : UINT idCommand
- int CGroupsMenu::Get(UINT idCommand)
- {
- int vValue = NULL;
- if (idCommand == m_pSourceList->GetFirstIDFree())
- return -1;
- if (m_mapIDs.Lookup(idCommand, vValue))
- return vValue;
- return -2;
- }