|
No registry entries for:
'IMarkupServices' or '3050f4a0-98b5-11cf-bb82-00aa00bdce0b' (string literal searches, not case sensitive)
I'll try the October 2003 SDK when I finish getting it down.
Jeff
|
|
|
|
|
Hi Sohail,
I haven't tried the IHTMLLocation Interface yet, but the IMarkupServices was resolved by replacing the call to CoInitializeEx() with CoInitialize().
Jeff
|
|
|
|
|
I haven't tried the IHTMLLocation Interface yet, but the IMarkupServices was resolved by replacing the call to CoInitializeEx() with CoInitialize().
Jeff
|
|
|
|
|
hr = CoInitializeEx( NULL, COINIT_APARTMENTTHREADED );
|
|
|
|
|
I have an Automation server created in MFC. I have some classes which are creatable by TypeId. Now in one of this class, I want to provide a way to fire events. This is and EXE server and not ActiveX control. I know how to add events in an ActiveX control. Can someone guide me on providing Automation/COM events from a class in MFC.
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi All,
This should be the last question on Context Menus...
IContextMenu2 handles the WM_DRAWITEM, which I am trying to use to place an icon (16x116 or 3x13 bitmap) on the Menu. I can't seem to get it to work (fully patched Windows 2000, VC++ 6.0 EE).
Any ideas?
Jeff
|
|
|
|
|
Hi All,
I've used Michael Dunn's article[^] to create two Context Menu handlers. They are housed in separate DLLs. They are basically carbon copies of one another (and the sample which Michael provides) except names. Each uses the same insertion code:
InsertMenu( hmenu, uMenuIndex, MF_BYPOSITION, uidFirstCmd, _T("Menu Item Name") );
However, the items are not placed one after the other ('stacked') as I would expect. As a matter of fact, Windows (at times) places a separator bar between them:
Open with WinZip
Print
----------------
Menu Item 1
----------------
Scan for Viruses
Open With...
Menu Item 2
Winzip
----------------
...
Any ideas to get these fellows to stick together?
Jeff
----------------
|
|
|
|
|
You have no control over what other extensions will do with the menu, nor in what order Explorer will call them. You might be able to influence the order by making your two extensions' ContextMenuHandlers keys have similar names (FooExtension1 and FooExtension2 , for example) but no guarantees.
|
|
|
|
|
Hi Mike,
> nor in what order Explorer will call them
That is more or less my (ignorant) feeling.
> influence the order by making your two extensions'
> ContextMenuHandlers keys have similar names
I tried adding an space (' ') to the names - they get indented on the menu, but not grouped together.
Jeff
|
|
|
|
|
> ContextMenuHandlers keys have similar names...
That was it: in the *.rgs files:
VerifyHash -> CtxVerifyHash
CreateHash -> CtxCreateHash
They are grouped together, partioned by separator bars. Below is for the benefit of others following your articles
Jeff
HKCR
{
NoRemove CLSID
{
ForceRemove {7E745006-XXXX-XXXX-XXXX-E24D4133439C} = s 'CtxVerifyHash Class'
{
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
}
}
NoRemove *
{
NoRemove ShellEx
{
NoRemove ContextMenuHandlers
{
ForceRemove CtxVerifyHash = s '{7E745006-XXXX-XXXX-XXXX-E24D4133439C}'
}
}
}
}
|
|
|
|
|
Hi All,
Can anyone tell me how to return a VARIANT array value from the Activex to the host program , waiting...
Thanks and Regards
Alic
|
|
|
|
|
You need to use SAFEARRAY . I found this article [^] having its usage.
|
|
|
|
|
:-DThanks for your article!
|
|
|
|
|
As said use SAFEARRAY.
In ATL you can use CComSafeArray class. This class provides a wrapper for the SAFEARRAY.
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
ok, I will use CComSafeArray, Thanks!;P
|
|
|
|
|
Thanks everybody .
I hope you have a nice day!
Alic
2006-12-15
|
|
|
|
|
Hi there,
Is there a simple way to implement Ctrl-A as select all for all edit controls in a WTL dialog. I guess one way is to use a accelerator table and implement ID_EDIT_SELECT_ALL, but is there a nice way to reroute all edit accelerators to the focused edit control in a dialog window. Is there a better way?
Best regards,
E
|
|
|
|
|
You could write your own edit class that handles the Ctrl-A, and subclass each edit control on your dialog:
Partial class:
class CSelectEdit : public CWindowImpl< CSelectEdit, CEdit >
{
public:
....
BEGIN_MSG_MAP(CSelectEdit)
MESSAGE_HANDLER(WM_KEYDOWN, OnKeyDown)
....
END_MSG_MAP()
LRESULT OnKeyDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if ( GetKeyState(VK_CONTROL) < 0 && wParam == VK_A )
{
SendMessage( EM_SETSEL, 0, -1 );
return 0;
}
bHandled = FALSE;
return 1;
}
};
Then in your dialog class, create a member variable for each edit control:
CSelectEdit m_edit1;
The in your OnInitDialog, subclass each edit control:
m_edit1.SubclassWindow( GetDlgItem( IDC_EDIT1 ) );
Well, that's one way to do it anyway.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
In List view control "report view", horizontal scroll bar should not be seen and only vertical scroll should be visible when needed.
I tried using "NO SCROLL" property option but it removes both the scroll bars but i want only horizontal scroll to be removed.
Kindly help me in solving this problem.
Guru
|
|
|
|
|
Hi All,
I'm awaiting for information on this...
Please can any one help me...
Guru
|
|
|
|
|
Hi All,
Can anyone tell me how to read the contents (words) of a text file into a vector/ list? I may be asking a very basic question but I am just a beginner. Hope you all understand.
Thanks and Regards,
Anil
|
|
|
|
|
Try something like this:
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
int main()
{
using namespace std;
fstream fs("C:\\Words.txt");
if (!fs)
{
cerr << "Failed to open file!" << endl;
return 1;
}
vector<string> WordList;
typedef istream_iterator<string> StringsIT;
copy(StringsIT(fs), StringsIT(), back_inserter(WordList));
copy(WordList.begin(), WordList.end(), ostream_iterator<string>(cout, "\n"));
return 0;
}
Steve
|
|
|
|
|
Thanx Steve!!![ ]
|
|
|
|
|
why would you do someone's class assignment for them?
led mike
|
|
|
|
|
If it's really an assignment the teacher will know straight away: some who can't program in C++ properly using back inserters, stream iterators and algorithms is a dead giveaway. If your assumption is incorrect then I've helped someone out.
Steve
|
|
|
|