|
I suspect the problem is in some of the code you edited out. I have used SysFreeString many times and never had any problems like yours. Perhaps if you can produce some code that will actually reproduce the problem you will get a solution.
Steve
|
|
|
|
|
I need to read the line by line data from pdf file...
Plz guide me if u have any ideas.......
|
|
|
|
|
If it's a compressed PDF, as most are, you need to buy or find an external library, or write a whole lot of code yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
if it is not a compressed one..then..
|
|
|
|
|
Then the text in it is just plain text, but it's hardly 'line by line', there's tons of other config info in there as well. You can tell by opening one in notepad and searching for text you know is in there. Not too much tho, even uncompressed ones break the text in the weirdest places.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Petrhaps if you told us a little bit more what you want to do?
|
|
|
|
|
See this[^] document for full doc of the PDF file format.
onwards and upwards...
|
|
|
|
|
Can any body tell me how can i inerface with any COM object? I know GUID/CLSID of he object.
I am new with COM Object.
|
|
|
|
|
The easiest way is to #import the COM object and use __uuidof to generate instances. If you google __uuidof, you're bound to find heaps of examples. Remember, the objects need to be registered on your machine, if you just have been given them as files, you can't just dump them in a folder. regsvr32 is the command line command to register a COM object. If it's installed with something ( like Office ), then this has been done for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
There are various libraries that provide classes (and such) to make dealing with COM easier like ATL and the compiler provided COM support classes. Given that you haven't provided much info on this I'll point to at some APIs/interfaces:
CoInitialize - To initialize COM on the current thread.
CoCreateInstance - Create a registered COM object given a CLSID.
IUnknown::QueryInterface - Get an interface on a COM object given its IID.
IDispatch - For dispatch interfaces.
If you're not driving IDispatch interface you will need to have a header file so you can call the methods on the interfaces. There are many ways to do this:
- Use one that comes with the component or SDK
- Use #import
- If you've got an IDL file, use MIDL to make one.
- Use a tool like OleView to make one.
Steve
|
|
|
|
|
But i have no idea of working with IUnknown. I read so much about this interface in MSDN.
|
|
|
|
|
IUnknown has only three methods:
QueryInterface : Get an interface on an object.
AddRef : Call when you copy an interface pointer.
Release : Call when you destroy an interface pointer.
I think you should read a good COM tutorial.
Steve
|
|
|
|
|
Hi,
To start COM application, you have to know some thing about COM and Interfaces.
In VC++, we can do it two ways 1. Using MFC and 2) Using ATL libraries.
ATL is simple and wizard faced. All interfaces creation and registration take care by ATL wizards.
But in case if MFC, you have to inherit a class from CCmdTarget and create a interface also from IUnknown and IDispatch based upon your need.
If you are going to work with on languages like VC++, VB etc then IUnkonwn is enough. But if your COM should support with script languages like VB script, Jscript then You shound use IDispatch.
To create simple MFC COM, please go through the below MSDN link..
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncomg/html/msdn_house2.asp
best of luck
regards
Vallikumar A
|
|
|
|
|
We're making an add-in .dll to inventor.
After a user select some features, for example a circle or some lines, in the whole 2D sketch,we want to show only the selected ones in a dialog at once.
For the selected features may overlap with others ,what we can do to the selected features?
Appreciate for any info
|
|
|
|
|
I foegot to mention that all we do is the development of inventor-a 3D drawing software similar to AutoCAD.
We just use its API to achieve the select function.But don't know about the display thing.
|
|
|
|
|
I have no idea what inventor is. Either way, I'd suggest finding a forum dedicated to coding for it, so you're talking to people who are on the same page as you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a class A, which is a dialog having a CEdit box with CString
variable "m_Edit".
I have another class B having a CString variable "str" declared in it.
Now i want to make a call like this,
CString str = m_Edit;
This is to be done inside class B. How can i get the Edit box value in
class A to class B CString "str".
I tried a few things but couldn't make it work properly.
Can anyone got any suggestions.
Thanks in advance
|
|
|
|
|
easiest way is to define a function in ClassB which accepts a pointer to a CEdit
i.e
<br />
void CClassB::FixEdit(CEdit* pEdit)<br />
Then in that function you can set the text to the string
i.e.
<br />
<br />
void CClassB::FixEdit(CEdit* pEdit)<br />
{<br />
pEdit->SetWindowText(m_str);<br />
}<br />
How you call this up to you - but for example in the contructor of ClassA you could do the following
<br />
CEdit* pEdit = (CEdit*)GetDlgItem(IDC_EDIT1); <br />
<br />
CClassB* cb = new CClassB();<br />
cb->FixEdit(pEdit);<br />
You could make the function static then you would not need to instantiate the CClassB but that's up to you - likewise you could create a function which would take a CEdit pointer and you could then read the contents of the Edit Box instead
|
|
|
|
|
I think your m_Edit variable declared as public. otherwise make it public.
then you should create an object for class A, inside class B.
Like this
A objA;
then do the assignment statement...
CString str = objA.m_Edit;
regards
Vallikumar A
|
|
|
|
|
I making a program that should print a file (.html) when the user presses a button.Which functions or controls do I use,and how do I implement them?
Tnanx
|
|
|
|
|
I think the easiest way would be to load it up in MSHTML and get it to print it.
Steve
-- modified at 18:26 Monday 16th January, 2006
ADDED:
Look up the IDM_PRINT command and IOleCommandTarget .
|
|
|
|
|
Have you considered ShellExecute() with the "print" verb?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I stand corrected - Your way is much easier.
Steve
|
|
|
|
|
nice one .
0x0400:
"But your mind is very complex, very tricky. It makes simple things complicated. -- that's its work. And for centuries it has been trained for only one thing: to make things so complicated that your life becomes impossible."- Osho
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
|
|
|
|