|
I want to create COM dll that will fire events and transfer data to its clients. Is it possible to create such dll without being an ActiveX control
|
|
|
|
|
Of course, it's just a normal COM without implementing the interfaces needed by ActiveX.
|
|
|
|
|
That's not a matter of ActiveX.
Your COM component must implement the IConnectionPointContainer interface, and provide one or more IConnectionPoint which are event sources.
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Can you make a secure download with CHttpSession? One that accepts certificates or allows you to accept it? I tried setting the secure flag but it times out. I assume waiting for a certificate to be accepted. Any thoughts?
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
In VS.net, when we open a cpp file, header file, resources, even the help pages, they are showing in the same tabpage-like pane. How can I create something similar ?
Any open source controls like it ?
Should I create different multiple document templates for each types of documents ?
|
|
|
|
|
Hi,
In a dialog based application, I need call a function which is located in another class. In order to call this function, i need the handle of the main dialog.
My problem is how to get the handle of the main dialog and transfer it into the function call? (Some lines of example code ?)
By the way, what is the handle of a menu item and how to get/use it?
Thanks in advance!
chen
|
|
|
|
|
AfxGetMainWnd() from memory. It will need to be cast to an instance of your dialog.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
One solution to updating a parent windows with data from a dialog box is via messaging. Send the parent windows a message. You could send a pointer to the data. A better solution is just to notice the parent window and have it call a function in the dialog box.
Kuphryn
|
|
|
|
|
Thanks for thr reply!
In fact, my problem is:
I need call the function
void CAspi32Scsi::WriteCD2ImgFile(HWND Handle, CString fileName, int hid, int tid, int lun)
{
.....
}
in the maindlg implementation loop.
so I have
CAspi32Scsi m_scsi; // this is defined in the CMainDlg class.
CMainDlg::OnWriteImgFile()
{
CMainDlg maindlg;
m_scsi.WriteCD2ImgFile(maindlg.m_hWnd, m_fileName, m_cHost, m_cID, m_cLun);
}
where maindlg.m_hWnd is correct or not?
Thanks in advance!
chen
|
|
|
|
|
in OnWriteImgFile() ur creating another CMainDlg and accessing its handle, its like from within ur dialog, ur creating another one and getting its handle, i dont think that's what u want!
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Yes, you possibley right.
But my problem is how to get
the handle or the Cmaindlg or the application?
chen
|
|
|
|
|
CWnd* pCWnd = AfxGetMainWnd( );
pCWnd.m_hWnd is ur handle
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Forgot to cast it
CMainDlg* pCWnd = (CMainDlg*) AfxGetMainWnd( );
pCWnd.m_hWnd is still ur handle!
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
CMainDlg::OnWriteImgFile()
{
m_scsi.WriteCD2ImgFile(GetSafeHwnd(), m_fileName, m_cHost, m_cID, m_cLun);
}
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Hi,
Thanks for you all!
It finally worked. The best choice may be:
AfxGetMainWnd()->GetSafeHwnd();
Thanks again,
chen
|
|
|
|
|
To see if we are on the same track,
You have a dialog class and you wish you use a function from the parent class of the dialog?
One solution would be is to pass the parent within the constructor of the dialog class.
Menus
eg)
CMenu mnu;
HMENU hmnu = pWnd->GetMenu( );
mnu.Attach( hmnu );
// Now you can manipulate the window's menu as a CMenu
// object...
|
|
|
|
|
Is there a way to save information between function calls when using load library? I can always use a file on the drive, or redefine my function params, just curious.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
a global variable in a DLL will persist until your app releases the DLL.
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering
|
|
|
|
|
That would be a prob as I release the dll every time I call the function. It is a plugin. Is that the only way?
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
Darroll wrote:
Is that the only way?
maybe not the only way, but it's the obvious way
for plugins, i always write the data to a file somewhere (or the registry, depending on my mood).
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering
|
|
|
|
|
My next thought is how to know when the app starts as to not save data between sessions. I may have to have the app set a running flag in the registry or something. If there is an easier way then this. Any clues?
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
you could use a mutex, but a reg key might be just as easy.
-c
All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering
|
|
|
|
|
Hello there,
Please introduce to me a good MPEG library for playing MPEG movies ...
I don't want to use MCI for playing MPEG movies ...
Please help me ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
If you want reusable source code, I would suggest Virtual Dub.
If you just need a run-time and an SDK, you of course have DirectShow, part of DirectX. But this run-time does not play frame-accurate MPEG videos, which is a disgrace.
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|