|
I tried the code.. But no success again.. Pops up the message box saying that "Window creation fails"..
Debugged that.. Still there is NULL in hwnd..
|
|
|
|
|
|
Yes it solved..
Thanks all..
|
|
|
|
|
I am getting problem in
IStorage *Storage;
CLSID clsidWord;
CoInitialize(NULL);
HRESULT hr=CoCreateInstance(clsidWord,NULL,CLSCTX_INPROC_SERVER,IID_IStorage,(void**) &Storage);
This is giving class not registred.
|
|
|
|
|
MPTP wrote: clsidWord
clsidWord parameter must be meaningfully initialized.
BTW you should post such questions in the COM forum [^] to get better help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You cannot create Microsoft Word as an in-process-server since it registers as an out-of-process server.
Change CLSCTX_INPROC_SERVER to CLSCTX_SERVER .
And, of course as CPallini mentioned, the class ID of Word must be initialized correctly.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
thank you, could you please give me nay link related to this Interface
|
|
|
|
|
MPTP wrote: could you please give me nay link related to this Interface
I don't know what interface you're talking about, but I saw you're requesting the IStorage interface upon creation of the server which seems strange and is most likely very wrong.
Have a look at this KB article here[^]. It shows how to get started with automating Word.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Thanks for your reply, actually I want to read the content of .doc file. I do not know how to do that, if you have some idea about it please tell me how to do that?
I also searched on google but could not get much help, I just came to know that COleStreamFile class might be usefull but how to do that with this class I don't know?
|
|
|
|
|
I suppose you did not read the article I linked to in my previous post...
Well, let's try another one: http://support.microsoft.com/kb/178749/[^]
The article describes how to create a dialog based MFC application with a "run" button. When the button is clicked it starts Excel.
To make it start Word instead of Excel, you import the Word object library corresponding to your Word version instead of the Excel library. You will find the name of the Word object library in the table in the article. When you import the library a header file will be generated which you are supposed to include instead of "Excel8.h".
You also have to alter the ProgID from "Excel.Application" to "Word.Application".
Build and run the application.
When you click the "run" button, Word will start and you're up and running.
In order to open a document and read some of its contents, you will find appropriate interface methods to call in the generated header file(s).
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi,
I am trying to write a multiline character string to the registry (REG_MULTI_SZ).
for this i am doing this
LPTSTR Value = TEXT("0\02\0MANAGER\0");
after doing this if i look at the memory location where Value is stored this is what i see
30 00 02 00 00 00 4d 00 41 00 4e 00 41 00 47 00 45 00 52 00 00 00 00 00
check out the third byte, when it actually should be
30 00 00 00 02 00 00 00 4d 00 41 00 4e 00 41 00 47 00 45 00 52 00 00 00 00 00
there is some weird thing happening with the '\0' escape sequence and the '2' character.
or something's going on that im not aware of..
Please Help
Regards
~Sameer
|
|
|
|
|
Sameer Naik wrote: there is some weird thing happening with the '\0' escape sequence and the '2' character.
or something's going on that im not aware of..
\02 is a valid octal escape sequence for ASCII code 2 .
You should use replace \02 with \0002 or 0x002 to do the trick.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
I have created an .exe file using vc++ 2005 but when i copy this file to some other Vista machine its not working on way. How can I make my exe of project portable on any Vista machine? It's gaving some error on othere machine.
regards,
|
|
|
|
|
NewVC++ wrote: It's gaving some error on othere machine.
What *exactly* did the error message say?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: What *exactly* did the error message say?
Cantz runz, sir...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Error "some task not perform on other machine".
|
|
|
|
|
NewVC++ wrote: Error "some task not perform on other machine".
I doubt if the error message comes from Windows. Most probably, your own app is having a problem.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh R Subramanian wrote: I doubt if the error message comes from Windows. Most probably, your own app is having a problem.
You're wrong, it is Vista with the latest English Language Service Pack installed on.
BTW: second TH attempt.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: You're wrong, it is Vista with the latest English Language Service Pack installed on.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Possibly you need this [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
By making a Release build?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Did you gey any message or error?
|
|
|
|
|
What program will let me quickly create a text link from a document to
a specific portion of a MP3 or Windows Media file, play the linked
section, and then stop without having to chop the audio file into a
bunch of little files (the equivilent of bookmarking and highlighting
a passage in the book - you want to quickly move to and read a
specific piece of information without having to cut the book up into a
bunch of pieces)?
For example, I have a audio lecture recorded and downloaded to my
computer that I want to link portions of to the notes from the
lecture.
- I want to be able to QUICKLY link the text from my notes to specific
portions of the lecture that is related to the notes.
- Once the link is setup, it should lead to a specific
place/"bookmark" in the lecture/audio file, play the "highlighted"
audio, and then stop.
- The original audio will remain in tact - not need to be chopped into
a bunch of little files.
- The bookmarking, highlighting, and linking has to be quick and
intuitive.
|
|
|
|
|
Go ask your face book buddies and stay out of these forums until you learn how to use them, if you can.
led mike
|
|
|
|
|
Cool dude, I thought these the right way to reach people with my problem if they know solution or suggestion they reply. If they don't know still they reply its bad manner.
|
|
|
|