|
Oh yes.
The first, i think i will create dll with ATL to hook IE message just like BHO. And i have call my process when the URL end with doc,pdf.... It is not true with my ideas. I want my process place inside the IE Browse.
If you have any document talk about it please tell me. Thank.
|
|
|
|
|
I am guessing here and I don't know if it's relevant, but do you think something like this in registry (for your file) helps you
HKEY_CLASSES_ROOT\.txt
where .txt could be any extension. Check registry.
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
anyone know url for downloading documentation of tidyatl.dll? I know some urls for it, but they aren't available. Please help me. Thanks
|
|
|
|
|
I have to write the event handler for MSCOMM.OnComm who is listening to serial port for data, so that the event is fired 'OnComm' is executed when the data is arrived.
My understanding for the documentation is unclear as how to achieve this.
Does any one have the sample source code implementation in C# / C++?
Thanks and Regards.
Amar.
|
|
|
|
|
Search MSDN for the VCTERM sample application. It is a C++ program that uses MSCOMM.
|
|
|
|
|
How to Generate OLE dispatch map functions using class wizard or using any other.
please help.
|
|
|
|
|
I edit a sample program. To exercise container's function. I compiler the program is ok. When run the code "mPacket[uid_] = Finishtime;". Then the memory is error. Why? How to update it? Show my program below(flow.h & flow.cc).
---------------------flow.h------------------------
#ifndef FLOW_H
#define FLOW_H
#include
class flow
{
public:
flow();
~flow();
void addPacket(int uid_, int Finshtime);
std::map<unsigned int,="" int=""> mPacket;
};
void flow::addPacket(int uid_, int Finishtime)
{
mPacket[uid_] = Finishtime;
};
#endif
---------------------flow.cc------------------------
#include "flow.h"
int main()
{
flow *mflow;
mflow->addPacket(1,33);
mflow->addPacket(2,55);
return 0;
}
|
|
|
|
|
In your main() function :
int main()
{
flow *mflow;
mflow->addPacket(1,33);
mflow->addPacket(2,55);
return 0;
}
Have you forgotten to new a flow object ? As in :
flow *mflow = new flow();
- Bio.
|
|
|
|
|
I am creating an activeX control for web use. I want to initialise the control state when it is loaded on the website.
How do I best do this? ( In effect I am trying to do an "OnInitDialog()" kinda thing ).
Hope my message is loud and clear.
bart
|
|
|
|
|
I think that what you want is here..
http://msdn2.microsoft.com/en-us/library/Bb250489.aspx
|
|
|
|
|
Hi,
I am beginning IContextMenu. But When I Create my project there is no sub menu!
But when I compile other projects they work fine.
As I looked at them for diffrences I noticed _Module in them and _AtlModule in Mine...(DllMain and other codes) What can I do?
Please Help me.
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
How difficult is to develop windowless activex multiline edit control?, do we need to handle lowlevel details like "mouse highlighting", "keyboard navigation", "data structures for handling text", as we do not have a window. the msdn sample which shows usage of controls uses extensively for all kind of controls. any help?
|
|
|
|
|
I have created simple ATL project. Using AddClass i have added ATL Control object which has a stock property 'Fillcolor' then finished the wizard. After that i tried to add property by using 'add propery', its creating necessary entries in IDL file but its not creating get and set methods to the implementation file.
why this happens? Please help me.
I also find that if i add stock propery to the ATL Control only the above problem occurs.
|
|
|
|
|
have you tried this tutorial? Its quite quick to go through.
ActiveX Tutorial[^]
bart
|
|
|
|
|
Yes, the same tutorial i have tried.
In Step 3: "Adding a Property to the Control" it states get_Sides and put_Sides methods added when we add a property "Sides". but its not adding that methods.
This problem occurs only when we add stock property in previous step 2.
|
|
|
|
|
OK, let me have a quick look at the tutorial
bart
|
|
|
|
|
ok sir
|
|
|
|
|
Hi
I am creating a toolbar for IE in ARL,COM and WTL.I want to add bitmap images to the toolbar buttons programmatically.previously I was adding the images on the toolbar buttons by hand drawing.But these images obviously do not look good.I want to add bitmap images to the buttons programmatically.Can anybody help me with code?Thanks in advance.
|
|
|
|
|
/*Here, hInst is your HINSTANCE, like: HINSTANCE hInst = _Module.GetResourceInstance();*/
/*IDB_SOME is the resource ID of your new bitmap added to the project*/
/*hWnd is the HWND of the toolbar*/
TBADDBITMAP bmpNew;<br />
bmpNew.hInst = hInst;<br />
bmpNew.nID = IDB_SOME;<br />
::SendMessage(hWnd,TB_ADDBITMAP,1,LPARAM(&bmpNew));
TBBUTTONINFO tb;<br />
memset(&tb,0,sizeof(TBBUTTON));<br />
tb.cbSize = sizeof(TBBUTTONINFO);<br />
tb.dwMask = TBIF_IMAGE;
/*Here, set this number to the next value after the end of your bitmapped toolbar*/
tb.iImage = 6;
/*ID_FIRST_BUTTON is the ID of the toolbar button you want to set the image of*/
::SendMessage(hWnd,TB_SETBUTTONINFO,ID_FIRST_BUTTON,LPARAM(&tb));
this is this.
|
|
|
|
|
I need pass struct from client to ATL(EXE server).The struct is defined as
struct node{
BSTR description; /* optional element of type xsd:string */
BSTR id; /* optional element of type xsd:string */
BSTR name; /* optional element of type xsd:string */
struct {BSTR* tags;int numberOfTags;}
}.
So I add the following codes two IDL file,
typedef struct TAGS_DEF {
BSTR* item; //pointer to the memory where tags are stared.
int length; //number of tags
}TAGS;
typedef struct RESNODE {
BSTR description; /* optional element of type xsd:string */
BSTR id; /* optional element of type xsd:string */
BSTR name; /* optional element of type xsd:string */
TAGS tags;
}ResNode
And I add an interface "[id(6), helpstring("方法AddOrModifyRes")] HRESULT AddOrModifyRes([in] ResNode* res, [in] BSTR operat);"
But the code can't run when the client call the interface.The codes in clients is
hr = spf.CoCreateInstance( CLSID_DataServer);
if( FAILED( hr )) throw( _T("server errror!"));
ResNode rn;
BSTR* tmpStr=NULL;
rn.tags.item=tmpStr;
rn.tags.length=0;
BSTR tmp=L"add";
spf->AddOrModifyRes(rn,tmp);
if the ATL is defined as a DLL. the problem doesn't appear.
the following is the content of my idl file.
// monwebDataService.idl : monwebDataService 的 IDL 源
//
import "oaidl.idl";
import "ocidl.idl";
typedef struct TAGS_DEF {
BSTR* item; //pointer to the memory where tags are stared.
int length; //number of tags
}TAGS;
typedef struct RESNODE {
BSTR description; /* optional element of type xsd:string */
BSTR id; /* optional element of type xsd:string */
BSTR name; /* optional element of type xsd:string */
TAGS tags;
}ResNode;
[
object,
uuid(EEC2233E-D1A7-435A-9CBD-48901778AEB7),
dual,
nonextensible,
helpstring("IDataServer 接口"),
pointer_default(unique)
]
interface IDataServer : IDispatch{
[id(1), helpstring("IsDataOK")] HRESULT IsDataOK([in,out] BYTE* sucFlag);
[id(2), helpstring("AddOrModifyRes")] HRESULT AddOrModifyRes([in] ResNode* res, [in] BSTR operat);
};
[
uuid(B79310B8-7A31-4598-897B-A9DD16EA3C33),
version(1.0),
helpstring("monwebDataService 1.0 tlb ")
]
library monwebDataServiceLib
{
importlib("stdole2.tlb");
[
uuid(8256EA22-CA60-4914-B8EB-F215E01C91A7),
helpstring("DataServer Class")
]
coclass DataServer
{
[default] interface IDataServer;
};
};
kasin li
|
|
|
|
|
Read this [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I have a CToolBar that uses the TBSTYLE_EX_MIXEDBUTTONS|TBSTYLE_EX_DRAWDDARROWS style, and some toolbar buttons use the BTNS_DROPDOWN style and some of them use BTNS_WHOLEDROPDOWN style. I'd like to make the arrows on the right side of the buttons little bigger and the drop down part more wider, like the Google has done with their toolbar buttons.
I have tried to custom draw the drop down part of the buttons in CDDS_ITEMPOSTPAINT, but here I don't get the button style and even the rect is smaller than actual button size for BTNS_WHOLEDROPDOWN styled buttons.
I am using pure ATL code(***NO MFC***).
Regards!
Padmanabh Sharma
|
|
|
|
|
I think you can try to set another toolbar on top of your current specific toolbar button. That new toolbar should have only one button in it, a wide one. Just like you can put regular controls instead of toolbar buttons, I believe you can also set a toolbar on one of the buttons.
First you need to set the style of that button to TBSTYLE_SEP , then set the new toolbar on top of it, and set the button's width yourself, handle the OnSize handler, ... something like that...;)
this is this.
|
|
|
|
|
Hi there,
I have created a MFC-Active control, which maps some functions over the dispatch map. Then I want to use these functions in a VB-Marco in Excel, Word or somewhere else.
My pronlem is that, when I create a project in VS 2005 and directly add the functions like:
afx_msg void AboutBox();
afx_msg int GetLength();
in my control and declare it in the .cpp file as:
BEGIN_DISPATCH_MAP(cAHA_Ctrl, COleControl)
DISP_FUNCTION_ID(cAHA_Ctrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)
DISP_FUNCTION_ID(cAHA_Ctrl, "GetLength", dispidGetLength, GetLength, VT_I4, VTS_NONE)
END_DISPATCH_MAP()
The methods are also created:
void cAHA_Ctrl::AboutBox(){
AfxMessageBox(IDS_INFO);
}
int cAHA_Ctrl::GetLength(){
return m_vMyVec.size();
}
It is only working at the first time of compilation, then I can use these function in an Excel VBA-macro.
Then I add some more functions in the same way and rebuild my control. This later added function is not visible in the Excel VBA-macro. The first functions are working fine, but all functions, which where later added are not available.
I already tried to unregister the control via regsvr32 /u aha.ocx, I cleaned the solution and removed all files from the MIDL compiler.
It still isn´t working.
If somebody has an idea how to solve this problem, I would be happy to get any hint.
kind regards
Volker
|
|
|
|
|
Increment minor version for your component, if you are adding some new method.
Prasad
MS MVP - VC++
|
|
|
|