|
Hello Selvam,
Thnks for the reply.
Yes i used uuidgen tool to get the guiid and changed in the IDL file..
The renamed DLL gets registered but it doesn;t work...the program just exits..
Pls help...
Thnks
Ram
|
|
|
|
|
I am not sure whether I posted at a very unfavourable time and my posting vanished behind several questions posted later - or if I did not make myself clear enough to be understood. I might even have violated some rule I am not aware of. Anyway, I will quote my previous post. If you have even the slightest idea how to fix this, please drop a few lines.
Thanks in advance
Quoted post:
"Hello everyone,
I've got quite some problems with programming a Context Menu Handler in
Visual C++ (6.0, SP5) under Windows 2000.
[...]
Until now, I only wrote basic C and some more advanced Java Code. A few
days ago, I received a new project:
I should create a context menu entry (submenu with 2 or more menu items). Selecting one of these entries should start the corresponding application.
I read several "Context Menu"-Pages until I found out that, in order to have a sub-menu, I would have to write a COM-DLL, a "context menu handler".
[...]
Reading on that topic in the MSDN did not help me much, as I have not programmed (in the?!) COM yet.
I then stumbled upon Michael Dunns "The Complete Idiot's Guide To Writing Shell Extensions" and downloaded his example projects.
Well, it did not work. The example projects were compiled (0 errors, 0 warnings), registered (regsvr32 dllname -> Registration Successful) and written into the registry (shellex->ContextMenuHandlers), mostly as scripted in the RGS-File of the project.
I tried several of the example projects, none worked. The context menu - even though the handler is registered for the filetype - does not change or give the desired new options.
I am a local administrator, but I even wrote the GUIDs to the APPROVED section as described in M. Dunn's first chapter. Well, they still dont work, and I am pretty much *censored* since I can not get it to work.
I do have absolutely no idea what causes the failure, I did not change any of the example projects.
Can someone please help me?"
Greetings from Germany
Sebastian
|
|
|
|
|
|
Thanks, that worked for your BMPView Example.
But it did not for the OpenWithExt-Example, which does not compile correctly.
OpenWithExt contains the following code, which generates an error:
// Insert the submenu into the ctx menu provided by Explorer.
MENUITEMINFO mii = { sizeof(MENUITEMINFO) };
mii.fMask = MIIM_SUBMENU | MIIM_STRING | MIIM_ID;
mii.wID = uID++;
mii.hSubMenu = hSubmenu;
mii.dwTypeData = _T("C&P Open With");
InsertMenuItem ( hmenu, uMenuIndex, TRUE, &mii );
return MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, uID - uidFirstCmd );
Obviously, Visual Studio 6 Enterprise (thats what we are using) cannot resolve
MIIM_STRING. If I fire up the MSDN, there is no MIIM_STRING for MENUITEMINFO.
Is that a typo or did I do anything wrong?
I am curious because this "Submenu-Example" is pretty much what I need to implement, with a few lines of additional evaluation code and multi-file-support.
Cheers
Sebastian
|
|
|
|
|
|
Hi everyone,
I have a class like this:
class CFoo
{
public:
CFoo();
~CFoo();
BOOL SortByName();
protected:
std::vector<CRec*> m_Recs;
private:
struct NameComparer
{
bool operator()(const CRec* A,const CRec* B)
{
return ((A->m_strName) < (B->m_strName));
}
};
};
BOOL CFoo::SortByName()
{
std::stable_sort(m_Recs.begin(), m_Recs.end(), NameComparer());
return TRUE;
}
Now, basically, I am trying to properly write and use a predicate function (I think that's what they're called; please correct me if I'm wrong) in the context of calling std::stable_sort (and just std::sort for that matter). There are many helpful examples around, but they don't seem to cover dealing with a non-trivial class (or if they do I haven't 'gotten it' yet).
In my case, I want to be able to sort the vector of CRec 's according to several different CRec member variables (different CString s, int s, double s, etc.). My questions are:
1) Did I use proper coding techniques to solve the problem as I have shown here?
2) Is it the case that I need to add additional struct s under the private section of CFoo for each comparison CFoo member function I want to write (with the comparisons applied to the std::vector m_Recs and based on the CRec members themselves actually)?
3) Why do I need to wrap the comparison functions in a struct? How does that fact relate to operator() , etc.?
Thank you all again for reading and giving any advice,
Best,
Eric
|
|
|
|
|
Any ideas?
|
|
|
|
|
In an MFC application I have to make a Listview in report mode with checkboxes.
One of the entries will be a line called "All" and I have to make sure that this "All" line is the first line and always visible even when scrolling..
Does anyone have an idea how I manage that the easiest
Thanks in advance
Thomas
|
|
|
|
|
It's easy to make the "All" line the first item in the list, but I do not know of a way to ensure that constraint in the presence of scrolling.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi..
i am useing 2 CFileFind object but an error keep arise that
the files i used in the first one is still in used i use the Close() fun for the first on. so
How i can delete first CFileFind Object i tried to use only one object but it also give error..
thanks
|
|
|
|
|
Please provide a code snippet exhibiting the problem.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
thanks for your help but i solve the problem
|
|
|
|
|
Why not share with the rest of us? It can be a learning experience for everyone involved.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I am sorry but it was really silly mistake and if I add I will get too many comments on that …
The mistake was that I was using the same public CFileFind object in two function in each one I use this object and close it once time in the main after I call both so I add the close function in each fun
I really do not mean what you said
|
|
|
|
|
rasha2003 wrote:
I am sorry but it was really silly mistake and if I add I will get too many comments on that …
If the comment you receive is from a professional, it would probably have something constructive in it. Otherwise, if the comment was laced with this-is-crap, what-were-you-thinking, and isn't-it-obvious remarks, you can ignore those anyhow as they serve no other purpose than to humiliate.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi..
thank you for that next time i will remember that
|
|
|
|
|
I have a control which when i used in c#. i get the method ShowPropertyPages() through which it displays its properties but when i try the same in VC.NET i will get the error that there is no method ShowPropertyPages defined in the class. what am i doing wrong or what i have to do so that this error will overcome
Thanx in advance
Regards
INAM
Inam
|
|
|
|
|
In my application I am creating an exe file. In that I have embeded an icon. The correct icon is being displayed in windows explorer. But when "on right-click on the exe"/"General tab" displays some other icon. This strange behaviour has been observed in Winodows 98, 95 operating systems.
I have verified the embeded icon inside the exe using "icon grabber" & "resource hacker" applications. It has embeded the correct icon. It does not have the worng icon. (which is getting displayed when "on right-click on the exe"/"General tab")
-Koti
|
|
|
|
|
Does the icon contains both 16x16 and 32x32 bitmaps ?
|
|
|
|
|
Yes. Icon contains both bitmaps.
Thanks,
-Koti
|
|
|
|
|
Hi
I want to write an application , which whenever connects with a FTP Server could tell me wether contents on FTP server has changed since last visit , if changed highlight the changes.
Is there some option in FTP RFC.Thanks
No Worries!
|
|
|
|
|
AFAIR, the FTP-RFC does not define any command or standard by which you could determine if the contents of a server have changed.
But this function would be quite easy to implement:
You request the directory you want to watch. The contents are then saved in a file for future reference. The next time you request that directory, you simply compare the two to check for changes.
Greetings from Germany
Sebastian
|
|
|
|
|
Can someone help me with the code on how can I import the registry information a a specified location to an access database? I am doing a project in Visual C++ to import all installed software information from registry to a database and would appriciate very much for inputs.
|
|
|
|
|
First, you need code that reads information from the registry. Second, you need code that adds information to a data source. Once you have these two in place (they can work independently at first), you can make the appropriate changes such that the output from the former is the input to the latter.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
how do i programatically determine wheather the user has chosen webview or not programatically.
I have tried ShGetSettings but no luck.
Thanx in advance.
Toughest Steel Comes From Hottest Furnance
|
|
|
|