|
though it doesn't been covered.
|
|
|
|
|
|
i use AtlAxCreateControlEx to create a flash activex control and attach it to m_wndChild. I can receive the IUnknown of the created control, but how can i get the hwnd of this control?
code like this:
AtlAxCreateControlEx(
wszClsid,
m_wndChild.m_hWnd,
NULL,
NULL,
&m_spControl,
Flash::DIID__IShockwaveFlashEvents,
(IUnknown*)(IDispEventImpl<1, CFlashWindow, &Flash::DIID__IShockwaveFlashEvents, &Flash::LIBID_Flash, 1, 0>*)this
);
-- modified at 3:41 Monday 10th October, 2005
|
|
|
|
|
hi
i m new to the atl i want to know would i need to install extra software for the atl programming in visual c++6 or 7. and if its documnetation or help is present in the msdn2004. like mfc help present is msdn
ddd
-- modified at 4:11 Friday 7th October, 2005
|
|
|
|
|
tasleem143 wrote:
i m new to the atl i want to know would i need to install extra software for the atl programming in visual c++6 or 7.
No.
tasleem143 wrote:
and if its documnetation or help is present in the msdn2004. like mfc help present is msdn
Yes.
Kevin
|
|
|
|
|
Anyone know of a good book covering Boost?
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
|
Hello,
I just switsched from C++ 6.0 to VS .NET, and some code that compiled before does not compile any more:
CString cNum = "123";
unsigned short* ss;
DWORD dwRet = (DWORD)wcstod(cNum.GetBuffer(0),&ss);
error C2664: 'wcstod': conversion of parameter 1 von 'ATL::CSimpleStringT<basetype,t_bmfcdll>::PXSTR' into 'const wchar_t *' impossible
What do I have to do? I do NOT want to use the .NET framework nor ATL, only MFC? I suppose I have to switch some compiler parameters?
Thanks a lot!
Martin
|
|
|
|
|
Assuming you're doing a Unicode build, the GetBuffer() call is unnecessary. The first param to wcstod() is a LPCWSTR , and CString has a conversion operator that will be called automatically.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
Ford, what's this fish doing in my ear?
|
|
|
|
|
Thanks a lot, due to your answer i was able to get the code compiling now. I thought new .NET projects were unicode by default, as i could not find a switch. but now i found it and it works fine.... i appreciate it very much, thanks....
Martin.
|
|
|
|
|
Although you already have an answer to the CString -related issue, I note that you are using wcstod(...) instead of wcstoul(...) .
I could understand if you might be handing strings that contain values in the higher ranges of the double type, but you are truncating them via the cast to DWORD ...
Passing an unsigned short type as the second parameter to the wcstod(...) function might be technically incorrect now, too; it should be wchar_t , as wchar_t is (can map to) a native type in VC++ .Net and above (see __wchar_t for details).
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hi,
hope somebody can help me with this question:
I'm writting a BHO that needs to be aware of user actions with mouse in explorer window. Most of the work is done easily using elementFromPoint to retrieve html element under current cursor position. However I've got a hard time with combo boxes within the page. I cannot find a way of getting what the user has selected (expanding the menu and clicking on an item).
Messing around with spy++, I found out that whenever a selection is made, the TridentCmboBx class receives a CB_GETCURSEL request and responds with the actual selection. Which is exactly what I need. However this is not sent to Explorer_Server class, nor any other explorer window I can track through spy.
So what I'm asking is, does anybody have any more info on this? MSDN states vaguely that the msg is sent to "interested application".
I guess another solution would be to hook/subclass the combobox to get the messages my self, but if there's a page with many combos then its hard whereas if the msg is sent to a window i already watch like Explorer_server this would save me the trouble.
Thanks in advance.
petevam
|
|
|
|
|
I just thought of something that might do the job. I'm thinking about sending the CB_GETCURSEL to the combo myself each time I need it. Sounds simple. Will need to get the handles to all combos in the page though.
-- modified at 14:38 Thursday 6th October, 2005
But then again, how do I know when I need it? There's the catch.
|
|
|
|
|
Could anyone please tell me how to define and use an "enum" (i.e., UDT) within ATL7? That is, within the .h file rather than the .idl file. I am doing this:
[<br />
uuid("09GGGB2E-BA1D-4349-900A-DA8F5B8DD24C")<br />
] <br />
enum OmniTrackerCommands<br />
{<br />
kOTC_Startup = 0, <br />
kOTC_Query = 1<br />
} OmniTrackerCommands;<br />
<br />
[<br />
object,<br />
uuid("F17B0F10-6FF5-4C14-A4A8-C513ACGGGE4A"),<br />
dual, helpstring("IDataTransmitter Interface"),<br />
pointer_default(unique)<br />
]<br />
__interface IDataTransmitter : IDispatch<br />
{<br />
[id(1), helpstring("method Send")] HRESULT Send([in] OmniTrackerCommands command);<br />
};
and I am getting a compilation error C2061: syntax error : identifier 'OmniTrackerCommands'.
Any help would be greatly appreciated.
|
|
|
|
|
[id(1), helpstring("method Send")] HRESULT Send([in] enum OmniTrackerCommands command);
|
|
|
|
|
Hi,
I am using Led Library (Text Control) which is wrappers on MFC in the form of template classes.
I want create Control (or Ocx) from the View class of this library.
I tried using ActiveX wizard as well as ATL.
But not getting visual effect of OCX as we will get when we build ocx from CEdit.
How can i DO IT?
Thanks in advance
-Hemant
|
|
|
|
|
Hi,
I am using Led Library (Text Control) which is wrappers on MFC in the form of template classes.
I want to build from the View class of this library
|
|
|
|
|
While compiling a project in which i am using WTL i am getting the following error
i:\hcl\cybertrace\KT-docs\ct-code-personal\CT Ver1.2\Client\CtShell\wtl71\\include\\atlctrls.h(1833) : error C3861: 'ImageList_Read': identifier not found, even with argument-dependent lookup
What should i do for that.
Sunil Virmani
|
|
|
|
|
Take a look at your commctrl.h include file or if NOIMAGEAPIS is #define d. If it doesn't contain the function prototype, chances are that your platform sdk is of ancient origin.
--
|
|
|
|
|
What are the limitations of using an ATL? Can a regular program (of course w/o GUI) be implemented as an ATL including calling a function inside the same .cpp, using structs, CStrings, MFC functions, etc? Thanx
|
|
|
|
|
Hi,
I have MFC static library Led Lib which is editor library.
I want to implement the View class of this library as Control using ATL COM?
Tried but not getting the actual Picture?
How can I do it?
Thanks in advance
-Hemant
|
|
|
|
|
what are .tlh files?
could anyone give me the links for COM tutorials?
thanx in advance
|
|
|
|
|
nvamshi wrote:
could anyone give me the links for COM tutorials?
http://www.codeproject.com/com/[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
.tlh and .tli files are created automatically by the compiler when you #import typelibraries. The .tlh file contains the "header" part, and the .tli file contains the "implementation" part, should you generate dispatch wrappers and stuff like that. These files are injected automatically into the code by the compiler, so you don't have to worry about them.
--
Look straight into the light!
|
|
|
|
|
I know the composite control is implemented by CWindowImpl.I think i can get the HDC of the control and operate it.but always occur an error.
my code as follow(in control class):
HDC hdc = GetDC();
LPSTR lpText = "hello world";
::TextOut(hdc,0,0,lpText,lstrlen(lpText));
ReleaseDC(hdc);
I use this control in ie.the code can execute successfulLy.but an error report will gave when i close the ie.error message:Microsfot Internet Explorer met an question and need to be closed...
the same thing happened when i operate the contained control in the dialog.
HDC hdc = ::GetDC(GetDlgItem(IDC_xxx));
::TextOut(hdc,0,0,lpText,lstrlen(lpText);
ReleaseDC(hdc);
I don't know if i say it clearly.thanks all.
|
|
|
|