|
i prefer my own way, but there are at least three other, free ways, on this site, to do it.
be aware that you can't use GIF (reading or writing) without a license from Unisys.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
I was interested to see that this months MSDN address this quite clearly ( in Paul De LAscia's column ) and says what I always expected, if you use GDI+ and read/write Gif, you're going to JAIL !!!!
It's amusing to see that UNISYS are still scum and actually refused to provide a precise definition of who has to pay, they just said everyone who uses gif must ask them for a form so their lawyers can decide how much they need to pay. I wonder what possessed M$ to create a world where I need to be careful to exclude a file format that their API supports directly, especially as checking for the .gif extension will not stop GDI+ reading gifs named differently.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
Hey Christian. You seem to know alot about graphics and answer questions frequently with GDI+ solutions. I'm curious...what is GDI+ all about...I thought it was a lib someone here at codeproject started, that was basically an extension, which would allow easy anti-aliasing, alpha-factoring etc...instead of just the boring LineTo.
My appologies for asking you this directly instead of posting and waiting for a reply, but I figured it would have probably been you in the first place.
My appologies again for just assuming.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
HockeyDude wrote:
You seem to know alot about graphics and answer questions frequently with GDI+ solutions.
Well, you're half right To quote Lynyrd Skynyrd, I know a little, and I guess the rest...
HockeyDude wrote:
what is GDI+ all about...I thought it was a lib someone here at codeproject started, that was basically an extension, which would allow easy anti-aliasing, alpha-factoring etc...instead of just the boring LineTo.
No, it's an integral part of .NET ( i.e. you get it out of the box ), and it's also a dll that can be downloaded, and with the latest platform SDK ( well, any from the past year, but it's been worked on in that time so you should get the latest one ), you can create apps that use GDI+ for any post Windows 95 OS (W95 is not supported but also not excluded, the official line is try it at your own risk on W95).
GDI+ offers a greatly improved API to GDI+, with things like reading/writing different formats, antialiasing, alphablending and texturing. I have written a series of articles on GDI+ you may find helpful, the March Windows Developers Journal ( out now ) also has an article from me introducing GDI+.
HockeyDude wrote:
My appologies again for just assuming.
Not at all, it was a fair assumption given that I tend to answer a lot of questions on graphics and to often refer to GDI+. I was fortunate enough to be writing a paint package at work when I became aware of GDI+ so I parallel developed a GDI+ version from home which eventually was the one we used at work as well.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
Christian Graus wrote:
they just said everyone who uses gif must ask them for a form so their lawyers can decide how much they need to pay
and it really is arbitrary. i paid $2500 for my license a couple of years ago. since them i've found other people who have paid anywhere from $2000 to $5000 - all small developers, no real outstanding differences between us.
Christian Graus wrote:
I wonder what possessed M$ to create a world where I need to be careful to exclude a file format that their API supports directly
probably because they have licenses for all of their apps, and their apps use the same stuff we do (same COM objects, GDI+ functions, etc). it was probably just a matter of not wanting to have every image loading call ask "OK. who's calling me this time?".
or, maybe (and this is what i prefer, for no good reason), MS is trying to make GIF support so easy to come by, that every app made will use it. that way Unisys has no chance of stopping everyone. and, it sticks a thorn in the side of independent toolkit developers
meanwhile, people continually ask me "i can read GIF in VB/.Net/any of the dozen toolkits here; why can't i do it from your library?"
my answer, "because i don't want to go to civil court to fight an huge corporation" doesn't get me the sale.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
Chris Losinger wrote:
i paid $2500 for my license a couple of years ago.
Chris Losinger wrote:
meanwhile, people continually ask me "i can read GIF in VB/.Net/any of the dozen toolkits here; why can't i do it from your library?"
So it's an annual fee ?
Chris Losinger wrote:
my answer, "because i don't want to go to civil court to fight an huge corporation" doesn't get me the sale.
How about 'why on earth would you want to read gif anyhow ?'
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
Christian Graus wrote:
So it's an annual fee ?
no. it's an advance on 1/4ly royalties. and at the rate the economy's going (hence sales), i think i'll still have some money left over, by the time their patent runs out (next year).
Christian Graus wrote:
How about 'why on earth would you want to read gif anyhow ?'
because there are only two formats: JPG and GIF. everything else is for losers.
-c
Smaller Animals Software, Inc.
You're the icing - on the cake - on the table - at my wake. Modest Mouse
|
|
|
|
|
Chris Losinger wrote:
because there are only two formats: JPG and GIF. everything else is for losers.
Maybe in the field of internet pr0n. I like tga myself...
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
hi, dose anybody know how i can wright a simple visual c++ program to encrypt/decrypt entered data by a user using the caesar cipher. And displaying the encrypted data in a file or box.
I have not used visual c++ much and having great difficulty getting grips with the code.
Any help would be appreciatedm. thanks
damsel in distress
|
|
|
|
|
If you having problems coming to grips with the code I would suggest searching for a third party lib. Anything other than simple ascii encryption maybe XOR is pretty difficult. I wouldn't attempt this myself until I fully understood the algorithm and language at hand.
I would look for a 3rd party lib...yup for sure...i'd be much easier.
p.s-You might take a peak at the windows CryptoAPI, I dunno about ceaser cipher's but I think it supports triple DES.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
What is the ceasar cipher? Is that the algorithm where the letter A gets mapped to a number between 1-26, then B to a different number and so on through Z until all of the letters and numbers are matched?
Is the problem that you are having have to do with the actual encryption, where to get started on your program, or the file part.
Does your program need to be displayed in a GUI, or can you use the console. If you can use the console, this would make your program alot simpler. Simply start with the fstream objects to read your encrypted file in to memory.
Walk through all of your encrypted data, byte by byte, and convert from the encrypted code to the real character, placing the decrypted character in a new buffer.
Then display the new buffer with cout.
I know this is general, hopefully I have helped, if you have a specific question feel free to give more details.
|
|
|
|
|
Hey Guys
I probably put this post up before but oh well, I have a dll that integrates with explorer and when i try and put my own exported funtion in it crashes the program when i try and access it any ideas.
This is the code:-
// Note: Proxy/Stub Information
// To build a separate proxy/stub DLL,
// run nmake -f Software to Sign and Verify Filesps.mk in the project directory.
#include "stdafx.h"
#include "resource.h"
#include <initguid.h>
#include "Software to Sign and Verify Files.h"
#include "Software to Sign and Verify Files_i.c"
#include "SignShellExt.h"
CComModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_SignShellExt, CSignShellExt)
END_OBJECT_MAP()
class CSoftwaretoSignandVerifyFilesApp : public CWinApp
{
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSoftwaretoSignandVerifyFilesApp)
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
//}}AFX_VIRTUAL
//{{AFX_MSG(CSoftwaretoSignandVerifyFilesApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CSoftwaretoSignandVerifyFilesApp, CWinApp)
//{{AFX_MSG_MAP(CSoftwaretoSignandVerifyFilesApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
CSoftwaretoSignandVerifyFilesApp theApp;
BOOL CSoftwaretoSignandVerifyFilesApp::InitInstance()
{
_Module.Init(ObjectMap, m_hInstance, &LIBID_SOFTWARETOSIGNANDVERIFYFILESLib);
return CWinApp::InitInstance();
}
int CSoftwaretoSignandVerifyFilesApp::ExitInstance()
{
_Module.Term();
return CWinApp::ExitInstance();
}
/////////////////////////////////////////////////////////////////////////////
// Used to determine whether the DLL can be unloaded by OLE
STDAPI DllCanUnloadNow(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return (AfxDllCanUnloadNow()==S_OK && _Module.GetLockCount()==0) ? S_OK : S_FALSE;
}
/////////////////////////////////////////////////////////////////////////////
// Returns a class factory to create an object of the requested type
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
return _Module.GetClassObject(rclsid, riid, ppv);
}
/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry
STDAPI DllRegisterServer(void)
{
// registers object, typelib and all interfaces in typelib
return _Module.RegisterServer(TRUE);
}
/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry
STDAPI DllUnregisterServer(void)
{
return _Module.UnregisterServer(TRUE);
}
/////////////////////////////////////////////////////////////////////////////
// DLLVerifySignature - Allows Verification on double click
/*bool DLLVerifySignature(void)
{
return TRUE;
}*/
|
|
|
|
|
Hi guys,
In VS 6 C++ there was no Bool CArchive Operator so we made one of our own where it used an int for true = 1 false = 0, naturally.
Now I see .NET C++ they have been clever and added one of their own, how can I disable that and use my own without having to derive a class from CArchive and overloading it??
I would be interested to hear if anyone else has this problem
The Wudan Master
|
|
|
|
|
I guess you defined your homemade operator as a global CArchive& operator<<(CArchive& ar,bool b) , right? If so, and if you can afford some syntax ugliness, you can force selection of this operator instead of the built-in one by calling it explicitly like this:
CArchive ar;
...
operator<<(ar,true);
operator<<(ar<<1<<2,false)<<3<<4;
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks Joaquín M López Muñoz
it works for me
The wudan Master
|
|
|
|
|
hi,
In my project when debugging mode i am getting the warning
First-Exception raised in Kernal32.dll.
How can avoid this?
Thanks in advance.
anju
|
|
|
|
|
This thread treats the same issue you posed.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thanks for your reply..
Is there any way to Avoid this ?
anju
|
|
|
|
|
In some cases, these exceptions are caused by calls to the Win32 API from your program with incorrect parameters --check for that inspecting the particular API where the exception is showing. Could you post the offenging code? Other than that, caught first-time exceptions is the handler's businesses. I wouldn't worry too much if everything's working.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi !
How can i get the handle to another running App ? (For example, Notepad).
Thank you !
Jerome
|
|
|
|
|
If you already hava a window handle for that app (obtained for instance with FindWindow ), <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/windows_5y90.asp">GetWindowThreadProcessId</a> gives you the associated process handle.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
PS: Oops, did I say process handle? GetWindowThreadProcessId gives you the process id. From this you can retrieve the process handle with <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/prothred_478z.asp">OpenProcess</a> . Regards.
|
|
|
|
|
|
I want to oprn an avi movie in the media player in a vc++ program..
Thanx in advance
doudou
|
|
|
|
|
Experiment with ShellExecute . You don't need to specify the executable name for the Windows Media Player, just the name of the .AVI file (ShellExecute will know how to locate the player for the file.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Simple:
Use "Media Player ActiveX",its one standard activex in visual studio.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|