|
I downloaded and extracted all the source.
I opened the PDFlib.dsw and had VS2005 convert all projects. (The ZIP is for VS6 and I'm using VS2005)
I rebuilt the DEBUG PDFlib project only and it successfully produced the PDFLib.lib file.
When compiling however it will generate a lot of warnings about unsafe functions.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
Seems I make it , after yours model , I get an pdflib.lib file ... now I try to use in an test project ... thank you all !
|
|
|
|
|
Finally , I generate a blank pdf page with pdflib 7.0.4 ...
|
|
|
|
|
Congratulations. Good effort.
Just remember that the light at the end of the tunnel might be an oncoming train.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
|
|
|
|
|
hi
string Str;
Asc(Mid(Str, i, 1)) in vb and i want in vc++
Chr$(Str(i)) in vb and i want in vc++
i donot vb...please help any one
|
|
|
|
|
Member 3653751 wrote: i donot vb...please help any one
There is the documentation, by the way.
Member 3653751 wrote: Asc(Mid(Str, i, 1))
The ASCII value of a the ith character of the string.
(in C++ is the character value itself, if you have a char array).
Member 3653751 wrote: Chr$(Str(i)) in vb and i want in vc++
You dont't need it in C++ (neither in VB , AFAIK).
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]
|
|
|
|
|
native C++:
static_cast<int>(Str[i - 1]);
static_cast<wchar_t>(Str[i]);
C++/CLI:
Convert::ToInt32(Str[i - 1]);
safe_cast<Char>(Str[i]);
David Anton
Convert between VB, C#, C++, & Java
www.tangiblesoftwaresolutions.com
|
|
|
|
|
In my previous post I realized I pretty messed up my project with unneeded templates.
I thought "what about creating a structure or class with a pointer to another structure and putting that pointer just when needed?"
So here's the question: I dislike personally the idea of a pointer pointing to optional data, is there any better solution to store data which always has a common header but then may vary?
---
|
|
|
|
|
create a class to store the 'common header'. then, use that as a base class and derive objects from it to store the 'optional' data.
?
|
|
|
|
|
I don't really know about your requirements, but a union may possibly be an option.
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]
|
|
|
|
|
? :
class A
{
...
};
class B
{
A* m_pA;
public:
B(A* pA = NULL) { m_pA = pA; };
};
int main()
{
A a;
B b1;
B b2(&a);
...
return 0;
}
virtual void BeHappy() = 0;
|
|
|
|
|
The hierarchy proposal is good I have to admit it.
But I need to use data stored in this class in the easiest way possible, something like
MYclass a;
a.GetPoints();
CalculateOtherData( a.RetrievePoints() );
and the hierarchy isn't that simple
---
|
|
|
|
|
4288 wrote: But I need to use data stored in this class in the easiest way possible, something like
MYclass a;
a.GetPoints();
CalculateOtherData( a.RetrievePoints() );
and the hierarchy isn't that simple
So what does any of this have to do with, "...is there any better solution to store data which always has a common header but then may vary?"
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
That structure of points may vary.
---
|
|
|
|
|
I have a dialog box that's mostly working except for one thing. Under certain circumstances, if another window covers it for any reason, then when it's unhidden there is nothing in the dialog box until you move it slightly - no controls at all, just a gray background. I figure I need to stick an Invalidate() somewhere, but I can't figure out where.
The dialog box has a rich edit control and a bunch of buttons. Some of the buttons load different HTML files into the rich edit control (the HTML is converted to rich text). One of the buttons hides the rich edit control and displays a jpeg (which was easier than trying to load the jpeg into the rich edit control). One of the buttons prints whatever is displayed. If it's a rich edit control, it prints what's in it. If it's the jpeg, it prints that.
All this is working. I handle WM_PAINT so the jpeg is continually displayed if the window is resized or moved. OnPaint() checks the report type being displayed, and then if it's the image, it redisplays the image.
To fix the disappearing dialog controls after the window is hidden I added a handler for ON_ERASEBKGND that basically does the same thing as OnPaint(). If the jpeg is the current report, it redraws the jpeg. This works - but only for the jpeg. If the currently displayed report is in a rich edit control, every control in the dialog disappears after it's covered by another window - including the buttons. I've tried every combination of return values I can think of (0, 1, calling the base method), but nothing restores the controls except moving the dialog.
What am I missing? How do I get the dialog to redraw after being hidden when the rich edit control is being displayed?
|
|
|
|
|
Does your dialog have the "clip children" style set? If no, try enabling it and see if it helps.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
hi
CString str = "000001";
unsigned short st =_com_util::ConvertStringToBSTR(str);
st = 0x00000 is coming...
please help any body..
|
|
|
|
|
If you dont bother to get the value in unsigned long then strtoul, wcstoul can be used[^].
Member 3653751 wrote: unsigned short st =_com_util::ConvertStringToBSTR(str);
Well your code is not seems to be correct. It convert the LPTSTR to BSTR, it wont convert it to unsigned short
Величие не Бога может быть недооценена.
|
|
|
|
|
hi
convertStringtoBSTR() this function is returning unsigned short only...
i am giving correct input....but output is coming worning....
please help....
actual my problem is i have vb dll...
Public Function f1(SendString As String) As String
after loading vb dll
t is the class pointer of vb dll...
CString str = "000001";
unsigned short *stemp = _com_util::ConvertStringToBSTR(str); //stemp = 48 means 0
t->f1(&stemp) input / output unsigned short its showing...
|
|
|
|
|
You also need to read the documentation for ConvertStringToBSTR() .
[edit]Also you need to understand C programming and return values.[/edit]
It's time for a new signature.
|
|
|
|
|
We already explained how to do this here[^]. Please take some time to read the documentation in the posted link.
It's time for a new signature.
|
|
|
|
|
Hiii...
During an interview I got a question like this
A class looks like:
Class A{
private: int x,y;
public: getxy(int &,int &);
setxy(int x,inty)
}
In above class functions outside the class can't access x and y, how you will do this in C language ( i.e., that is data encapsulation in C)
Actually I couldn't answer this question. I think data encapsulation is possible in C, but if I say "yes" as answer then interviewer will ask how.So struggled to give an answer.
Later I read somewhere data encapsulation is possible in C , and somewhere is specified that it is not possible, is only possible with oops languages....
Anyway anybody can give a good clarification....It will be useful for all
Thanking you
Krish
|
|
|
|
|
As I know,
there are no "out-/inside" words in C
virtual void BeHappy() = 0;
|
|
|
|
|
Encapsulation is definitely my favourite feature of object oriented programming. In plain old C you have structs and unions to group variables together, though the access rights are limited. You can use "internal data structures" by not exposing them outside your module, for example by declaring them static in a C source file. With a little bit of organisation you can have "inner/outer" variables.
So instead of the complier enforcing these access rights, the developer has to do it in C. It's really not much more than that, for example take a C++ class with private members and compile it into an object file or library. Then make a copy of the header file, change private to public... voila you can access all previously private members and the compiler/linker won't complain. Evil but possible.
Hope it helps!
/M
|
|
|
|
|
I guess this[^] is what you are talking about. Hope the link helps the OP.
|
|
|
|