|
What would be the best way to implement additional features to an existing Activex developed via ATL, without breaking the current contract ?
There are a bunch of clients using the current code, and would not like to break the current functionality, in other words, I would like that new and old clients use the same Activex without breaking.
Thanks in advance
|
|
|
|
|
hello
I developed a activeX com component(.ocx) which is having only two property tabs named "set properties" and "extended". I want to add another property page tab in property sheet view. How can i add and use it.
-- modified at 1:26 Monday 7th November, 2005
|
|
|
|
|
In Dialog Resource Say Insert and select Property Page and say ok....
Now a new property page is created...create a class for it using class wizard and use it.
|
|
|
|
|
Hi everybody,
I have created a WTL MDI application. When it runs and the childframe window opens in the mainframe, I can capture the command messages generated by menu items selection in the OnForwardMsg handler of the childframe window. But I can't get the messages generated by toolbar buttons click with the same menu items identifiers.
I want to know what is wrong here. Why can't I get command messages by toolbar buttons click in the childframe window?
yours,
Roozbeh.
|
|
|
|
|
Hi!
I'm using ATL to create ADO connection connection
but linker errors occur.
unresolved external symbol _CLSID_CADORecordset
unresolved external symbol _IID_IADORecordset
unresolved external symbol _CLSID_CADOConnection
unresolved external symbol _IID_IADOConnection
my code :
# include <atlbase.h>
# include <adoid.h>
# include <adoint.h>
# include <comdef.h>
CComPtr<ADOConnection> p_Con;
CComPtr<ADORecordset> p_Rst;
CoCreateInstance (CLSID_CADOConnection, NULL,
CLSCTX_INPROC_SERVER,IID_IADOConnection,
(LPVOID *) &p_Con);
CoCreateInstance (CLSID_CADORecordset, NULL,
CLSCTX_INPROC_SERVER,
IID_IADORecordset, (LPVOID *) & p_Rst);
Pleas help
B2C
|
|
|
|
|
|
|
|
Hi Friend,
I want to create a link list using STL. I am doing the following
-----------------.h file---------------
struct CNode
{
long x;
_bstr_t b;
_bstr_t c;
};
class A
{
...
typedef std::list<cnode*> SEC_MSG_DATA;
SEC_MSG_DATA node;
...
}
--------------------------------------------------
I am trying to acces the member of the structure CNode through the object pointer of class A (pA->node.x) however i am getting the error
"is not a member of 'list<struct cnode="" *,class="" std::allocator<struct="" *=""> >'"
Can you please help me.
Thanks
|
|
|
|
|
Hi, I'm not sure I understood exactly what you're trying to do, but if you're trying to create a linked list of pointers to CNode's, then try this:
std::list<CNode*> nodes;
Then you can add to the list via pA->nodes.push_back(xxx). To traverse the list, you can something like:
std::list<CNode*>::iterator itNode;
for( itNode = nodes.begin(); itNode != nodes.end(); itNode++ )
{
CNode *pNode = *itNode;
// do something with pNode here
}
Hope that helps,
--
jthomps
|
|
|
|
|
Hello,
I dont know, how to implementate a registration script
"hInstance needs to be the module / instance handle
of the module that contains your server registration
script (resource ID 102) .."
the server registration script is importand to
register my OPC Server.
RegisterServer()
HRESULT RegisterServer(void)
Return Values S_OK upon success, otherwise the result code
returned from the ATL registrar component.
The success of this operation is dependent on the application
including a registry script resource as part of its EXE.
The resource ID MUST be 102. An example resource script
is shown below:
HKCR
{
NDI.SimulationSvr.1 = s 'NDI Simulation Server'
{ CLSID = s '{1E52DE00-FA5E-11d2-91C6-F8E932000000}'
...
Best regards
Thomas
|
|
|
|
|
Never used ATL COM, but today I came across a little ATL COM test program, it is created by ATL COM AppWizard, all the settings are by default. a new ATL object was added into the project, and a new property Score with it.
STDMETHODIMP CContrl::put_Score(float newVal)
{
MessageBox("afsf");
return S_OK;
}
Then I inserted this ActiveX Contrl into another Dialog base project, and when Score property value was changed, the message box was prompted.
But the problem is when I add this contrl to a webpage inside Frontpage and going through the same process, the message box doesn't shows up
|
|
|
|
|
For using on WebPage, I think, you will need to do some settings using DCOMCnfg.exe. I am not sure, check out.
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|
|
AX controls have to be marked "safe" before you can use them in IE. Look up IObjectSafetyImpl in MSDN.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
You cannot truly appreciate Dilbert unless you've read it in the original Klingon.
|
|
|
|
|
Hi Friends,
I am store some data into vector and mapping it long key for searching (1::1 mapping).Below code
---------------------.h file------------------------
typedef std::vector<item *=""> m_cache;
typedef std::map<long, item="" *=""> m_index;
typedef std::pair<long, item*=""> INDEX_ENTRY;
INDEX_ENTRY IndexEntry(Item * plu);
--------------------.cpp-------------------------
m_cache.push_back(item);
m_index.insert(IndexEntry(item));
-------------------------------------------------
Now the requirment is to retrive the same data with any of 2 different key long1 and long2 from the same vector(1::2 mapping). Can you please help me how to do this?
Thanks
|
|
|
|
|
please correct your message: < and > characters should be writen as < and >
and then u can get some help..
|
|
|
|
|
Hello!
I have a problem when define struct in atl 7.0. I develop it in vc.net. That's part of code below:
My com component has a face ISimpleFace:
//FILE SimpleFace.h
//my costum struct
struct tPosition
{
double x;
double y;
};
// ISimpleFace
[
object,
uuid("1C499BAD-9BAE-47AF-966F-EB972FA8DF47"),
dual, helpstring("ISimpleFace 接口"),
pointer_default(unique)
]
__interface ISimpleFace : IDispatch
{
[id(1), helpstring("方法TestStruct")] HRESULT TestStruct([in] struct tPosition pos);
};
When I complie it, out some errors:
e:\work\mysimpleface3\simpleface.h(23) : error MIDL2011 : unresolved type declaration : tPosition [ Parameter 'pos' of Procedure 'TestStruct' ( Interface 'ISimpleFace' ) ]
e:\work\mysimpleface3\simpleface.h(23) : error MIDL2009 : undefined symbol : [ Parameter 'pos' of Procedure 'TestStruct' ( Interface 'ISimpleFace' ) ]
What's the problem,how to define a struct in vc.net? Is there somebody can help me? Thanks!
|
|
|
|
|
I believe that you need to define your struct in .idl file. See what MSDN has on this issue.
|
|
|
|
|
Thanks for your reply!
But I do it with COM Attribute Program. The complier genrates idl file for me automately. How to define a struct in Attribute Program.
|
|
|
|
|
Edit the idl file manually and define your struct there. Check MSDN, it should have a lot of info.
|
|
|
|
|
I haven't used Attributed programming in ATL. Try adding the UUID attribute to your structure -
[
uuid("your uuid"),
helpstring("custom struct")
]
struct tPosition
{
double x;
double y;
};
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Thanks for your reply!
But add a UUID attribute is not help.
|
|
|
|
|
As I mentioned I never worked with Attributed programming. I'll watch this question for appropriate answer. Incase you find answer to your problem, please share here. Thanks.
Have a great day ahead!
Regards,
Sohail Kadiwala
(My Blog - http://blogs.wdevs.com/sohail/[^])
modified 21-Apr-21 21:01pm.
|
|
|
|
|
To Sohail Kadiwala:
Thanks! Of couse I will.
|
|
|
|
|
Hi All,
I have created one system wide hook in one of my dll file say myHook.dll like this:
hGetMsgHook = SetWindowsHookEx( WH_GETMESSAGE, GetMsgProc,
(HINSTANCE)hmodHook, 0 );
Now the confusion is that, while anyprocess sends any message, This function will be called from within the address space of that process itself or outside that proecess. Which process address space this function will map to?
Just like in setWinEventHook API we have one flag for setting this WINEVENT_INCONTEXT or WINEVENT_OUTOFCONTEXT, dont we have anything to control the same for SetEindowsHookEx API?
Thanks in advance for all your suggestions...
Regards
Abhinav
HCL Technologies, Noida(India)
|
|
|
|