|
|
Comments and Discussions
|
|
 |

|
Nice starter level demo code thanks
|
|
|
|

|
Fantastic work, I've learned a lot!
|
|
|
|

|
I have tried to handle event (TotalMarks) in java script as following, but it does not work.
Anyone know how to handle COM / ATL Events in Javascript.
<html>
<head>
<script type="text/javascript">
function onEventHandler(TotalMarks) {
alert(TotalMarks);
}
</script>
</head>
<body>
<object id="simplecomobj" CLASSID="CLSID:7FE99CE3-89C7-4708-8547-F5EF38ABC881" width="0px" height="0px">
<embed name="simplecomobj"></embed>
</object>
<script type="text/javascript">
window.onload = function () {
var activeXObject = document.getElementById('simplecomobj');
if (typeof (activeXObject) == "undefined" || activeXObject == null) {
alert("unable to craete ActiveXObject");
return;
}
var status = activeXObject.attachEvent('TotalMarks', onEventHandler);
}
</script>
<input id="txtName" type="text" value="abc" />
<input id="txtMarksInAtl" type="text" value="10" />
<input id="txtMarksInCOM" type="text" value="20" />
<input id="txtTotalMarks" type="text" />
<button id="b1" onclick="calcTotal()" value="Calculate" />
</body>
</html>
|
|
|
|

|
I am not sure what character encoding shall I use to see the page properly.
I tried them all with 3 browsers and still see question marks in many places.
For example, looking at the page source it comes like this:
Symbol ?<b>--></b>? means Author Comments
|
|
|
|

|
Hi,
I want to open and read/write access MS Xls sheet through VC++ programmaticaly, Plz send some code.
With Regards
Mahesh
|
|
|
|

|
Hi,
I want to know how shared segment is being shared between two DLLs.
Give me with an example.
With Regards
Mahesh
|
|
|
|

|
please do the canned search for data segment in dll in codeproject.com
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|

|
Hi,
I have searched that option but i didn't get the solution,
Plz provide some code.
With Regards
Mahesh Hs
|
|
|
|

|
Hi, it's me again !
plz how to do this in Visual Studio 2008 ?
thank you
|
|
|
|

|
try File->New Project->, Select Visual C++, under ATL tree item, select ATL Project!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|

|
I found how to proceed, and I'm learning right now
|
|
|
|

|
Hi,
How can I find "ATL Object Wizard" (in Visual Studio 2008)?
thank you
|
|
|
|

|
Thank you for this tutorial
I just sent to you a mail where I ask you to give me a link to a tutorial like this one !!!
I'm applying it and when I don't understand something I ask you
thanks again
|
|
|
|

|
Any time dear!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|

|
Hi,
At step 10 you clearly show the way of how to add the method for interface, any tips for if want the returned type of a object which is created in the project or use a object parameter?
For example: there is a class called User in the project something like
Class User
{}
then add a method for interface with something like User GetUser()
or void AddUser(User u)
Thanks in advance
|
|
|
|

|
Peng wrote: void AddUser(User u)
use pointer to pointer, as object is going to created in dll, when returning from the interface and pointer, in when setting value in dll.
i.e. void GetUser([out,retval]USER ** pUser);
void SetUser([in]USER* pUser);
ok!
|
|
|
|

|
Thank you.
The reason I posted question is that when I tried to use object parameter, I got error says "error MIDL2025 : syntax error : expecting a type specification near "User" that pointing to the idl file where the code [id(1), helpstring("method GetUser")] HRESULT GetUser(User ** u); and couldn't figure out what was the problem. Any tips to this error?
Thanks again.
|
|
|
|

|
Peng wrote: HRESULT GetUser(User ** u); and couldn't figure out what was the problem. Any tips to this error?
where you User defined class USER ??, you have to define same as interface in IDL if you want to use it!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|

|
The USER is a class I have in the project. How can I define it as interface in the IDL in order to be able use it?
or I will need to create an ATL object USER instead of this class object USER?
Thanks
|
|
|
|

|
Peng wrote: I will need to create an ATL object USER instead of this class object USER?
yes you have to create the ATL object of USER, in order to make it language independent!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|

|
Hi,
Any suggestion for a sample COM project with event, should I choose the ATL/COM or MFC dll or else with I start it with vc6.
Thanks in advance.
|
|
|
|
|

|
If I want to create a test project for the ATL dll and put it within the same workgroud with dll project in order to be able to debug, test and also step into the dll code easier instead of a external program. Any suggestions with how to do it?
Thanks a lot.
|
|
|
|

|
add the test project in the solution itself rather creating new solution files!, or press f5 from the dll code itself or attach it with running process
"If it were machines, the pair_programming seem to work, but for humans it is pair_crackdown that seems to work! " - Nisamudheen
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|

|
Thanks Alok. Since I am a new to this area, could you give me some more details.
I added a test project in the dll workspace, but having difficult to reference the dll from the test project.
Thanks again.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
An article touching simple issues like events, methods and properties.
| Type | Article |
| Licence | CPOL |
| First Posted | 6 Nov 2004 |
| Views | 220,903 |
| Bookmarked | 109 times |
|
|