|
yer ive got a pretty good handle on com
|
|
|
|
|
I would agree, for you to completely understand ATL, you really must understand what it is trying to do for you. Some of the terminology can be confusing, but if you become comfortable with COM, you will go a lot farther.
For COM books, I would recommend Don Box's Essential COM for concepts and theory, and I would get one other book if you like to work from examples. I don't really have a book to suggest for this, I just use the examples from MSDN.
Then like TomPeakz said, I would recommend Rector and Sells ATL Internals when you feel that you are ready for ATL. This is the only book on ATL that I own, but it has been more than enough for me for the 3 years that I have been using ATL.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I'm programming on outlook com addin,I want to add a new "Folder" to the
"Folders List" like public
folder and Email Folder. Not the subfolder in the Email Folder.
But I could not found any methods to do this .Some one told me that I
must
write a new outlook service adding to the outlook,I think that is. So I
searched all of the documents
like MSDN...,but found nothing relative toptics.Does anybody know that ? (I use VC++)
Good Luck!
Tom Peakz
tomPeakz
|
|
|
|
|
I created a MFC project. It was used to process bitmaps. I used embedded bitmap object and use mspaint.exe as server to edit bitmap. When I created a new object, it can work well. But I want to open an existed bmp file, I don't know how to change the object's content. Would anyone like to help me?
Thank you all very much!
|
|
|
|
|
Greetings,
I was wondering if there was a way to have an windowless ActiveX control refresh itself within IE?
I am trying to have an image draw in an ATL activeX control, and cycle through the different dib images periodically, and not have to refresh the browser for the new image.
I tried using "IOleInPlaceObjectWindowlessImpl" but every hdc, and rect comes back invalid from the call.
I assume that it has something to do with the container (IE) not allowing such things, but since I am
very new to ActiveX development I can't be sure.
Thanks in advance to anyone who knows a solution! (Hopefully)
|
|
|
|
|
Greetings to all,
I did find a solution to my problem.
For some reason using the internet explorer as my container did not provide a windows handle to itself
that is why I was getting a windowless control.
So I created an activex control, and added an ATL object "full control" based on a static control.
I overwrote the WM_Paint for the static control, and now I can update the window at any time I want using
a timer.
Now life is good!
|
|
|
|
|
Problem: Not able to run ActiveMovie3 OCX in worker thread.
My code is As follows:
1) I have declared pointer variable for ActiveMovie3 as class level
2) I have created Activemovie3 instance in OnInitdialog()
Code:
OnInitDialog()
{
CWnd *desk=GetDesktopWindow();
CRect rect;
desk->GetWindowRect(&rect);
m_Mplayer=new CActiveMovie3;
m_Mplayer->Create("Mediaplayer",WS_CHILD,rect,this,2222);
CwinThread *movieThread=AfxBeginThread(Mediathread,m_MPlayer);
Return TRUE;
}
UINT Mediathread(LPVOID pvoid)
{
CActiveMovie3 *m_MPlayer1=(CActiveMovie3*)pvoid;
int i=0;
while(true)
{
if(i++%2==0)
{
m_MPlayer1->SetAutoStart(TRUE);
m_MPlayer1->SetFileName("E:\\Boys.avi");
}
else
{
m_MPlayer1->SetFileName("E:\\Boys.avi");
}
Sleep(120000);
if(i>5)
break;
}
return 0;
}
Same code is working fine with the timer.
My timer code is as follows:
OnTimer(UINT nIDEvent)
{
static int i=0;
if(i++%2==0)
{
m_MPlayer->SetAutoStart(TRUE);
m_MPlayer->SetFileName("E:\\Aa.mpa");
}
else
{
m_MPlayer->SetFileName("E:\\Boys.avi");
}
CDialog::OnTimer(nIDEvent);
}
|
|
|
|
|
You may consider calling CoInitialize() in the new thread to join a STA apartment. Also, you seem to create an object in main STA (in OnInitDialog) and then pass a raw interface pointer to in (wrapped with CActiveMovie3) to another apartment. It violates COM principles.
Consider using CoMarshalInterThreadInterfaceInStream or create an object in Mediathread.
-= Alexander =-
<<= Long Live COM =>>
|
|
|
|
|
Hello,
I am looking at converting some C++ code to use COM objects instead to avoid recomiling the world when anything changes.
At the moment I am trying to work out whether you can have a static method/property in an interface (equivalent to static function in a C++ class).
None of the documentation/books I have seen even mentions this, I am therefore presuming it is something that isn't possible.
If anyone could confirm this, or maybe point out some 'alternatives' to me I would be grateful.
Also, is it possible to publish a non-implemented interface for use by third parties in cases where I have defined some 'pure-virtual' methods - would this be distributed as a type library???
Thanks
Paul.
|
|
|
|
|
Anonymous wrote:
At the moment I am trying to work out whether you can have a static method/property in an interface (equivalent to static function in a C++ class).
Because static member functions are not put in the VTable for functions of a class, I would suggest that you do not declare a static method directly in your interface that you would like to expose. However, There should be no problem if the way that you choose to implement a function in your interface that calls a static method, this should accomplish the same goal.
class X
{
...
static HRESULT H_function ();
...
HRESULT static_function ()
{
return H_function();
}
};
A bit contrived, but hopefully it explains the point.
Anonymous wrote:
is it possible to publish a non-implemented interface for use by third parties in cases where I have defined some 'pure-virtual' methods - would this be distributed as a type library???
You can publish any interface that you would like. Putting the definitions in a type library simply makes it accessible to languages that pragmatically read the type library to gain access to the objects inside, so this would be an acceptable way of doing it.
Checkout my Guide to Win32 Paint for Intermediates
|
|
|
|
|
|
Has anyone had to get the chart1 gif from an xsl file? I know if you manually perform a SaveAs and choose Webpage, you will create a directory whether you choose "Entire Workbook" or "Republish:chart". From there you can just access the gif. I need to know how to grab that COM object and perform the SaveAs. Or am I making this more difficult than it has to be?
Thanks,
Lilian
|
|
|
|
|
Hi Hello any one can send me how to use dom in xml
|
|
|
|
|
|
dom in XML?
can u be a bit more specific?
bryce
|
|
|
|
|
Hi Hello any one can send me how to use dom in xml
|
|
|
|
|
Hi Hello any one can send me how to use dom in xml
|
|
|
|
|
http://www.codeproject.com/useritems/msxmlcpp.asp
#define MOSTLY_LEAN_AND_MEAN
|
|
|
|
|
How to register com component
|
|
|
|
|
In command prompt:
regsvr32 filepath
Mazy
"The path you tread is narrow and the drop is shear and very high,
The ravens all are watching from a vantage point near by,
Apprehension creeping like a choo-train uo your spine,
Will the tightrope reach the end;will the final cuplet rhyme?"Cymbaline-Pink Floyd
|
|
|
|
|
from the command line
regsvr32 yourdll.dll
do unregister
regsvr32 yourdll.dll /u
though i like to have a batch file in my project which is run as a post link command
Bryce
sounds like we need a tool to do it from windows ?
|
|
|
|
|
Testing message
|
|
|
|
|
testing worked...isn't it great when that happens?
bryce
|
|
|
|
|
I have created a MSXML object as following C++ code shows:
CComPtr<ixmldomdocument> spXMLDOM;
HRESULT hr = spXMLDOM.CoCreateInstance(__uuidof(DOMDocument));
if ( FAILED(hr) ) throw "Unable to create XML parser object";
if ( spXMLDOM.p == NULL ) throw "Unable to create XML parser object";
CComBSTR str(L"<xmldata><xmlnode><xmltext>Hello, World!");
hr = spXMLDOM->loadXML(str, &bSuccess);
But it doesn't load the str and the value of bSuccess is FALSE
Please help.
Thanks in advance.
|
|
|
|
|
I want to output a recordset to client in COM, I did as following:
[id(7), helpstring("method GetStudentInfo")] HRESULT GetStudentInfo([in] BSTR bstrStudentID, [out,retval] _Recordset *pRs);
But error report that
error MIDL2025 : syntax error : expecting a type specification near "_Recordset"
But here i think _Recordset is a type specification
|
|
|
|