|
for Write the Interface without follow these Steps
!.In the yourProjectname.idl add your custom Interface
@.add a Declaration in ProjectLib column in .idl file and define CoClasss for Interface
#. add a class which will handle you Interface Internally.
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Alok,
Actually I have to add functionality in a already developed project. The project contains 11 dlls dependent on each other. When i tried to add a class and interface in the DLL through new ATL Class wizard it gives me the error that
error C2065: 'IACurrentReading' : undeclared identifier
Entries of the Interface is in the idl file but still it is not considering it.
All IDs have entries in _i.c file of my project which is created by the compiler with MIDL settings.
Do i need to set any MIDL settings so that the IDs get generated and gets added in the corresponding file
Rits
|
|
|
|
|
Axtaully do one thing
delete _i.c,_p.c dlldata.c and project.h file
and clean the Workspace
and recompile/Build the project and tell me the result
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Actually I got the exact problem and the problem is that I need to run midl with the idl file of project but when i give command
midl readingmanager.idl
It gives error
error MIDL2025 : syntax error : expecting a type specification near "HRESULT"
MIDL compiler version is 5.01.0164 and it is not a problem of updating visual studio bacause previously the file was complied with the same compiler.
Rits
|
|
|
|
|
Send me your your IDL file , i think i will check out myself what the problem is
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
I m trying to get the selected date from the outlook calender.
But when i get the explorer and try with selection object, even though i selected few dates in the outlook calender, the selection object count shows 0.
I need to get the selected dates only not the appointments for those dates.
Can anyone help me.
Thanks in advance!
|
|
|
|
|
hi!
i m going to work on a project where i have to create an activex control for MS Word and Excel. which i will use to read any type of data (Supported by MS Word and Excell) from MS Word and Excel for some manipulation on it. can any body help me to find out some walkthrough or any type of help useful for me.
thanx.
Ahmad Jalil Qarshi
|
|
|
|
|
You have some solutions:
1 You can write plugin-addin for MsWord & MsExcell , you must implements IDExtensibility interface.(The client machine must have MSExcel-MsWord install)
2 You can access from MsWord.Application & MsExcel.Application COM class (The client machine must have MSExcel-MsWord install).
3 You can Access with ADO (ACtivex DAta Object) connecting with msexcel a database.(The client machine must have MDAC install, Win98SE-Win2k-WinXP go in install)
You choose that you prefer..
I am sorry for my bad english.
Good Lucky!
|
|
|
|
|
Hi,
I have a toolbar and I am trying to access the IWebBrowser2 in WM_LBUTTONDOWN, when someone clicks on a control on my toolbar with the following code:
BSTR bstrUrl;
CComPtr<iwebbrowser2> browser;
browser->get_LocationURL(&bstrUrl);
I am getting a debug assertion failed!
p!=0
I know there should be more to the code. Can somebody help?
|
|
|
|
|
Hi
Assuming p refers to the interface pointer in CComPtr, you need to initialise it first - CComPtr needs to hold a valid reference to an IWebBrowser2 interface.
HTH
Martin
|
|
|
|
|
Sorry, but how would I initialize it? I am a newbie to ATL. Sorry, I forgot to mention that I have instantiated a webbrowser object in the toolbar class in another file with:
IWebBrowser2* m_pBrowser;
|
|
|
|
|
Nice question =)
Here is an example of 'SetSite' function for your toolbar.
So, you will get IWebBrowser2* to m_pWebBrowser variable.
IWebBrowser2 * m_pWebBrowser;
...
STDMETHODIMP CToolBarImpl::SetSite(IUnknown* pUnkSite)
{
...
IServiceProviderPtr pServiceProvider = pUnkSite;
if (m_pWebBrowser) m_pWebBrowser = NULL;
if (FAILED(pServiceProvider->QueryService(SID_SWebBrowserApp, IID_IWebBrowser2, (void**)&m_pWebBrowser))) return E_FAIL;
if (m_pWebBrowser==NULL) return E_INVALIDARG;
...
return S_OK;
}
|
|
|
|
|
Thanks for the reply.
My toolbar class already has a SetSite function that basically does what your function does. I, however, also have a seperate file that is used the by the toolbar. The file is a non-class, with a function that converts a Static control into hyperlink, and then when the hyperlink is clicked, it does a ShellExecute to send you to a certain url.
Problem is, in that function that sends you to the certain, I need to obtain the browser object to do a get_LocationUrl, which is what I've been having problems with.
|
|
|
|
|
Hi,
can anyone tell me how macromedia does their silent install of the flashplayer?
thanks
badi
|
|
|
|
|
You have flash.ocx or swflash.ocx sw(shockwave)component ActiveX distribuited for Macromedia , you must do in your instalation regsvr32 /s flash.ocx..
Instance Interface ocx .. Call methods & properties ... is easy
Good Lucky!
Sorry for my bad english.
I hope that You can excuse me )
|
|
|
|
|
My ATL service crashes when it is being stopped by the system (its startup mode is "automatic"). This happens only if the service is running on Windows XP and is being stopped automatically (not manually).
The source code:
HRESULT CMyServiceModule::PostMessageLoop()<br />
{<br />
RevokeClassObjects();<br />
LogEvent(_T("Service stopped"));<br />
CoUninitialize();<br />
<br />
SetServiceStatus(SERVICE_STOPPED);
<br />
return CAtlServiceModuleT<CLegnLicenceServiceModule, IDS_SERVICENAME>::PostMessageLoop();<br />
}
The debugger shows that m_hServiceStatus is NULL.
Thank you in advance for any ideas.
|
|
|
|
|
Hi
It's a bit weird since m_hServiceStatus is a member of the statically allocated CMyServiceModule class.
Anyway, what I'll try to do is;
see if the m_hServiceStatus is non-NULL when the PostMessageLoop function is entered. If so, RevokeClassObjects or CoUnitialize (or another thread) will be fiddling with the module object.
If you can't find whatever code is setting the m_hServiceStatus to NULL, you may find it's address (say after the service is started) and set a breakpoint that monitors an address (ie. set a Condition to 'when (*(int*) 0x12345678) changes' and 0x12345678 is the address of the m_hServiceStatus data member).
Are you sure it's not CoUnitialize causing the exception? - typically things will go bonkers if you still have outstanding COM references and call CoUninitialize. Could it be another app still has COM references to objects allocated by the ATL service?
Martin
|
|
|
|
|
Home > Software > Internet Explorer IE5 Programming Components Browser Control > How to open Web...
Post 1 of 1
Topic 259 of 260
How to open Web Browser from Outlook Addin
by "devom" <devom@rediffmail.com> Jan 14, 2005 at 02:30 AM
I had created an Outlook Addin using VC++ ATL.There I had created button on
Outlook Toolbar.I
want to open a Web Browser window on clicking on the button.The web
Browser Window could not have any
Buttons,Toolbars etc.eg.I just want to open www.rediff.com in the window
upon initialisation.Next, I want to capture
click events on the rediff page.(Eg. on what picture in the html page did
the user clicked)
How should .I move forward .Plz explain with steps
Thanks in advance
|
|
|
|
|
Why you do'nt create SDI-HtmlView with WTL wizard no toolbar no status etc..?
You must be put your "http::\yourwebpage" in parameters creation view and works finished..
If you want capture click events etc.. you must get IWebBrowser2 Interface, You can read this article http://www.codeproject.com/wtl/wtlbrowser.asp
Good Lucky!
|
|
|
|
|
You can start from this:
IWebBrowser2* RunIe( bool show )
{
IWebBrowser2 *pIE = NULL;
HRESULT hr = CoCreateInstance(CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, (void**)&pIE);
if (SUCCEEDED(hr) && show) pIE->put_Visible(VARIANT_TRUE);
return pIE;
}
So, you will have IWebBrowser2* to control IE window then (remove toolbars, set the size, set even handlers, etc...)
|
|
|
|
|
Hello,
I have text in bstr string. Text is in some code page.
How to convert text from code page to UTF8 and put it in wchar_t?
|
|
|
|
|
Hello,
I am beginner in STL and never use it in MSVC. I am developing an application DLL that I have a template for it which is based on STL. When I am trying to compile the template I will get the following error for this line of code. What is the problem and how can I solve it? Is it related to the way that I setup my MSVC?
I am using MSVC 6 on window XP sp1:
Line that generate error:
typedef vector<string>::value_type value_type;
Error message:
error C2653: 'vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > >' : is not a class or namespace name
I check and it seems that vector is included to the file.
Best regards
Mansour
|
|
|
|
|
|
Hi i writing my own OLEDb provider so some other application.
for this i need to replace the existing Connection and Advanced tab
provided by Microsoft OLEDB.
so if any body can help me out then it will be really great assistance to me
I am using VC++ 6.0 with service pack 6.
Thanks in advanced
Zeeshan
|
|
|
|
|
Hi,
I am using ATL to create a toolbar with a initially positioned static control in it with the following code in my Toolbar Class:
CWindow m_TextWindow;
LRESULT CToolbar::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
HWND m_Text = CreateWindow("STATIC", "Test Text", WS_CHILD | WS_VISIBLE, 465, 4, 15, 20, m_hWnd, NULL, NULL, NULL);
m_TextWindow.Attach(m_Text);
return 0;
}
In my OnSize function, I have the following code:
LRESULT CToolbar::OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
RECT staticRect;
::GetClienRect(m_TextWindow, &staticRect);
staticRect.right -= 100;
return 0
}
However, I can not position the Static Control whenever I size the window.
Thanks in advance.
|
|
|
|