|
Hi All
I have created an MMC snapIn .I want to track result view list column header click event...but I dont know that what will be the that event so that I can catch it in MMC event handler..plz help me
thanks in advance
Rashmi Kushwaha
|
|
|
|
|
Hey Fish, why did you get another account?
Here is another question. Are you really trying to develop an MMC snap-in without reading the documentation? I strongly urge you to consult the documentation when working with any Library/API.
|
|
|
|
|
Hi mike..
I am developing a printer management console..and I have gone through some of the documents...I had written MMCN_COLUMN_CLICK event in my notify handler..but when a listview header is clicked..I didn't get the MMCN_COLUMN_CLICK event..can u help me plz,,...
|
|
|
|
|
Hi.
In the project that I am working, I need to develop a listener that checks a folder and files.
Well, on CLIENT this listener will have detect ANY internal change in ANY file in the folder and instantly will synchronizer with SERVER, like a ShadowCopy, and different of a snapshot, for keep integrity between CLIENT-SERVER, ok?
Can anyone give me a hand? Libraries, and similar components.
I'm working in c++ builder, but visual studio components also help.
Regards,
|
|
|
|
|
How many times are you going to post the same question ?
Creating a new user account and then posting the exact same question is a little lame, and will not encourage people to help.
|
|
|
|
|
Hi All
I have developed an MMC snap-in.It has some context menu options created in the program.Now at some event I want to hide some of the menu items declared in a menu.But I dont know how to do it..can anyone help me...
any type of help will be appreciated..
thanks in advance
Rashmi Kushwaha
|
|
|
|
|
Hey fish, I can help you. However I would like you to change your screen name to fit on a single line so that your posts don't take more space than everyone else. You do that and I will help you.
|
|
|
|
|
Hi All
I have developed an MMC snap-in.It has some context menu options created in the program.Now at some event I want to hide some of the menu items declared in a menu.But I dont know how to do it..can anyone help me...
any type of help will be appreciated..
thanks in advance
Rashmi Kushwaha
|
|
|
|
|
You can have the MenuUpdate handler(See CCmdUI) that will be called before
the menu is displayed.You can have the flag for the menuitems and depending on the value of the flag you can enable or disable the menuitems.
Ritesh.
|
|
|
|
|
Thanks Ritesh
But My MMC is in ATL.so what function or template should I use to hide any already defined(not default)menu item in ATL.
Thanks in Advance
-- modified at 4:02 Wednesday 24th October, 2007
|
|
|
|
|
I found only one article on codeproject is using CCmdTarget for finding sink for AfxConnectionAdvise((LPUNKNOWN)s_pFrameWB,DIID_DWebBrowserEvents2,pUnk,FALSE,dw);
I know that I have to use interface DWebBrowserEvents2.
But for which It requires CCmdTarget,which is mfc class.
I am trying to monitor IE with help of toolbar, so I am using pure atl,com and not mfc.So what is alternative way to monitor events.I have IWebBrowser2 object in my hand.
|| ART OF LIVING ||
|
|
|
|
|
To handle those events in ATL, you need to derive a class from IDispEventImpl and add a sink map handling the events you want. Here's some incomplete code that handles mouse over and mouse out events from a browser window embedded as a control:
class MyView : public CWindowImpl<<small>My</small>View, CAxWindow>,
public IDispEventImpl<1, MyView, &DIID_HTMLElementEvents2, &LIBID_MSHTML, 4, 0>
{
public:
typedef IDispEventImpl<1, MyView, &DIID_HTMLElementEvents2, &LIBID_MSHTML, 4, 0> HTMLElementEventsSink;
BEGIN_SINK_MAP(MyView)
SINK_ENTRY_EX(1, DIID_HTMLElementEvents2, DISPID_HTMLELEMENTEVENTS_ONMOUSEOVER, OnMouseOver)
SINK_ENTRY_EX(1, DIID_HTMLElementEvents2, DISPID_HTMLELEMENTEVENTS_ONMOUSEOUT, OnMouseOut)
END_SINK_MAP()
BEGIN_MSG_MAP_EX(MyView)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
END_MSG_MAP()
private:
</code><code> void __stdcall OnMouseOver(IHTMLEventObj* pEvent);
void __stdcall OnMouseOut(IHTMLEventObj* pEvent);
</code>
<code> LRESULT OnCreate(UINT , WPARAM , LPARAM , BOOL& )
{
if (SUCCEEDED(QueryControl(&pWB2_)) &&
SUCCEEDED(pWB2_->get_Document(&doc_)) &&
</code><code>SUCCEEDED(</code><code>doc_->get_documentElement(&docElem_)))
{
HTMLElementEventsSink::DispEventAdvise(docElem_);
}
}
LRESULT OnDestroy(UINT msg, WPARAM wParam, LPARAM lParam, BOOL &)
{
if (docElem_)
{
HTMLElementEventsSink::DispEventUnadvise(docElem_);
docElem_.Release();
}
}
CComPtr<IWebBrowser2> pWB2_;
CComQIPtr<IHTMLDocument3> doc_;
CComPtr<IHTMLElement> docElem_;
};
You'll need to call HTMLElementEventsSink::DispEventAdvise to tell IE that you want to handle the events, using an appropriate IDispatch pointer to say which objects events you want.
|
|
|
|
|
Hello,
I've been trying to use a chevron is a toolband for IE. I've managed
to get the chevron up... But I'm facing a few problems.
1. When the browser is smaller than the specified size... The chevron
is shown. When I maximize it, the buttons which were shown in the
chevron aren't shown on the band. If I start the browser as a
maximized window, the buttons are shown properly in the chevron when I
reduce the size & the buttons are again shown properly when the size
is maximized. Basically, if the chevron is shown when the browser
comes up, the buttons aren't shown when the browser window is
maximized.
2. I'm unable to capture the RBN_CHEVRONPUSHED message. I've tried sub
classing using a ATL::CContainedWindow object. But I am unable to
initialize it's m_pObject data member... which is a CMessageMap
derived object. I haven't come across any help online which would help
me out with this.
Anyway, the chevron is shown as a dumb menu... Which doesn't function.
(which means that I'm not getting the WM_COMMAND messages)
Any help would be appreciated.
Vikhyat
|
|
|
|
|
Hi!
I need to pass a series of raw bitmaps in memory from c++ to VB (and then from VB to c++). Does anyone know how to do this? I am trying to encapsulate all the functions in a ActiveX, so i think i should pass my raw unmanaged c++ data to an Interface like IPicture or something like that.
Thanks a Lot!
JO.
JO
|
|
|
|
|
Ju@ncho wrote: Hi!
I need to pass a series of raw bitmaps in memory from c++ to VB (and then from VB to c++). Does anyone know how to do this? I am trying to encapsulate all the functions in a ActiveX, so i think i should pass my raw unmanaged c++ data to an Interface like IPicture or something like that.
You can use the function OleCreatePictureIndirect to create an IPicture wrapper around a bitmap. I think there are members of IPicture that allow you to render it to a bitmap to do the reverse.
Nathan
|
|
|
|
|
Hi All
I have developed an MMC sanp-in.there is a printer node in left pane,when I click on the printer,it displays jobs in that printer in right pane(result view).
I want to extract the index of the item selected in right pane(result view).I have to enable a menu on selecting a row in result view based on the value os a sub item in result view..
Plzzzz help me...
Thanks in Advance.
Rashmi Kushwaha
-- modified at 7:55 Monday 22nd October, 2007
|
|
|
|
|
It's not urgent for us so refrain from adding "Urgent", "please help me" or any one of a number of things which will guarantee you getting no answer.
|
|
|
|
|
Hi
I have some atl project with ctrl and I want to add CP support for this.
When I create project I don't set check for CP support and now I don't understant how to do it.
I try to implement interface. But after that in "add CP" menu VC2003 dont show this interface.
I try to create new project whith CP support and find differences, but this projects completely different. In project w/o CP I work with my ctrl directly in project with CP I must work throught CContainedWindow but I can't register (or something) my ctrl... overall CContainedWindow("MyCtrl", this, 1) - didn't create any window.
How to add CP support in project?
Thanks, Anton
|
|
|
|
|
Add support for the following Interfaces in yours coclass.h:
Class ATL_NO_VTABLE YourCoClass:
...
public IConnectionPointContainerImpl<yourcoclass>,
public CProxy_IXXXEvents<yourcoclass>,
...,
Public IXXX
{
....
//ADD THE CONNECTION POINT MAP
BEGIN_CONNECTION_POINT_MAP(CCoRectangle)
CONNECTION_POINT_ENTRY(__uuidof(_IXXXEvents))
END_CONNECTION_POINT_MAP()
Add also the following definitions in your .IDL File
library XXXX
{
[
uuid(/*GENERATE NEW UUID WITH CREATE GUID*/),
helpstring("_IDrawEvents Interface")
]
dispinterface _IDrawEvents
{
properties:
methods:
};
...
coclass YourCoClass
{
[default] interface IXXX;
[default, source] dispinterface _IXXXEvents;
}
}
I hope it was usefull
Any doubts, please ask
JO
|
|
|
|
|
Hi!
I've this problem.I've to do a in process COM server in C++;the server has to send in real time as fast as possible a vector of six elements produced by a stand alone application (written in C++) to a MATLAB client. MATLAB client can't read the new value of vector untill the application does not write new one.
Can you suggest me a possible solution?
Thanks.
DanyCode
DanyCode
|
|
|
|
|
Hi,
I think you can encapsulate the C++ code in an activeX, and pass the data like a VARIANT but i dont know if it will be fast enought.which is the Bandwith required?
See http://www.codeproject.com/cpp/variantarray.asp for a library to pass vectors from unmanaged c++ code to managed MATLAB code
If you are using MATLAB you can also try to make an sfunction with the c++ code (see
c++ sfunctions in the matlab help).
JO
|
|
|
|
|
Hi Im working on ListCtrl(ATL Controls) in which i need to add images(Icons) to subitem other than 0th index.I was trying from couple of dayz.Plz help me if u have any idea..
thanks & Regards,
srihari.
|
|
|
|
|
I don't think there's a built-in way that you can add images to sub-items in a list view. I suspect the only way you can draw the images that you want is by using custom draw - see this MSDN page[^].
|
|
|
|
|
|
Hi,
I want to convert the string into german currency format eg.
in US 21,666.56 in German 21.666,56
in US 177.66 in German 177,66
please revert me with a good solution.
vijay
|
|
|
|