|
When I am trying to use sendmessage to load property page to FireFox browser using the message below ( ,which is successful in IE. )
gives error. Any Alernative for mozilla FireFox.
::SendMessage(m_hWnd, PSM_INSERTPAGE, 0, (LPARAM)&m_EditPage.m_psp);
|| ART OF LIVING ||
|
|
|
|
|
Is there any way to simulate the press of 'ENTER' key on IE.We have a password field,which invokes a javascript function to log the user in,on press of ENTER.
We need to reproduce this action automatically - ie after filling the userid and password,we need to invoke the ENTER key.
We fill up the userid/password fields by elem->setAttribute(..,..,0),where pelem is the IHTMLElement interface.
But we are not able to simulate the press of ENTER.
Any help will be appreciated.
thanks.
|
|
|
|
|
Hi All,
My requirements needs me to pass an instance of a class xyz in a third party component(OCX) to my dll in ATL COM. how do i go about this?
We all know that passing parameters in the constructors of the exposed atl classes/objects is literally impossible unless i write my own atl library(oops sorry bad joke!).
That means the only option i have is to pass this third party component
instance to a method, i hope this is possible, even if it is, how do i define
the 'xyz' data type in the idl file?
<br />
import "oaidl.idl";<br />
import "ocidl.idl"; <br />
[<br />
object,<br />
uuid(AB375A74-76CB-4BBC-BFED-141791262B38),<br />
dual,<br />
helpstring("IExposedATLClass Interface"),<br />
pointer_default(unique),<br />
oleautomation<br />
]<br />
interface IExposedATLClass : IDispatch<br />
{<br />
[id(1), helpstring("method GetInstance")] HRESULT GetInstance([in] Ixyz *instance);<br />
};<br />
<br />
[<br />
uuid(3C9EB277-EC91-4E42-8CD7-34F918490B69),<br />
version(1.0),<br />
helpstring("MYDLL 1.0 Type Library")<br />
]<br />
library MYDLLLib<br />
{<br />
importlib("stdole32.tlb");<br />
importlib("stdole2.tlb");<br />
importlib("thirdpartycomponent.tlb");<br />
<br />
<br />
[<br />
uuid(4DC3999A-797D-4F9A-8955-812E87E4B6D0),<br />
helpstring("ExposedATLClass Class")<br />
]<br />
coclass ExposedATLClass<br />
{<br />
[default] interface IExposedATLClass;<br />
};<br />
};<br />
the compiler doesnt recognize the xyz data type...
i import the component(OCX) in my stdafx.h file, my idl file imports the midl compiler generated .tlb file in my library namespace, after all this when i try importing the component's idl file in my idl
<br />
import "oaidl.idl";<br />
import "ocidl.idl"; <br />
import "thirdpartycomponent.idl";<br />
the compiler reports ambiguous symbols.
what should i do?
I'd really appreciate any kind of help/suggestion here.
nikhil
|
|
|
|
|
Hi all -
I can't find the hash_map file in VC6 STL include folder. Could somebody give me exact link from MSDN to download the ext folder, which contains this hash_map file?
Thanking in anticipation..
Misha
|
|
|
|
|
STL in VC6 doesn't have hash_map. At all. Not even a download from MSDN. You could a) find a third party implementation that you can drop in (I don't know of one), b) use STLport[^] (free) rather than the DinkumWare STL that comes with VC6, c) buy and use the (not free) DinkumWare[^] Standard C++ Library (this is a newer version of the one that comes with VC6) or d) upgrade to VC7.1 (VS2003), although I'm presuming that's not an option.
|
|
|
|
|
The Boost.MultiIndex library can do this and much more besides.
Steve
|
|
|
|
|
Hi,
I have a WTL app in which i have a property page based on CPropertyPageImpl.
On that page i have a Static Text Control which is basically sample of the text selected and thus labeled IDC_SAMPLE.
no i mapped WM_CTLCOLORSTATIC using MSG_WM_CTLCOLORSTATIC(OnCtlColorStatic)in a BEGIN_MSG_MAP_EX. and my implementation is a s follows :
LRESULT CItemAppearanceOptsImpl::OnCtlColorStatic(HDC hDC, HWND hWnd)<br />
{<br />
long lWndID = ::GetWindowLong(hWnd, GWL_ID);<br />
if (lWndID == IDC_SAMPLE)<br />
{<br />
::SetBkMode(hDC, TRANSPARENT);<br />
::SetTextColor(hDC, m_cfb->GetBarItemColor());<br />
::SetBkColor(hDC, ::GetSysColor(COLOR_BTNFACE));<br />
if (m_returnBrush) m_returnBrush.DeleteObject();<br />
m_returnBrush.CreateSysColorBrush(COLOR_BTNHIGHLIGHT);<br />
SetMsgHandled(TRUE);<br />
return (LRESULT)m_returnBrush.m_hBrush;<br />
} <br />
else<br />
{<br />
SetMsgHandled(FALSE);<br />
if (m_returnBrush) m_returnBrush.DeleteObject();<br />
m_returnBrush.CreateSysColorBrush(COLOR_BTNFACE);<br />
return (LRESULT)m_returnBrush.m_hBrush;<br />
}<br />
}<br />
m_returnBrush is a CBrush defined in the header and set at OnInitDialog to COLOR_BTNFACE.
now if i change the single line
m_returnBrush.CreateSysColorBrush(COLOR_BTNHIGHLIGHT);
to m_returnBrush.CreateSysColorBrush(COLOR_BTNFACE);
no change in color occurs - i.e meaning that it doesn`t work.
any ideas why? using COLOR_BTNHIGHLIGHT gives it a different look than the rest of the Page and I want a uniform UI.
thanks in advance.
|
|
|
|
|
Hello everyone,
I need to make Application that uses IShockwaveFlash, could anyone help me on how to check if flash.ocx (or whatever it uses) is installed, and if installed what version is installed?
|
|
|
|
|
try
CLSIDFromProgId(L"ShockwaveFlash.ShockwaveFlash", &clsid);
if this function is SUCCEEDED then flash is installed. Also CoCreateIstance can be tried to make sure.
Sudeesh
|
|
|
|
|
|
hello friends i m converting vc .net 2003 project into vc 2005 (vc7).
i open my proj in vc2005 and then compile . i m getting following error in header file atlmisc.h file.
c:\program files\microsoft visual studio 8\vc\include\atlmisc.h(1159) : error C2440: 'return' : cannot convert from 'const wchar_t *' to 'TCHAR *'
can someone help me......
Harish
|
|
|
|
|
I suspect you are using WTL's version of CString. Dump the atlmisc.h, and include atlstr.h instead, to use ATL's version of CString. It might also do you some good if you upgraded WTL too.
--
Mr. Bender's Wardrobe by ROBOTANY 500
|
|
|
|
|
I want to load the menu in my application from an xml on same computer.
Can any one tell me about use of xml. I am new to that sector and hardly any help is available. I found one article on code project about dynamically loading of menu
from website. but ie win32 application ,and moreover as the webaddresses have changed
it is not working. Can any one tell answer ,or referances ,orname of relevant good books.
|| ART OF LIVING ||
|
|
|
|
|
You should ask in the XML Forum[^], not in here.
However, to save your first post being a copy of this, here's a few things to get you started.
In your stdafx.h file (or whatever you're using as a precompiled header) put
#import <msxml.dll> rename_namespace("MSXML") raw_interfaces_only named_guids
That will give you declarations for the various MS XML interfaces and such.
Secondly, you need to instantiate a document. Here's where it's a little tricky, since you have to know what version of MSXML you want to use.
CComPtr<MSXML::IXMLDOMDocument> spDoc;
HRESULT hr;
CLSID clsid;
if (SUCCEEDED(::CLSIDFromProgID(L"MSXML2.DOMDocument.3.0", &clsid)))
{
hr = ::CoCreateInstance(clsid, NULL, CLSCTX_ALL, MSXML::IID_IXMLDOMDocument, reinterpret_cast<void**>(&spDoc));
if (SUCCEEDED(hr))
{
// Yay, we have a document object!
}
}
Once you have one of those, you can load it
VARIANT_BOOL bLoaded = VARIANT_FALSE;
hr = spDoc->load( _variant_t(sourcefile), &bLoaded);
if (SUCCEEDED(hr) && bLoaded)
{
// Your document is loaded, use MSXML methods to interrogate the DOM document
// and extract your data...
}
MSDN has lots of information on IXMLDOMDocument and the other related interfaces, so dig around in there, or ask questions in the XML forum.
Steve S
Developer for hire
|
|
|
|
|
I design a ocx control based MFC ActiveX Wizzard,and It work and display well
and display in the test container of VC and other develop environment such as
VB.But it can‘t show rightly when I insert it to the word document.
About my ocx : A project based MFC ActiveX Wizzard , I placed a CSlider
control in the bottom of my control which was created dynamically. When drag the
slider I change bitmap from my resouces which displayed in the remainder part of
the control.
God save me! 3Q the expert provided clue or answers to the question.
Thanks!
|
|
|
|
|
I test it again ,and I found that The ocx control can not display in design mode
of word but do in normal mode. It's the practical case.
Could anybody help me to make the ocx control display the UI in design mode of
word also ! Thanks.
|
|
|
|
|
Please help me.I have problum that when i change the asp pages are shown on top left cornor.i want the asp pages are shows same on different resulotion.
ayaz ullah
|
|
|
|
|
Hello !
you might have specified the length/width of the objects(like tables) in pixles. To look you page same on different resolution, specify the object scales in percentage (%).
-Malli...!
|
|
|
|
|
Following things I done so that I stop getting errors.
1) Copied WTL folder at various places
2) Copied WTL files in VC98, and many combinations.
3) I installed WTL wizard
4) Tools --> options I included, directories ,libraries etc
It gives errors in bunch for CString ,IXMLDOMDocument and upto 103 same.
if any one know how to link WTL.
Compiling...
MainTool.cpp
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2039: 'CString' : is not a member of 'WTL'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2146: syntax error : missing ';' before identifier 'GetXML'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2501: 'CString' : missing storage-class or type specifiers
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2065: 'IXMLDOMDocument' : undeclared identifier
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2955: 'CComPtr' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(563) : see declaration of 'CComPtr'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : fatal error C1903: unable to recover from previous error(s); stopping compilation
NatureOfMind.cpp
d:\shiv\w32\atlcom\natureofmind\xmldom.h(49) : error C2143: syntax error : missing ',' before '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(49) : error C2059: syntax error : '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(61) : error C2143: syntax error : missing ',' before '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(61) : error C2059: syntax error : '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2039: 'CString' : is not a member of 'WTL'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2146: syntax error : missing ';' before identifier 'GetXML'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2501: 'CString' : missing storage-class or type specifiers
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2065: 'IXMLDOMDocument' : undeclared identifier
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2955: 'CComPtr' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(563) : see declaration of 'CComPtr'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : fatal error C1903: unable to recover from previous error(s); stopping compilation
ReflectionWnd.cpp
d:\shiv\w32\atlcom\natureofmind\xmldom.h(49) : error C2143: syntax error : missing ',' before '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(49) : error C2059: syntax error : '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(61) : error C2143: syntax error : missing ',' before '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(61) : error C2059: syntax error : '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2039: 'CString' : is not a member of 'WTL'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2146: syntax error : missing ';' before identifier 'GetXML'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2501: 'CString' : missing storage-class or type specifiers
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2065: 'IXMLDOMDocument' : undeclared identifier
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2955: 'CComPtr' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(563) : see declaration of 'CComPtr'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Supl.cpp
d:\shiv\w32\atlcom\natureofmind\xmldom.h(49) : error C2143: syntax error : missing ',' before '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(49) : error C2059: syntax error : '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(61) : error C2143: syntax error : missing ',' before '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(61) : error C2059: syntax error : '&'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2039: 'CString' : is not a member of 'WTL'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2146: syntax error : missing ';' before identifier 'GetXML'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(64) : error C2501: 'CString' : missing storage-class or type specifiers
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2065: 'IXMLDOMDocument' : undeclared identifier
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : error C2955: 'CComPtr' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(563) : see declaration of 'CComPtr'
d:\shiv\w32\atlcom\natureofmind\xmldom.h(88) : fatal error C1903: unable to recover from previous error(s); stopping compilation
Surrender.cpp
d:\shiv\w32\atlcom\natureofmind\xmldom.h(49) : error C2143: syntax error : missing ',' before '&'
|| ART OF LIVING ||
|
|
|
|
|
What version of Visual Studio are you using?
Have you tried building a new test application?
You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!"
Only kings, presidents, editors, and people with tapeworms have the right to use the editorial "we."
|
|
|
|
|
Are you including atlmisc.h? That's where CString is defined. You typically include this in stdafx.h.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I am using VC++ 6.0 and have included atlmisc.h
|| ART OF LIVING ||
|
|
|
|
|
This problem is yet not solved ?
|| ART OF LIVING ||
|
|
|
|
|
Patience is a virtue; do you think we have nothing better to do than answer questions all day?
Before you include any WTL headers, try
#define _WTL_USE_CSTRING
This tells WTL to define and use it's own CString implementation, instead of relying on the MFC one. If you have VC7 or later (which you apparently don't), CString doesn't really need the rest of MFC.
Steve S
Developer for hire
|
|
|
|
|
Dear Friend
Did you noticed problem is not with only CString. It is giving problem with
d:\mrutyunjaya\xmlload\xmldom.h(82) : error C2065: 'IXMLDOMDocument' : undeclared identifier
d:\mrutyunjaya\xmlload\xmldom.h(82) : error C2955: 'CComPtr' : use of class template requires template argument list
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(563) : see declaration of 'CComPtr'.
Thanks for CString suggestion I will try that.
We have came in world only for doing human service , that is only joy on this earth which dont have tail of sorrow.
|
|
|
|