|
GDI+ is a dll that you can redistribute, that comes with any VC version > 6, or is in the PSDK for VC6. It can load TIFF as well as JPG/GIF/PNG.
I *think* it loads tiff.....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
As Christian said, use GDI+. Be aware that it supports only SOME TIFF files. (Look at TIFF as a container of an image; how the image is actually formatted/compressed is essentially infinite. Before you get too alarmed, there are TIFF formats Apple has never published.) Fortunately, GDI+ handles the more common formats.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
But using GDI+, can I convert any file format to tiff? Or only image file to tiff?
|
|
|
|
|
I don't understand your question since GDI+ only handles image files.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
look at libtiff. libjpeg is also free.
|
|
|
|
|
Ok, but libtiff only convert image file to tiff file. I need to convert any file (readable) to tiff format.
[]'s
|
|
|
|
|
Right, which means you're going to have to do some work.
Starting with libjpeg to decompress jpegs and libpng to decompress pngs. gifs are easy to read, and bmps are trivial; those should cover most image formats.
Otherwise, if you don't need to build this into your program, irfanview will probably do what you want.
earl
|
|
|
|
|
Hello!
I have tried to create a jar-file in MS-DOS on this way:
jar cmf MittProg.txt MittProg.jar *.class
but... when I click on "enter" I see this:
jar is not a command, program or program file.
I have been on: java.sun.com/getjava
and I did install JRE but nothing happens.
what should I do, or how can I on some another way create a jar-file?
Please, help me...I will be very thankful!
/dino
beganovic_swe
|
|
|
|
|
I'm not sure why you expect people on an MFC forum to have the answer to this ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: I'm not sure why
Maybe his garbage collector hasn't run yet... be patient.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
I had to write my question somewhere because I can not see any Java- forum...
It was more natural to write here than in e.g. html-forum because Java is a programming language too.
Where can I ask about Java? Please tell me?
beganovic_swe
|
|
|
|
|
i am using some JNI code and talking to a MFC extension DLL
I am using Visual Studio 6 . I get a crash when i try to create a window in one of the exposed functions . The crash seems to be in afxwin1.inl line 19 after the call to CreateEx
CHiddenWindow hiddenWnd ; <br />
<br />
extern "C" int APIENTRY<br />
DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)<br />
{<br />
UNREFERENCED_PARAMETER(lpReserved);<br />
<br />
if (dwReason == DLL_PROCESS_ATTACH)<br />
{<br />
TRACE0("DLLWRAPPER.DLL Initializing!\n");<br />
<br />
if (!AfxInitExtensionModule(DllWrapperDLL, hInstance))<br />
return 0;<br />
<br />
new CDynLinkLibrary(DllWrapperDLL);<br />
<br />
}<br />
else if (dwReason == DLL_PROCESS_DETACH)<br />
{<br />
TRACE0("DLLWRAPPER.DLL Terminating!\n");<br />
AfxTermExtensionModule(DllWrapperDLL);<br />
}<br />
<br />
<br />
<br />
<br />
<br />
return 1;
}<br />
<br />
JNIEXPORT jint JNICALL Java_Blah1<br />
(JNIEnv *pEnv, jclass)<br />
{<br />
..<br />
hiddenWnd.CreateEx(0 ,::AfxRegisterWndClass( NULL) , NULL , WS_OVERLAPPED , CRect(10,10,10,10),NULL , 0);<br />
..<br />
<br />
}
Any ideas on this ?
Engineering is the effort !
-- modified at 14:23 Wednesday 12th July, 2006
|
|
|
|
|
Well you likely do not have the prerequisit envornment for creating a window since you are running in a Java Console Process! No WinMain no message queue etc.
"Just about every question you've asked over the last 3-4 days has been "urgent". Perhaps a little planning would be helpful?" Colin Angus Mackay in the C# forum
led mike
|
|
|
|
|
I have a .ocx file that I am trying to install on many computers. I have found code in MSDN which shows how to register ActiveX in Visual 6.0 C++. http://msdn2.microsoft.com/en-us/library/ms177531.aspx[^] I successfully put this code into my application so before my program starts up it checks the registry to see if the activeX is installed and if it is not then it will copy the file to the C:\ and install it. This is working for admins only right now.
I copy it to the C:\ and not the system32 folder because the user that is logged on may not have admin rights to do so.
My problem is installing ActiveX will not work if the user doesn't have admin rights. I have tried with my program and using "regsvr32.exe C:\my.ocx" which returns and error stating "DllRegisterServer in C:\my.ocx failed. Return code was: 0x8002801c".
I know there is a function where I can run a batch file as another user (like an admin user) but I dont have a global admins userid and password.
Is there anyway to register an ActiveX with a less privileged user?
Thanks Chris
|
|
|
|
|
chris175 wrote: I copy it to the C:\ and not the system32 folder because the user that is logged on may not have admin rights to do so.
You aren't going to leave it this way, are you?
chris175 wrote: My problem is installing ActiveX will not work if the user doesn't have admin rights.
So can't you just assign those (rights) via AdjustTokenPrivileges() ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Apparently Vista will have this ability: clickety[^]
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Since I didn't want to use MFC after reading all the tutorials on here for minimizing an application to the system tray, I did some research and made it so my program has a tray icon. Now, my only problem is, how do you detect when a window's minimize button is pressed in Win32? I've scoured MSDN and asked on a few forums, but nobody seems to be willing to give a direct answer.
|
|
|
|
|
See IsIconic() .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I got it to work another way, but this is nice to know. Thanks.
Now I have another problem. Apparantly it doesn't respond to this:
[code]case WM_TRAYMESSAGE:
{
if(lParam == WM_LBUTTONDOWN)
{
ShowWindow(hWnd, SW_SHOWDEFAULT);
}
} break;[/code]
Any ideas?
|
|
|
|
|
slippnslide wrote: I got it to work another way...
What other way is there to check if a window is minimized?
slippnslide wrote: [code]case WM_TRAYMESSAGE:
Is this a User-Defined Message (UDM)? If so, where is it sent from? Without seeing the code in context, it's going to be near impossible to offer anything useful.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: What other way is there to check if a window is minimized?
I use this code:
case WM_SIZE:<br />
{<br />
if(wParam == SIZE_MINIMIZED)<br />
{<br />
ShowWindow(hWnd, SW_HIDE);<br />
}<br />
} break;
DavidCrow wrote: Is this a User-Defined Message (UDM)? If so, where is it sent from? Without seeing the code in context, it's going to be near impossible to offer anything useful.
Yes, it is. I was following various articles on here and tried various paramters for it. What I have it now at is this:
#define WM_TRAYMESSAGE (WM_USER + 1)
And this is the code I have for filling the structs for NOTIFYICONDATA:
nid.cbSize = sizeof(NOTIFYICONDATA);<br />
nid.hWnd = hWnd;<br />
nid.uID = 0;<br />
nid.uFlags = NIF_ICON | NIF_TIP;<br />
nid.uCallbackMessage = WM_TRAYMESSAGE;<br />
HICON hIco = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_MYICON));<br />
nid.hIcon = hIco;<br />
strncpy( nid.szTip, "App name", 64 );<br />
<br />
ShowWindow(hWnd, nCmdShow);<br />
Shell_NotifyIcon(NIM_ADD, &nid);<br />
<br />
if(hIco) { DestroyIcon(hIco); }
If you need any more code, I'll post it for you.
|
|
|
|
|
So which of WM_TRAYMESSAGE or WM_LBUTTONDOWN are you not receiving?
slippnslide wrote: Shell_NotifyIcon(NIM_ADD, &nid);
What does this return?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: So which WM_TRAYMESSAGE or WM_LBUTTONDOWN are you not receiving?
That's what I'm not sure of. How would I test?
DavidCrow wrote: slippnslide wrote:
Shell_NotifyIcon(NIM_ADD, &nid);
What does this return?
Well, adding the tray icon works fine. The icon shows up and can be removed just fine.
|
|
|
|
|
slippnslide wrote: How would I test?
A breakpoint. The debugger.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|