|
Hi. ive created a simple BHO(browser helper object) with ATL.
im handling the ondocumentcomplete event and i want to capture the mouse position in the document , i know that there is a really good javascript functions that do that, but the question is can i use in some way javascript code in my ATL project?
|
|
|
|
|
The GetCursorPos API can do that for you.
«_Superman_»
|
|
|
|
|
getting the mouse position is only part of what i want to do, so i need to know can i use javascript or must i use c++ code to achive javascript functionality.
|
|
|
|
|
Microsoft does have a script engine that you can use to run VBScript and JScript from C++, but that is an overkill.
I'm sure all that javascript does can be done in C/C++.
And that would be the way to go on Performance, Size etc.
«_Superman_»
|
|
|
|
|
I have a CLR Application where I am trying to write a .NET wrapper over calls made to native C++ Library. I am using VS 2008 but libraries are compiled in VS2003 or 2005. I am getting some linker errors on linking. Strangely, every error is 1 of these 3 unresolved external symbol ones -
1. std::locale::facet::_Register
2. std::ctype&::_Getcat
3. std::strstream::strstream
Details of the errors -
error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall std::strstream::~strstream(void)" (__imp_??1strstream@std@@UAE@XZ)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::locale::facet::_Register(void)" (__imp_?_Register@facet@locale@std@@QAEXXZ)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<char>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@D@std@@SAIPAPBVfacet@locale@2@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: static unsigned int __cdecl std::ctype<unsigned short>::_Getcat(class std::locale::facet const * *)" (__imp_?_Getcat@?$ctype@G@std@@SAIPAPBVfacet@locale@2@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::strstream::strstream(char *,int,int)" (__imp_??0strstream@std@@QAE@PADHH@Z)
Thanks a lot for the help.
Amit
|
|
|
|
|
AFAIK, mixing different runtime models will work some time, but not supported. I am not sure though.
|
|
|
|
|
Member 5703905 wrote: I am using VS 2008 but libraries are compiled in VS2003 or 2005
Make sure you know which one it is, (VS2003 or 2005), 'cause you're going to have to link to its C++ runtime library (MSVCP71 - VS2003 - or MSVCP80 - VS2005). Even then, it might not work, because of mismatches in the C run-time library versions.
|
|
|
|
|
Hi,
I would like to write an application which would let me use remote control from my TV card to turn on some apps like music player. The receiver of signals from my rc is connected to TV card. There is also an application which receives the messages when I press some button on remote control. The problem is that, I can't catch all messages using the WH_GETMESSAGE hook and WM_USER parameter for MSG structure. I mean, when I press buttons which are responsible for turning on TV and radio, my application receives a message, but if I press another button like "1" or "Mute", nothing happens. I also have tried using WM_COMMAND and it works, but only if the TV is turned on. And here is my question: Is this possible to catch somehow messages connected with another buttons when my TV is turned off?
Thanks in advance and sorry for my english.
modified on Friday, January 23, 2009 2:43 PM
|
|
|
|
|
First of all, tell me if i am right or wrong: You made a program which hooks into the other application -probably one you got with your TV card- to catch messages (and perform your bidding) it sends itself when the remote control is invoked. If so, you could try using Spy++ to see what messages are being sent when certain buttons are pressed for starters. But it can also be that that certain program will only respond to certain remote-keyhits when an application it knows about is running and responds to these, that's why your commands work only when you TV program is running. What is that proggie you are hooking into?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
hmm.. the program, I have made, sets a global hook (so I used DLL) which "probably" catch all messages, before any other application receive them, and when the message has a WM_USER parameter then on the screen is displayed a Message Box. If I don't press "OK" button, the message won't be passed to it's destination app. I'm new to the C++ and WinApi, so this is how I think it works due to things that have happend when I've launched it and pressed some button on remote control. And it looks to my that, when I press other buttons, than TV and FM, messages aren't generated by OS, drivers or some other programes connected with my TV card. And the program, I'am hooking into is WinFast Wizard. Probably there is some other application that receives all signals from my remote control, but if so, then I don't know how it's called like.
And about Spy++ (I've had no idea that something like this exists, so thank you for advice)....
I'am using DevC++, and as I know from the msdn site the spy++ is a part of Visual C++. I've got somewhere 2008 Express Edition but is Spy++ in there too?. I didn't see any information about it, that's why I ask.
modified on Friday, January 23, 2009 4:24 PM
|
|
|
|
|
Well, if controlling applications is all you want to do then -if i were you- i'd look for some already written application to achieve it, like this[^], there are usually tonns of apps like that to allow you control. No use reinventing the wheel.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks, this application does almost exactly that what I wanted my app for, but anyway I want to write my own program. If I make it, I will have a satisfaction, useful program which looks and behave as I want to, and I will learn something new. That is why I didn't look for already written apps. So, I will keep trying. One more time thank you for help, I'm sure that spy++ will be helpful (if I get it somehow) and in case of failure I can use the application you pointed to.
|
|
|
|
|
Hi.
I've been googling this for a while now, and I still find no good answer for it.
Before you throw RTFM at me, I'm still searching for the answer.
But if you've been through this before, any useful links are appreciated.
This would fold nicely:
This would fold nicely also:
This wouldn't fold:
This wouldn't fold either:
It won't kill me to see these, but as the code grows it's getting harder and harder to see the function names.
|
|
|
|
|
Doxygen provides several ways to mark what it should process. Have you tried the alternatives like:
or
or
|
|
|
|
|
Thanks for your reply!
The slash star and slash slash exclamation is out of the question due to company's coding standard.
What I don't understand is why the triple slashes when it's tabbed inside it won't fold? I don't think the Eclipse CDT team haven't noticed that format already...
|
|
|
|
|
Using the vertical tab control style TCS_VERTICAL in themed XP is not possible, because Windows draws the tab horizontal instead of vertical. I have written code (in Win32) to draw the tabs vertical. The TCS_OWNERDRAWFIXED flag should prevent Windows from updating the tab. However, Windows still paints the tab background. Only the interior (text and icon) is not painted. To my code it means that one or more of the tabs are drawn empty, because Windows painting is done after my code is executed. Moreover, in a single line tab control with tabs extending the client window, Windows adds a spin control for scrolling. It seems to be updated elsewhere than WM_PAINT, because my code can get it disappear.
Does anyone know how to control the way Windows is drawing the tab control?
Best regards
Anton112
|
|
|
|
|
Check out this[^] article, maybe it can give you hints. Good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks for your answer.
I cannot argue that I can't use anything from it. But it still doesn't answer the main part of my question: how do I prevent Windows from painting the tab control background. I cannot use the sample directly because I don't have MFC (that's why I'm using Win32).
Thanks.
Anton112
|
|
|
|
|
Did you try handling WM_ERASEBKGND[^]?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Yes, I have tried. It makes no difference.
Anton112
|
|
|
|
|
I'm out of ideas right now, sadly afaik in many controls the WM_PAINT message and such sort does not get always invoked when drawing occurs, instead probably the drawing code gets called directly by who knows what event handlers. I have seen this happening a few times. Of course i could be wrong...
Anyways, try adding the WS_EX_TRANSPARENT style, no idea if it changes anything or even if it does not make things worse, it's just a hinch.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Apperently, WS_EX_TRANSPARENT makes no difference.
Anton112
|
|
|
|
|
Are you handling WM_DRAWITEM[^]?
Best Wishes,
-David Delaune
|
|
|
|
|
|
Sorry, what is AIM?
Anton112
|
|
|
|