|
Dear All ,
I got a problem can you solve this,
The user as he moves on the mouse over a Microsoft Word Document,
i should be able to fetch the word at his mouse pointer and display the word
in vc++ program. Usually the mouse points at a character , i should be able
to fetch the whole word. This is only for the client area.
How can i attach to the running instance of word document ,
and how to relate the pixel on screen to the coresponding text (word).
Any idea, how to go about the problem,
thanks in advance,
with regards,
alex.
alex_ludy@yahoo.co.in
|
|
|
|
|
Well, this is a variation on a question that seems to do the rounds quite often. If it's within Word, it may be possible, but I have no idea how. Have you looked at MSDN to see what methods Word exposes via COM ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
Application.Selection is a good automation object to start with. btw, Selection.Text returns the current selection.
How low can you go ? (MS rant)
|
|
|
|
|
All I can say is that there is probably no easy solution to this problem. To get help you should:
- browse the Word type library ( c:\program files\Microsoft Office\Office\MSWORD9.OLB )
- check out some microsoft newsgroups - there is an excellent search at http://www.tamaracka.com/mssearch.htm[^]. The best Word MVP there in my opinion is Cindy Meister - do a search on her posts and see what newsgroups you get.
- then there's http://www.mvps.org/word[^]
but as I said, I don't think there is an easy solution to this problem.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I have been told to write a list of 27 items, each with 6 subitems describing their colours, shapes, border sizes etc to the registry. In the past I have asociated two comma seperated items, within one registry key, with each other, but with this much data this seeems inefficient.
My question, is there a more efficient way of storing all these related items within the registry?
well hell doesn't want you
and heaven is full.
Tom Waits
|
|
|
|
|
Create a .reg file, and use ::RegLoadKey() to load the hive to the current open key.
Doing so, you don't need to manage all the open key, create value stupid mess.
How low can you go ? (MS rant)
|
|
|
|
|
Thank you, I will try it out right now
well hell doesn't want you
and heaven is full.
Tom Waits
|
|
|
|
|
VC.NET seems to be even more complicated than VC, and the funny thing is, VC.NET doesnt even come with a dialog editor!? the dialog editor is already bad in version 6 - compared to that of VB, VB is so much more intuitive (I'm refering to the dialog editor. u can edit properties on the side and simple things like a tab control, VC6 support is ridiculous and certainly doesnt live up to the label "visual"....
but when it comes to COM and stuff... not sure... do we still need VC.NET? or just stick with {VC.6 + VB.NET/C#}? Any advantage in addition to backward compatibility?
norm
|
|
|
|
|
norm wrote:
VC.NET doesnt even come with a dialog editor!?
You must be kidding. It's more VB-like, but it's there.
norm wrote:
VC6 support is ridiculous and certainly doesnt live up to the label "visual"
Not quite sure everyone would second that. Especially VC6 has a classwizard to add/remove members, create classes through automation, add event handlers, ... which is no more here in VC7 (actually replaced by a strip down one which for instance does not allow to remove a method once added).
norm wrote:
but when it comes to COM and stuff... not sure... do we still need VC.NET?
Yes and no.
Yes, IDL are not needed anymore since attribute-style programming lets you put interfaces and stuff within your .h declaration. I have to admit I hate it, since it's MS tagging proprietary stuff. And, because it's hardly documented and intuitive (no intellisense here), even if you master VC++, you feel a bit lost. Of course all samples from the DVD are here to help you on the learning curve.
No, the more MS releases APIs and SDKs, the more it obfuscates the actual meaning of a COM object, which should remain simple and debuggable. May be that's because I hate ATL and the macros (a lot of them are obsolete in ATL7, so if you knew them by heart, bad luck!).
Backward compatibility ? You'll get a lot of warning messages (obsolete macros and methods), but existing projects will recompile and hopefully run fine.
About MFC : MS has merged MFC, ATL and STL. Now it's impossible to debug the simplest class : the CString class is replaced will a full stl template CStringT<...> class. Looks powerful at first sight, but eh hope you never have to debug anything around that : that's nasty code!
How low can you go ? (MS rant)
|
|
|
|
|
sounds like VC.NET is a rather sh*tty development tool =)
yes, especially the attributes and ....
norm
|
|
|
|
|
If that wasn't for a better intellisense support, auto-hidden bars, collapsable code regions, and stuff like that, I would stick with VC6. In fact, that's the greatest part of VC++.NET I see so far, the editor.
How low can you go ? (MS rant)
|
|
|
|
|
The best part of VC.NET will be in the next release, when they finally make some effort in regard to the standard.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
Would be fine, even if the two keywords "MS" and "standard" more often collide than socialize...;P
May be you're talking about the standard MS way of doing things. I would agree on that.
How low can you go ? (MS rant)
|
|
|
|
|
.S.Rod. wrote:
May be you're talking about the standard MS way of doing things.
Microsoft are claiming they will be the most compliant compiler with the next release, that is Herb Suter's job with them, amongst other people. Stan Lippman is another.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
Christian Graus wrote:
Microsoft are claiming they will be the most compliant compiler with the next release
B. F. D.
in my experience, i've never once run into an situation where "compliance" was an issue. plus, the VS.Net UI is so awful i can barely stand to have the piece of crap on my HD.
-c
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
Chris Losinger wrote:
in my experience, i've never once run into an situation where "compliance" was an issue.
How could you, unless you were porting code from a compiler that used a feature you needed, or you bought 'Modern C++ Design' ??? That's a crock as far as I can see, how can the Windows programming community evaluate features we don't have ? If the fact that we never had it means we don't need it, then why don't we all code in C, Petzold style ?
Chris Losinger wrote:
plus, the VS.Net UI is so awful i can barely stand to have the piece of crap on my HD.
Do you feel that way after using it a little, or a lot ? I *hated* it at first. I hated W95 as well, Change is always a struggle.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
Christian Graus wrote:
If the fact that we never had it means we don't need it, then why don't we all code in C, Petzold style ?
come now. there's a huge difference between having 95% of C++ and having no C++ at all.
in 9 years of C++ programming, i haven't found MS's compilers' compliance to stand in the way of my getting the job done; likewise, i've never once heard a co-worker complain about "compliance". so, based on my own real-world experience, the 5% that's missing or non-compliant is more than likely stuff that only bothers people who go out of their way to find and bitch about it - ie. it's academic. but, maybe it's just the projects i've been on.
Christian Graus wrote:
Do you feel that way after using it a little
i try to use it, but everything is a frustration. buttons have changed meaning (ex. "build solution" has quietly replaced "build-current project" even tho it looks the same and maps to the same keystroke); settings are scattered all over the place: some options are only available via right-click, some are properties, some are settings, some are only on the resource tabs, etc.; the UI is far too cluttered; the help system is awful (30 second lockup every time it starts and tries to phone home); and the static library issue alone is enough to stop me from using it.
-c
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
Chris Losinger wrote:
come now. there's a huge difference between having 95% of C++ and having no C++ at all.
A world of difference. But at least SOME of that difference is knowing what we'd be missing. I believe Office is still written Petzold style, as it predates MFC. Do you think it suffers for it ?
Chris Losinger wrote:
likewise, i've never once heard a co-worker complain about "compliance".
It's obvious that
a. We could write whatever we wanted in assembler
b. We're not going to notice the absence of stuff we don't know should be there, and
c. Any language feature is about convenience to programmers, not standing between our being able to impliment any particular feature.
Chris Losinger wrote:
ie. it's academic.
I am certain if Microsoft had not implimented STL and it could not be plugged in, you'd feel the same way about it. Anyone can live without the STL. Anyone can live without partial template specialisation. That does not mean they are not useful, or that you would not find a use for them, once they are on the table.
Chris Losinger wrote:
and the static library issue alone is enough to stop me from using it.
????? What do you mean ? ( I've mostly been coding C# at home, and VC6 at work )
In any case, I found I grew to like it, features like being able to browse parent classes more than make up for learning an essentially new IDE IMO. But you're entitled to your view, of course.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
Christian Graus wrote:
That does not mean they are not useful, or that you would not find a use for them, once they are on the table.
all true.
my point is: i hate the package the compiler is shipped in. the new compiler features aren't enough to get me pat the UI.
Christian Graus wrote:
Chris Losinger wrote:
and the static library issue alone is enough to stop me from using it.
????? What do you mean ?
i've bitched about this one here enough, i thought i'd save you the rehash... the same static .LIB made with VC7 is 3x the size of the one made with VC6. this is confirmed by MS and is (largely) a result of increased "locale" support. even though i only use the very basics of std::string in my image libs (=, +=, c_str), my .LIB size triples.
-c
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|
Chris Losinger wrote:
my point is: i hate the package the compiler is shipped in.
Well, that's fair enough, and is a different issue. If you personally hate the UI that much, then nothing else will help.
Chris Losinger wrote:
3x the size
I had not seen this, and I agree - it's awful, but also just SO typical Microsoft. Do you think Seagate pay them a kickback ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
The < sarcasm level=100%> ... <sarcasm> tag was implicit, wasn't it ?
Christian please, send me your MS DTD...
How low can you go ? (MS rant)
|
|
|
|
|
I'm lost here - are you saying that Microsoft have made a fanfare about achieving something, hired the chairman of the standards committee to help them do it, and won't attempt to deliver ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
He he, can't figure out why they didn't manage to hire Gosling as well.
How low can you go ? (MS rant)
|
|
|
|
|
Hi,
How does the concept of friend functions really defy the object oriented approach of C++.In many books I found that C++ is not truly OOP language because of friend functions being one of the many reasons.But no where was the reason why is it so?
Can any body come out with the complete explanation.
Thanks,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
here's one explanation as to why they don't defy OOP: http://www.parashift.com/c++-faq-lite/friends.html#faq-14.2[^]
i guess some people feel that a friend class is gaining unfair access to your object's innards. such people should get out more, IMO .
-c
“If it turns out that I’m actually the one who did it, then looking for the real killers would be a big old waste of time.”
-- OJ Simpson
|
|
|
|
|