|
Hi all,
I have implemented Context Menu Extension on my namespace icon by implementing IContextMenu inteface. I have added 5 custom menus. This works fine for Win2k but I only see the first of this menus if I test it on Win XP. Can anyone tell me what is going wrong here?
Thanks and Regards,
Anil
|
|
|
|
|
Anil_vvs wrote: This works fine for Win2k but I only see the first of this menus if I test it on Win XP. Can anyone tell me what is going wrong here?
Buddy, that impossible to tell witout seeing you source code!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
What I am doing is fairly straightforward.. inside the QueryContextMenu function of my implementation of IContextMenu interface I am passed the menu handle of the context menu thats displayed....I am calling InsertMenuItem with the passed menu handle and each of my menu Items....
I was wondering if there is a registry entry or something of that sort that has to be changed so that we get to see all the menus...
|
|
|
|
|
|
STDMETHODIMP MxSNEShellFolder::QueryContextMenu(HMENU hMenu, UINT uiIndexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
m_hMenu = hMenu;
m_idCmdFirst = uiIndexMenu;
m_id = idCmdFirst;
if (CMF_DEFAULTONLY & uFlags)
return MAKE_HRESULT(SEVERITY_SUCCESS,FACILITY_NULL,0);
int i = uiIndexMenu;
MxSNECmdMgr cmdMgr;
try
{
if(!cmdMgr.IsConnectedFromShell())
{
MENUITEMINFO mii = { 0 };
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
mii.wID = idCmdFirst + ID_CONNECT;
mii.fType = MFT_STRING;
mii.dwTypeData = _T("Menu1");
mii.fState = MFS_ENABLED;
InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii);
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
mii.wID = idCmdFirst + ID_SEARCH;
mii.fType = MFT_STRING;
mii.dwTypeData = _T("Menu2");
mii.fState = MFS_DISABLED;
InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii);
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
mii.wID = idCmdFirst + ID_CREATEUSINGTEMPLATE;
mii.fType = MFT_STRING;
mii.dwTypeData = _T("Menu3");
mii.fState = MFS_DISABLED;
InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii);
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
mii.wID = idCmdFirst + ID_DISCONNECT;
mii.fType = MFT_STRING;
mii.dwTypeData = _T("Menu4");
mii.fState = MFS_DISABLED;
InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii);
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
mii.wID = idCmdFirst + ID_ABOUT;
mii.fType = MFT_STRING;
mii.dwTypeData = _T("Menu5");
mii.fState = MFS_ENABLED;
InsertMenuItem(hMenu, uiIndexMenu++, TRUE, &mii);
}
catch(...)
{
}
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(i-uiIndexMenu));
}
|
|
|
|
|
what is shared memory ??
Thanks in advance.
Regards,
Prashanth.v
|
|
|
|
|
The area that is shared between two or more processes is called Shared Memory.This helps in the interprocess communication where you want to allow changes made in all the instances of a single application .
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Normally each process has its own memory and data in processes A's memory can't be accessed in the memory of process B and vice versa. Shared memory is when the same physical memory is mapped into multiple processes. In our example this means that process A and B share some memory and thus the data in it is shared. Normally only a small amount of memory will be shared.
Steve
|
|
|
|
|
Hi Prashanth V,
Hw are u ??
Shared Memory is an efficeint means of passing data between programs. One program will create a memory portion which other processes (if permitted) can access.
|
|
|
|
|
ya, i'm fine.
how abt u vinay??
|
|
|
|
|
ya prashanth, if u fine i am also fine ....
take care bye ..happy coding..........
|
|
|
|
|
vinaycool wrote: ya prashanth, if u fine i am also fine ....take care bye ..happy coding..........
Can i join the party?!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Yes Alok Gupta ....U are welcome to party ...;)
|
|
|
|
|
http://www.codeproject.com/threads/loop_buffer_-_Linux_versi.asp
http://www.codeproject.com/threads/sm.asp
http://www.codeproject.com/threads/SharedMemory_IPC_Threads.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
i have nothing more than others to say about shared memory
See the below articles
http://www.codeproject.com/threads/SharedMemory_IPC_Threads.asp
http://www.garret.ru/~knizhnik/shmem/Readme.htm
-Sarath
|
|
|
|
|
Sarath C wrote: See the below articles
First Link of yours match with third link of mine
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
There used to be a C function that any programmer could use for allocating memory off the stack. The memory was automatically deallocated when the calling function returned. This was a dangerous function to call. it’s not available anymore.
What is he possibly talking about?? AnyIdea?
he=A C programmer.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
|
Got it.Thanks !!
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
VuNic wrote: Got it.Thanks !!
Is the coding in C itself or you can use C++ Classes there, if yes the try Auto_ptr
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks Alok!
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
The memory is deallocated automatically when program terminates
In case of java there is special garbage collecter for deallocation of the memory during run time
So its better that when you allocates memory inside the function then before returning allocated memory must deallocate.
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|
|
A_Laxman wrote: The memory is deallocated automatically when program terminates
A_Laxman wrote: So its better that when you allocates memory inside the function then before returning allocated memory must deallocate.
alloca doesn't require that.
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
A_Laxman wrote: In case of java there is special garbage collecter for deallocation of the memory during run time
Sorry for Sounding Rude, this is not JAVA forum and C++ doesn't have Inbuild Garbage Collector!
A_Laxman wrote: So its better that when you allocates memory inside the function then before returning allocated memory must deallocate.
Sometime its necessaey to allocate the Memory inside Function and Deallocated at Calling side, its wholly on design!.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Yaa Alok,
Agreed ,even C# also provides Garbage Collector
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
|
|
|
|