m_iconY = height;
}
-BOOL BCMenu::AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT_PTR nID,
int nIconNormal)
{
USES_CONVERSION;
}
-BOOL BCMenu::AppendODMenuW(const wchar_t *lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::AppendODMenuW(const wchar_t *lpstrText,UINT nFlags,UINT_PTR nID,
int nIconNormal)
{
// Add the MF_OWNERDRAW flag if not specified:
return(returnflag);
}
-BOOL BCMenu::AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT_PTR nID,
CImageList *il,int xoffset)
{
USES_CONVERSION;
return AppendODMenuW(A2W(lpstrText),nFlags,nID,il,xoffset);
}
-BOOL BCMenu::AppendODMenuW(const wchar_t *lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::AppendODMenuW(const wchar_t *lpstrText,UINT nFlags,UINT_PTR nID,
CImageList *il,int xoffset)
{
// Add the MF_OWNERDRAW flag if not specified:
return(CMenu::AppendMenu(nFlags, nID, (LPCTSTR)mdata));
}
-BOOL BCMenu::InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT_PTR nID,
int nIconNormal)
{
USES_CONVERSION;
}
-BOOL BCMenu::InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT_PTR nID,
int nIconNormal)
{
if(!(nFlags & MF_BYPOSITION)){
UINT iPosition =0;
BCMenu* pMenu = FindMenuOption(nPosition,iPosition);
if(pMenu){
- return(pMenu->InsertODMenuW((UINT)iPosition,lpstrText,nFlags|MF_BYPOSITION,nID,nIconNormal));
+ return(pMenu->InsertODMenuW(iPosition,lpstrText,nFlags|MF_BYPOSITION,nID,nIconNormal));
}
else return(FALSE);
}
return(returnflag);
}
-BOOL BCMenu::InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT_PTR nID,
CImageList *il,int xoffset)
{
USES_CONVERSION;
return InsertODMenuW(nPosition,A2W(lpstrText),nFlags,nID,il,xoffset);
}
-BOOL BCMenu::InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT nID,
+BOOL BCMenu::InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT_PTR nID,
CImageList *il,int xoffset)
{
if(!(nFlags & MF_BYPOSITION)){
UINT iPosition =0;
BCMenu* pMenu = FindMenuOption(nPosition,iPosition);
if(pMenu){
- return(pMenu->InsertODMenuW((UINT)iPosition,lpstrText,nFlags|MF_BYPOSITION,nID,il,xoffset));
+ return(pMenu->InsertODMenuW(iPosition,lpstrText,nFlags|MF_BYPOSITION,nID,il,xoffset));
}
else return(FALSE);
}
return(CMenu::InsertMenu(nPosition,nFlags,nID,(LPCTSTR)mdata));
}
-BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT nID,int nIconNormal)
+BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT_PTR nID,int nIconNormal)
{
USES_CONVERSION;
return ModifyODMenuW(A2W(lpstrText),nID,nIconNormal);//SK: see MFC Tech Note 059
}
-BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT nID,int nIconNormal)
+BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID,int nIconNormal)
{
UINT nLoc;
BCMenuData *mdata;
return (CMenu::ModifyMenu(nID,mdata->nFlags,nID,(LPCTSTR)mdata));
}
-BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT nID,CImageList *il,int xoffset)
+BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT_PTR nID,CImageList *il,int xoffset)
{
USES_CONVERSION;
return ModifyODMenuW(A2W(lpstrText),nID,il,xoffset);
}
-BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT nID,CImageList *il,int xoffset)
+BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID,CImageList *il,int xoffset)
{
UINT nLoc;
BCMenuData *mdata;
return (CMenu::ModifyMenu(nID,mdata->nFlags,nID,(LPCTSTR)mdata));
}
-BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT nID,CBitmap *bmp)
+BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT_PTR nID,CBitmap *bmp)
{
USES_CONVERSION;
return ModifyODMenuW(A2W(lpstrText),nID,bmp);
}
-BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT nID,CBitmap *bmp)
+BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID,CBitmap *bmp)
{
if(bmp){
CImageList temp;
}
// courtesy of Warren Stevens
-BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT nID,COLORREF fill,COLORREF border,int hatchstyle,CSize *pSize)
+BOOL BCMenu::ModifyODMenuA(const char * lpstrText,UINT_PTR nID,COLORREF fill,COLORREF border,int hatchstyle,CSize *pSize)
{
USES_CONVERSION;
return ModifyODMenuW(A2W(lpstrText),nID,fill,border,hatchstyle,pSize);
}
-BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT nID,COLORREF fill,COLORREF border,int hatchstyle,CSize *pSize)
+BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID,COLORREF fill,COLORREF border,int hatchstyle,CSize *pSize)
{
CWnd *pWnd = AfxGetMainWnd(); // Get main window
CDC *pDC = pWnd->GetDC(); // Get device context
}
-BCMenuData *BCMenu::NewODMenu(UINT pos,UINT nFlags,UINT nID,CString string)
+BCMenuData *BCMenu::NewODMenu(UINT pos,UINT nFlags,UINT_PTR nID,CString string)
{
BCMenuData *mdata;
}
// O.S.
-BCMenuData *BCMenu::FindMenuItem(UINT nID)
+BCMenuData *BCMenu::FindMenuItem(UINT_PTR nID)
{
BCMenuData *pData = NULL;
int i;
BCMenu *psubmenu,*pgoodmenu;
BOOL foundflag;
- for(i=0;i<(int)(GetMenuItemCount());++i){
+ for(i=0;i<GetMenuItemCount();++i){
#ifdef _CPPRTTI
psubmenu=dynamic_cast<BCMenu *>(GetSubMenu(i));
#else
pgoodmenu=psubmenu->FindAnotherMenuOption(nId,nLoc,bcsubs,bclocs);
if(pgoodmenu)return(pgoodmenu);
}
- else if(nId==(int)GetMenuItemID((int)i)){
- INT_PTR numsubs=(UINT)bcsubs.GetSize();
+ else if(nId==(int)GetMenuItemID(i)){
+ INT_PTR numsubs=bcsubs.GetSize();
foundflag=TRUE;
for(j=0;j<numsubs;++j){
if(bcsubs[j]==this&&bclocs[j]==i){
BCMenu *psubmenu;
BCMenuData *pmenulist;
- for(i=0;i<(int)(GetMenuItemCount());++i){
+ for(i=0;i<GetMenuItemCount();++i){
#ifdef _CPPRTTI
psubmenu=dynamic_cast<BCMenu *>(GetSubMenu(i));
#else
// Append it to the top of the stack:
m_Stack[m_Stack.GetUpperBound()]->AppendODMenuW(szCaption,uFlags,
- (UINT)pSubMenu->m_hMenu, -1);
+ (UINT_PTR)pSubMenu->m_hMenu, -1);
m_Stack.Add(pSubMenu);
m_StackEnd.Add(FALSE);
}
delete[] szCaption;
}while(m_Stack.GetUpperBound() != -1);
- for(int i=0;i<(int)GetMenuItemCount();++i){
+ for(int i=0;i<GetMenuItemCount();++i){
CString str=m_MenuList[i]->GetString();
if(GetSubMenu(i)){
m_MenuList[i]->nFlags=MF_POPUP|MF_BYPOSITION;
ModifyMenu(i,MF_POPUP|MF_BYPOSITION,
- (UINT)GetSubMenu(i)->m_hMenu,str);
+ (UINT_PTR)GetSubMenu(i)->m_hMenu,str);
}
else{
m_MenuList[i]->nFlags=MF_STRING|MF_BYPOSITION;
INT_PTR nummenulist=m_MenuList.GetSize();
int menustart=GetMenuStart();
- for(i=menustart,j=0;i<(int)GetMenuItemCount();++i,++j){
+ for(i=menustart,j=0;i<GetMenuItemCount();++i,++j){
if(j<nummenulist){
str=m_MenuList[j]->GetString();
if(GetSubMenu(i)){
m_MenuList[j]->nFlags=MF_POPUP|MF_BYPOSITION;
ModifyMenu(i,MF_POPUP|MF_BYPOSITION,
- (UINT)GetSubMenu(i)->m_hMenu,str);
+ (UINT_PTR)GetSubMenu(i)->m_hMenu,str);
}
}
}
void BCMenu::InsertSpaces(void)
{
- if(IsLunaMenuStyle())
+ if(IsLunaMenuStyle()) // fix from http://www.viva64.com/en/examples-v563/
+ {
if(!xp_space_accelerators)return;
+ }
else
+ {
if(!original_space_accelerators)return;
+ }
int i,j,numitems,maxlength;
CString string,newstring;
m_penBack.DeleteObject();
}
-BCMenuData *BCMenu::FindMenuList(UINT nID)
+BCMenuData *BCMenu::FindMenuList(UINT_PTR nID)
{
for(int i=0;i<=m_MenuList.GetUpperBound();++i){
if(m_MenuList[i]->nID==nID && !m_MenuList[i]->syncflag){
CTypedPtrArray<CPtrArray, BCMenuData*> temp;
BCMenuData *mdata;
CString string;
- UINT submenu,nID=0,state,j;
+ UINT_PTR submenu,nID=0;
+ UINT state,j;
InitializeMenuList(0);
for(j=0;j<GetMenuItemCount();++j){
mdata=NULL;
state=GetMenuState(j,MF_BYPOSITION);
if(state&MF_POPUP){
- submenu=(UINT)GetSubMenu(j)->m_hMenu;
+ submenu=(UINT_PTR)GetSubMenu(j)->m_hMenu;
mdata=FindMenuList(submenu);
GetMenuString(j,string,MF_BYPOSITION);
if(!mdata)mdata=NewODMenu(j,
key.SetAt(1,(TCHAR)nChar);
key.MakeLower();
CString menutext;
- int menusize = (int)pBCMenu->GetMenuItemCount();
+ int menusize = pBCMenu->GetMenuItemCount();
if(menusize!=(pBCMenu->m_MenuList.GetUpperBound()+1))
pBCMenu->SynchronizeMenu();
for(int i=0;i<menusize;++i){
int i=0;
for(i=num-1;i>=0;--i)pSubMenu->RemoveMenu(i,MF_BYPOSITION);
for(i=(int)m_MenuList.GetUpperBound();i>=0;i--){
- if(m_MenuList[i]->nID==(int)pSubMenu->m_hMenu){
+ if(m_MenuList[i]->nID==(UINT_PTR)pSubMenu->m_hMenu){
delete m_MenuList.GetAt(i);
m_MenuList.RemoveAt(i);
break;
INT_PTR i=0;
for(i=num-1;i>=0;--i)pSubMenu->DeleteMenu(i,MF_BYPOSITION);
for(i=m_MenuList.GetUpperBound();i>=0;i--){
- if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu){
+ if(m_MenuList[i]->nID==(UINT_PTR)pSubMenu->m_hMenu){
delete m_MenuList.GetAt(i);
m_MenuList.RemoveAt(i);
break;
}
-BOOL BCMenu::AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,int nIconNormal)
+BOOL BCMenu::AppendMenuA(UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,int nIconNormal)
{
USES_CONVERSION;
return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),nIconNormal);
}
-BOOL BCMenu::AppendMenuW(UINT nFlags,UINT nIDNewItem,const wchar_t *lpszNewItem,int nIconNormal)
+BOOL BCMenu::AppendMenuW(UINT nFlags,UINT_PTR nIDNewItem,const wchar_t *lpszNewItem,int nIconNormal)
{
return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,nIconNormal);
}
-BOOL BCMenu::AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset)
+BOOL BCMenu::AppendMenuA(UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset)
{
USES_CONVERSION;
return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),il,xoffset);
}
-BOOL BCMenu::AppendMenuW(UINT nFlags,UINT nIDNewItem,const wchar_t *lpszNewItem,CImageList *il,int xoffset)
+BOOL BCMenu::AppendMenuW(UINT nFlags,UINT_PTR nIDNewItem,const wchar_t *lpszNewItem,CImageList *il,int xoffset)
{
return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,il,xoffset);
}
-BOOL BCMenu::AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp)
+BOOL BCMenu::AppendMenuA(UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CBitmap *bmp)
{
USES_CONVERSION;
return AppendMenuW(nFlags,nIDNewItem,A2W(lpszNewItem),bmp);
}
-BOOL BCMenu::AppendMenuW(UINT nFlags,UINT nIDNewItem,const wchar_t *lpszNewItem,CBitmap *bmp)
+BOOL BCMenu::AppendMenuW(UINT nFlags,UINT_PTR nIDNewItem,const wchar_t *lpszNewItem,CBitmap *bmp)
{
if(bmp){
CImageList temp;
return AppendODMenuW(lpszNewItem,nFlags,nIDNewItem,NULL,0);
}
-BOOL BCMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,int nIconNormal)
+BOOL BCMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,int nIconNormal)
{
USES_CONVERSION;
return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),nIconNormal);
}
-BOOL BCMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,int nIconNormal)
+BOOL BCMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,wchar_t *lpszNewItem,int nIconNormal)
{
return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,nIconNormal);
}
-BOOL BCMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset)
+BOOL BCMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset)
{
USES_CONVERSION;
return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),il,xoffset);
}
-BOOL BCMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset)
+BOOL BCMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset)
{
return InsertODMenuW(nPosition,lpszNewItem,nFlags,nIDNewItem,il,xoffset);
}
-BOOL BCMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp)
+BOOL BCMenu::InsertMenuA(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CBitmap *bmp)
{
USES_CONVERSION;
return InsertMenuW(nPosition,nFlags,nIDNewItem,A2W(lpszNewItem),bmp);
}
-BOOL BCMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp)
+BOOL BCMenu::InsertMenuW(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp)
{
if(bmp){
CImageList temp;
pSubMenu->checkmaps=checkmaps;
pSubMenu->checkmapsshare=TRUE;
pSubMenu->CreatePopupMenu();
- AppendODMenuW(lpstrText,MF_POPUP,(UINT)pSubMenu->m_hMenu, -1);
+ AppendODMenuW(lpstrText,MF_POPUP,(UINT_PTR)pSubMenu->m_hMenu, -1);
return pSubMenu;
}
{
int i,j;
BCMenu* psubmenu;
- for(i=0;i<(int)(GetMenuItemCount());++i)
+ for(i=0;i<GetMenuItemCount();++i)
{
psubmenu=(BCMenu *)GetSubMenu(i);
if(!psubmenu)
{
// Normal menu item
- // Read the sorurce and append at the destination
+ // Read the source and append at the destination
UINT nState = pMenuToAdd->GetMenuState( iLoop, MF_BYPOSITION );
UINT nItemID = pMenuToAdd->GetMenuItemID( iLoop );
CString GetString(void);//returns the menu text in ANSI or UNICODE
INT_PTR xoffset,global_offset;
int menuIconNormal;
- UINT nFlags,nID,syncflag;
+ UINT nFlags,syncflag;
+ UINT_PTR nID;
CImageList *bitmap;
void *pContext; // used to attach user data
};
void LoadCheckmarkBitmap(int unselect,int select); // custom check mark bitmaps
// functions for appending a menu option, use the AppendMenu call (see above define)
- BOOL AppendMenuA(UINT nFlags,UINT nIDNewItem=0,const char *lpszNewItem=NULL,int nIconNormal=-1);
- BOOL AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset);
- BOOL AppendMenuA(UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp);
- BOOL AppendMenuW(UINT nFlags,UINT nIDNewItem=0,const wchar_t *lpszNewItem=NULL,int nIconNormal=-1);
- BOOL AppendMenuW(UINT nFlags,UINT nIDNewItem,const wchar_t *lpszNewItem,CImageList *il,int xoffset);
- BOOL AppendMenuW(UINT nFlags,UINT nIDNewItem,const wchar_t *lpszNewItem,CBitmap *bmp);
- BOOL AppendODMenuA(LPCSTR lpstrText,UINT nFlags = MF_OWNERDRAW,UINT nID = 0,int nIconNormal = -1);
- BOOL AppendODMenuW(const wchar_t *lpstrText,UINT nFlags = MF_OWNERDRAW,UINT nID = 0,int nIconNormal = -1);
- BOOL AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT nID,CImageList *il,int xoffset);
- BOOL AppendODMenuW(const wchar_t *lpstrText,UINT nFlags,UINT nID,CImageList *il,int xoffset);
+ BOOL AppendMenuA(UINT nFlags,UINT_PTR nIDNewItem=0,const char *lpszNewItem=NULL,int nIconNormal=-1);
+ BOOL AppendMenuA(UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset);
+ BOOL AppendMenuA(UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CBitmap *bmp);
+ BOOL AppendMenuW(UINT nFlags,UINT_PTR nIDNewItem=0,const wchar_t *lpszNewItem=NULL,int nIconNormal=-1);
+ BOOL AppendMenuW(UINT nFlags,UINT_PTR nIDNewItem,const wchar_t *lpszNewItem,CImageList *il,int xoffset);
+ BOOL AppendMenuW(UINT nFlags,UINT_PTR nIDNewItem,const wchar_t *lpszNewItem,CBitmap *bmp);
+ BOOL AppendODMenuA(LPCSTR lpstrText,UINT nFlags = MF_OWNERDRAW,UINT_PTR nID = 0,int nIconNormal = -1);
+ BOOL AppendODMenuW(const wchar_t *lpstrText,UINT nFlags = MF_OWNERDRAW,UINT_PTR nID = 0,int nIconNormal = -1);
+ BOOL AppendODMenuA(LPCSTR lpstrText,UINT nFlags,UINT_PTR nID,CImageList *il,int xoffset);
+ BOOL AppendODMenuW(const wchar_t *lpstrText,UINT nFlags,UINT_PTR nID,CImageList *il,int xoffset);
bool AppendMenu (BCMenu* pMenuToAdd, bool add_separator = true, int num_items_to_remove_at_end = 0);
// for appending a popup menu (see example application)
BCMenu* AppendODPopupMenuW(const wchar_t *lpstrText);
// functions for inserting a menu option, use the InsertMenu call (see above define)
- BOOL InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem=0,const char *lpszNewItem=NULL,int nIconNormal=-1);
- BOOL InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset);
- BOOL InsertMenuA(UINT nPosition,UINT nFlags,UINT nIDNewItem,const char *lpszNewItem,CBitmap *bmp);
- BOOL InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem=0,wchar_t *lpszNewItem=NULL,int nIconNormal=-1);
- BOOL InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset);
- BOOL InsertMenuW(UINT nPosition,UINT nFlags,UINT nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp);
- BOOL InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags = MF_OWNERDRAW,UINT nID = 0,int nIconNormal = -1);
- BOOL InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags = MF_OWNERDRAW,UINT nID = 0,int nIconNormal = -1);
- BOOL InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT nID,CImageList *il,int xoffset);
- BOOL InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT nID,CImageList *il,int xoffset);
+ BOOL InsertMenuA(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem=0,const char *lpszNewItem=NULL,int nIconNormal=-1);
+ BOOL InsertMenuA(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CImageList *il,int xoffset);
+ BOOL InsertMenuA(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,const char *lpszNewItem,CBitmap *bmp);
+ BOOL InsertMenuW(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem=0,wchar_t *lpszNewItem=NULL,int nIconNormal=-1);
+ BOOL InsertMenuW(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,wchar_t *lpszNewItem,CImageList *il,int xoffset);
+ BOOL InsertMenuW(UINT nPosition,UINT nFlags,UINT_PTR nIDNewItem,wchar_t *lpszNewItem,CBitmap *bmp);
+ BOOL InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags = MF_OWNERDRAW,UINT_PTR nID = 0,int nIconNormal = -1);
+ BOOL InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags = MF_OWNERDRAW,UINT_PTR nID = 0,int nIconNormal = -1);
+ BOOL InsertODMenuA(UINT nPosition,LPCSTR lpstrText,UINT nFlags,UINT_PTR nID,CImageList *il,int xoffset);
+ BOOL InsertODMenuW(UINT nPosition,wchar_t *lpstrText,UINT nFlags,UINT_PTR nID,CImageList *il,int xoffset);
// functions for modifying a menu option, use the ModifyODMenu call (see above define)
- BOOL ModifyODMenuA(const char *lpstrText,UINT nID=0,int nIconNormal=-1);
- BOOL ModifyODMenuA(const char *lpstrText,UINT nID,CImageList *il,int xoffset);
- BOOL ModifyODMenuA(const char *lpstrText,UINT nID,CBitmap *bmp);
+ BOOL ModifyODMenuA(const char *lpstrText,UINT_PTR nID=0,int nIconNormal=-1);
+ BOOL ModifyODMenuA(const char *lpstrText,UINT_PTR nID,CImageList *il,int xoffset);
+ BOOL ModifyODMenuA(const char *lpstrText,UINT_PTR nID,CBitmap *bmp);
BOOL ModifyODMenuA(const char *lpstrText,const char *OptionText,int nIconNormal);
- BOOL ModifyODMenuW(wchar_t *lpstrText,UINT nID=0,int nIconNormal=-1);
- BOOL ModifyODMenuW(wchar_t *lpstrText,UINT nID,CImageList *il,int xoffset);
- BOOL ModifyODMenuW(wchar_t *lpstrText,UINT nID,CBitmap *bmp);
+ BOOL ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID=0,int nIconNormal=-1);
+ BOOL ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID,CImageList *il,int xoffset);
+ BOOL ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID,CBitmap *bmp);
BOOL ModifyODMenuW(wchar_t *lpstrText,wchar_t *OptionText,int nIconNormal);
BOOL SetImageForPopupFromToolbarA (const char *strPopUpText, UINT toolbarID, UINT command_id_to_extract_icon_from);
// use this method for adding a solid/hatched colored square beside a menu option
// courtesy of Warren Stevens
- BOOL ModifyODMenuA(const char *lpstrText,UINT nID,COLORREF fill,COLORREF border,int hatchstyle=-1,CSize *pSize=NULL);
- BOOL ModifyODMenuW(wchar_t *lpstrText,UINT nID,COLORREF fill,COLORREF border,int hatchstyle=-1,CSize *pSize=NULL);
+ BOOL ModifyODMenuA(const char *lpstrText,UINT_PTR nID,COLORREF fill,COLORREF border,int hatchstyle=-1,CSize *pSize=NULL);
+ BOOL ModifyODMenuW(wchar_t *lpstrText,UINT_PTR nID,COLORREF fill,COLORREF border,int hatchstyle=-1,CSize *pSize=NULL);
// for deleting and removing menu options
BOOL RemoveMenu(UINT uiId,UINT nFlags);
static BOOL IsWinXPLuna(void);
static BOOL IsLunaMenuStyle(void);
static BOOL IsWindowsClassicTheme(void);
- BCMenuData *BCMenu::FindMenuItem(UINT nID);
+ BCMenuData *BCMenu::FindMenuItem(UINT_PTR nID);
BCMenu *FindMenuOption(int nId,UINT& nLoc);
BCMenu *FindAnotherMenuOption(int nId,UINT& nLoc,CArray<BCMenu*,BCMenu*>&bcsubs,
CArray<UINT,UINT&>&bclocs);
void InsertSpaces(void);
void DrawCheckMark(CDC* pDC,int x,int y,COLORREF color,BOOL narrowflag=FALSE);
void DrawRadioDot(CDC *pDC,int x,int y,COLORREF color);
- BCMenuData *NewODMenu(UINT pos,UINT nFlags,UINT nID,CString string);
+ BCMenuData *NewODMenu(UINT pos,UINT nFlags,UINT_PTR nID,CString string);
void SynchronizeMenu(void);
void BCMenu::InitializeMenuList(int value);
void BCMenu::DeleteMenuList(void);
- BCMenuData *BCMenu::FindMenuList(UINT nID);
+ BCMenuData *BCMenu::FindMenuList(UINT_PTR nID);
void DrawItem_Win9xNT2000 (LPDRAWITEMSTRUCT lpDIS);
void DrawItem_WinXP (LPDRAWITEMSTRUCT lpDIS);
BOOL Draw3DCheckmark(CDC *dc, const CRect& rc,BOOL bSelected,HBITMAP hbmCheck);