|
Using ImageMagick (www.imagemagick.org), I now want not only to load, convert and store images, but also display them in an Windows window (i.e. its Device Context DC).
On the page http://www.simplesystems.org/ImageMagick/Integration/ there are two packages (WinExt and DisplayUsingCDib2) mentioned. But the first is using an outdated version of ImageMagick and the second link is dead.
Question: has anyone successfully tried to display an ImageMagick image inside a Windows window and can contribute a small code-snippet or even a complete function like e.g.
void DrawImageToDC( Magick::Image src, HDC dst_dc )
--
See me: www.magerquark.de
|
|
|
|
|
I believe from memory we did it by creating a DIBSection and using memcpy to copy the bits into it. Then we drew that.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I've even downloaded the Microsoft Vision SDK and currently looking into the HUGE code sections. Maybe I'll find there some code.
Can you provide some code of how you did it?
--
See me: www.magerquark.de
|
|
|
|
|
I'm sorry, I am more than 1,000 klm away from the code that did it
Do you have access to the image byte array through Image Magik ? If so, look at my code at www.wdj.com in the Sept 2001 section. It shows how to create a DIBSection and get access to the location of the byte array.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
|
I'm customdrawing a toolbarbutton that has BTNS_DROPDOWN style. Although I'm returning TBCDRF_NOEDGES edges are drawn for the dropdown arrow part. Someone knows how to work around this problem?
|
|
|
|
|
I have a vector of POINTs and I want to draw a curve that undergo(pass over) all that points in my vector. Somebody adviced me to use Bezier...and probably he is right. But using Bezier method the curve bypasses several points in my vector(control points) which is not my purpose.I hope i make myself understood. My knowledge regarding Bezier curves is so weak that I need your help.
Thank you in advance..I promise to rate good answers.
|
|
|
|
|
Daniel Visan wrote:
Thank you in advance..I promise to rate good answers.
*grin* CP ( thankfully ) has no rating system.
Beziers are mapped by specifying control points, but the curve does not pass through those points, it's more like a magnet, pulling the line *twoard* that point, not through it. I can't recall off the top of my head ( no MSDN or books here ) how to draw a line that passes through the points, but I know there is an AngleArc function, or similar, which may help you.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Christian Graus wrote:
( thankfully ) has no rating system.
We had one for a while, remember?
With John and You racing against each other
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Nish [BusterBoy] wrote:
We had one for a while, remember?
How could I forget ?
Nish [BusterBoy] wrote:
With John and You racing against each other
Actually that was more everyone ( me included ) vs. Michael Martin, who was voting for me.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Hi!
I want to make a DNS on may computer (e.g. chat1.suza.com) so my client apps don't have to write in the IP every time they want to connect to the server. This is just over LAN.
Do you know how ??
------------------------------
And Christian Graus: Is it ok
if I "steal" your idea with the
name layout (Rickard Andersson)?
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Rickard Andersson wrote:
And Christian Graus: Is it ok
if I "steal" your idea with the
name layout (Rickard Andersson
Knock yourself out. I'm tempted to encourage you to get rid of the awful ©0d3 ©®4©k3® thing though. Every time I see it, it makes me think you're 12 years old. Just a thought.
Sorry, I don't know the answer to your question.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Christian Graus wrote:
it makes me think you're 12 years old. Just a thought.
IS THIS AN ENOUGH GOOD SIGNATURE TO PROVE TO YOU THAT I AM NOT A 12 YEARS OLD BOY AND SORRY SO MUCH IF I'M NICE AND ASKING YOU IF THERE IS OKAY IF I DO THE SAME THING THAT YOU PERHAPS DON'T LIKE THAT I DO!!!
--------------------
Suza Computing
Rickard Andersson AND I AM NOT 12 YEARS OLD!!
ICQ: 50302279
--------------------
|
|
|
|
|
Typing in capitals has the same effect.
I am sorry if I offended you, but it's bugged me for a long time, and I thought I'd mention it while I had the opportunity. It's right up there with l33tsp34k IMO.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Peace then?
By the way, I'm 17 years!
|
|
|
|
|
Rickard Andersson wrote:
Peace then?
Sure
Rickard Andersson wrote:
By the way, I'm 17 years!
Enjoy it while you can - I'm 33.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Christian Graus wrote:
the awful ©0d3 ©®4©k3® thing hahahahahahahahaha well said
Anyway, if you're looking at a small scale lan, then your best bet is to use hosts files on all your clients.
ie. in c:\winnt\system32\drivers\etc\hosts . The standard hosts file tells you what to do. Put your servers IP and the desired name in a hosts file on each client.
And bob's your uncle.
Jon
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
The compiler will only Inline certain functions which are defined/declared within the class structure.
So is it safe to assume the compiler will ignore inlining functions which have branching or looping or recursion...?
The reason I ask:
My member functions will not Display themselves in Classwized/view or in the auto-tool-tip windows when typing code unless I define/declare within the class structure, but a few functions would really suck if they inlined...there big(ger) and called quite a few times
Please someone tell me I'm right...and If theres a way i can gaurantee(spelling) a function not to inline except for defining it outside the class...?
TIA and again
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
It is up to the compiler to decide which inlineable functions to inline, and you can do little in general to prevent this, except of course define the function outside the class declaration (and without the inline keyword). Even then, the compiler is free to inline some calls when it feels like doing it (eg., in the same compilation unit).
What strikes me is that your class wizard is not able to "see" functions unless defined in line... It shouldn't be so, take a look at some automatically generated member function (which in general are not defined inline) and try to replicate the syntax for your new member functions.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
It's a template class...
When i add functions there delcared/defined within the class
So i can't use this method...tried that already.
Nothing out of the ordinary in the clw file either...so i dunno...probably my crummy computer...needs a reformat.
Really wish there was a NOINLINE keyword...
thanx again
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
I think the only way is to define the method in a separate .cpp file or somethin and put keyword 'inline' before you define the method:
inline void CMyClass::InlineFunc(BOOL bYes)
{
m_bYesOrNo = bYes;
return 0;
}
Have I miss understod you or...
---------------------------------------------
Rickard Andersson, Suza Computing
Speciality: MFC, C++ and very little C# (for the moment)
ICQ: 50302279
---------------------------------------------
Chrisian Graus: Is this perhapas a good enough signature may be?
BECAUSE I WILL KEEP THIS ONE!
|
|
|
|
|
Rickard Andersson wrote:
Chrisian Graus: Is this perhapas a good enough signature may be?
BECAUSE I WILL KEEP THIS ONE!
Looks great to me - it's about time I was mentioned in someines sig again
FWIW it's good to use bool instead of BOOL, which is in fact an int.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I was hoping for the opposite effect
making functions not inline that usually would Sorta'
class MyClass{
theFunc(){ AfxMessageBox("hey"); }
theFunc2()
{
AfxMessageBox("I don't want this function to INLINE");
m_bFake = FALSE;
}
};
Thanx anyways
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
There's a setting in the C++ tab in the optimizations category that allows three settings - disable, only inline those explicitly marked 'inline' (believe the cl'er can pass final judgement here, but should warn), and 'hey Ms compiler, you're so good at this stuff, why don't you decide what to inline'.
Would that help - or is it really a template related issue - post some code?
|
|
|
|
|
As Jimi and Joaquín M López Muñoz say: you can do nothing except declare them correctly and let the compiler do its job according to your wishes (read /options).
Besides of this you should ask yourself another question: if the compiler thinks that a function may be inlined, why you think it should not?
Dont tell me that the function may be too big. The argument "the resulting code will be too big" is nonsense nowadays. Applications can expect "sufficient" memory to run almost any code.
So? What is left? Speed? If it gets called so many times, the compiler is right - it preserves lot of overhead for the function call and execution.
Anything else that I missed?
|
|
|
|