|
you have to add the library to the linker input libraries (select, in menu Project->Settings , the Link tab, then add the library name in the Project Options list).
Hope that helps.
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.
|
|
|
|
|
Thanks for your reply.
But that is with visual studio 6.0. I know that. But I have just upgraded to Visual studio 2005. Can you tell me how to add the library file in that one ?
Thanks for prompt reply.
Nikhs
Nikhil Trivedi
|
|
|
|
|
Yes, that was on VS6.
On VS2003 (the one I have), you have to select menu Project->Project properties then the Linker node and finally select Command line and add the library name to additional options list.
Please note, actually names maybe a bit different, I translated from my version (Italian) one.
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.
|
|
|
|
|
CPallini wrote: On VS2003 (the one I have), you have to select menu Project->Project properties then the Linker node and finally select Command line and add the library name to additional options list.
Heh I add them in Project properties->Linker->Input->Additional Dependencies.
The last time I mentioned that, somebody reminded me you can just add it to the tree in solution
explorer LOL
Cheers,
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I didn't know. Wonderful!
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.
|
|
|
|
|
If you are using of vs2005 it installed library files(necessary ) on your machine but anyway
You can add this code to your source file
#pragma comment(lib, "Ws2_32.lib")
Whats your application type?(Console)
|
|
|
|
|
Thanks. That worked !
Can you just tell me how to add the library file in the project in Visual Studio 2005 ?
Thanks for prompt reply.
Nikhs
Nikhil Trivedi
|
|
|
|
|
I think you asked and I answered to you did you see my previous message?
|
|
|
|
|
Go 'Project' -> 'Project Properties' -> open 'Configuration Properties' -> open 'Linker' -> open 'Input' -> add the .lib file to 'Additional Dependencies'.
|
|
|
|
|
Thanks. Your answer was perfect.
I got it. Thanks to you and all that helped me.
Nikhs
Nikhil Trivedi
|
|
|
|
|
your answer was step by step
|
|
|
|
|
Dear All,
I want to develop a module in which I can block the number of ports (or all )according to requirement as well as open those ports. It must works for Windows XP(SP1/SP2)and above.
I have gone through Developing Firewalls for Windows 2000/XP By Jesús O.. article on codeproject, but it doesn't satisfy my criteria. Is there any other method to block the ports?
ThankYou In Advace.
Regards,
CraZyToLearn
|
|
|
|
|
On my MFC Project Recordset class for Access table (connected with ODBC), MoveFirst(), MoveLast() - commands doesn't work properly. Recordpointer moves somewere else. Why happens this ?
bijumon mathew
kattappana
|
|
|
|
|
bijumon Mathew wrote: MoveFirst(), MoveLast() - commands doesn't work properly. Recordpointer moves somewere else.
Ummm...where does it move to?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
what is the reason for this error. I am new to this group Please help me.
error LNK2001: unresolved external symbol "public: void __thiscall
|
|
|
|
|
See in MSDN for the topic : Linker Tools Error LNK2001
|
|
|
|
|
FileOperationsDlg.obj : error LNK2001: unresolved external symbol "public: void __thiscall CFileOperationsDlg::TestReadFile(unsigned short const *,class CMemFile &)" (?TestReadFile@CFileOperationsDlg@@QAEXPBGAAVCMemFile@@@Z)
Debug/FileOperations.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
can anybody give me any hint to solve this
|
|
|
|
|
did you declare a function that you don't implement ?
of forgot to link a .lib file maybe ?
|
|
|
|
|
hi all.
I have program that must start other one from command line, but I dont know how to do this.
thanks for any help.
|
|
|
|
|
What about ShellExecute [^]?
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.
|
|
|
|
|
|
Hi All,
I have a resolution problem when drawing a bitmap to the screen using GDI+ methods. The bitmaps I am dealing with are typically in the order of 2304 x 1728 pixels and I normally shrink these to around 276 x 207 pixels.
Users of my application have a choice of viewing the bitmap normally or rotated +/- 90 degrees. When applying rotation the image is rendered pin sharp. However, when no rotation is applied, the image is only of average quality - irrespective of how high I set the interpolation and smoothing modes. It is interesting that explicitly setting the interpolation/smoothing modes when rotating also renders an average quality image.
Is there an explanation for what I am seeing here? More to the point, is there any way I can get the same razor sharp images when not rotating as when I am rotating?
Thanks, Graham
Code sample and details as follows..
using namespace Gdiplus;
int top_left_x, top_left_y, new_width, new_height;
// Create a Bitmap object based on a given image file
BITMAP *pGDIBitmap = Bitmap::FromFile(filename, TRUE);
// Calculate offsets and new dimensions
GetOffsets(pGDIBitmap, top_left_x, top_left_y, new_width, new_height);
// Create a GDI Plus graphics object
Graphics graphics(pDC->GetSafeHdc( ) );
// Translate prior to rotation (if any)
graphics.TranslateTransform(top_left_x, top_left_y);
// Check for rotation request
if (bRotateImage)
{
// Invoke rotate transform
graphics.RotateTransform(90.0f);
}
else
{
// Set some properties, to ensure to have a better quality of image
graphics.SetInterpolationMode(InterpolationModeHighQualityBicubic);
graphics.SetSmoothingMode(SmoothingModeAntiAlias);
}
// Draw the image
draw_status = graphics.DrawImage(pGdiBitmap, 0.0f , 0.0f, new_width, new_height);
etc, etc. . .
// Development environment - Microsoft Visual C++ (.NET v8)
// Operating system - Windows 2000
// Monitor - Iiyama A102GT
// Graphics monitor - Intel 82815
// Screen area - 1280 x 1024
// Refresh rate - 75Hz
Graham
|
|
|
|
|
It doesn't make sense that the rotated image would be better quality than not rotated.
I only see three things I'd do differently from your code..
1) I prefer to apply RotateTransfor BEFORE TranslateTransform (seems to give better results to
me).
2) SetSmoothingMode I thought was just for lines/curves but if it applies smoothing to images
I certainly wouldn't want that effect, unless I was specifically smoothening an image.
3) The interpolation mode should be set before any rotation or scaling.
What happens if you do this:
using namespace Gdiplus;
int top_left_x, top_left_y, new_width, new_height;
// Create a Bitmap object based on a given image file
BITMAP *pGDIBitmap = Bitmap::FromFile(filename, TRUE);
// Calculate offsets and new dimensions
GetOffsets(pGDIBitmap, top_left_x, top_left_y, new_width, new_height);
// Create a GDI Plus graphics object
Graphics graphics(pDC->GetSafeHdc( ) );
// Set some properties, to ensure to have a better quality of image
graphics.SetInterpolationMode(InterpolationModeHighQualityBicubic);
//graphics.SetSmoothingMode(SmoothingModeAntiAlias);
// Check for rotation request
if (bRotateImage)
{
// Invoke rotate transform
graphics.RotateTransform(90.0f);
}
// Translate
graphics.TranslateTransform(top_left_x, top_left_y);
// Draw the image
draw_status = graphics.DrawImage(pGdiBitmap, 0.0f , 0.0f, new_width, new_height);
etc, etc. . .
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi Mark,
Thanks for your reply. I take your point regarding the smoothing mode and I've now removed this from my code - but to no effect I'm affraid.
I perfrom the translation prior to rotation simply to facilitate calculation of the x/y offsets. In any case, the poor image quality only occurs whenever I do NOT rotate so this is not the source of the problem. Also, when I rotate, the image is only rendered sharp if I do NOT specify the interpolation mode. I get the impression that 'RotateTransform' is doing something behind the scenes that neither of us are aware of.
Before I delve further into this, I want to eliminate any possibility the the hardware I'm working with is affecting what I am seeing. Later today, I will transfer my exe to a new machine with a different monitor and see if I can repeat the problem.
Cheers, Graham
|
|
|
|
|
HuddartG wrote: In any case, the poor image quality only occurs whenever I do NOT rotate so this is not the source of the problem.
Right. I'm with you. The image should be sharp just drawing it with no transformation. This
part seems strange (as you know).
I typically don't use interpolation when reducing image size because the images I work with don't
have text so simply removing pixels is sufficient. When expading an image, interpolation is nice
to prevent pixelization blockiness.
HuddartG wrote: I perfrom the translation prior to rotation simply to facilitate calculation of the x/y offsets.
Right, but the order you apply transformations is important in GDI+. In my experience I get
better results applying translation last. That's why I suggested trying that.
Here's more info: Matrix Representation of Transformations[^]
I'd try getting it all working without interpolation or smoothing - just rotation and translation.
It's easy enough to add the interpolation
Still, the image should be crisp with no transformations applied so that's still a mystery.
Please let me know how your testing comes out.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|