|
I am creating Images Like this ...It works for JPG,gif,png.But not for EPS.SO I need a Method to export Images as EPS.
Image image(L"Mosaic.bmp");
CLSID pngClsid;
GetEncoderClsid(L"image/eps", &pngClsid);
image.Save(L"Mosaic2.eps", &pngClsid, NULL);
But this is not working.
Mosaic.bmp is real bmp file. Now I think this is clear for u what I going to do.
|
|
|
|
|
I'm trying to convert a CString to UTF-8, anyone who knows haw this is to be done? I've read a lot of pages on the Internet about WideCharToMultiByte but I can't get it to work. If someone knows how to do I would be very greatful for your help.
Thanks
|
|
|
|
|
If your application is compiled with UNICODE (and _UNICODE ) defined, your CString s will contain WCHAR s. You should be able to use WideCharToMultiByte directly, passing the CP_UTF8 value.
If your application is not compiled with UNICODE , your CString s will contain char s, which may represent multi-byte character strings (depending on the locale). There are no routines for directly converting a char -oriented string from one character set to another; instead, you should convert to a WCHAR string using MultiByteToWideChar , then convert to UTF-8 as above.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hello,
<br />
CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY|OFN_FILEMUSTEXIST, "SI Projekte (*.3dsi)|*.3dsi |Alle Dateien (*.*)|*.*||", this);<br />
i only like to show my .3dsi files, but this only shows folders?
Thanks, Mark
|
|
|
|
|
This way works.
CFileDialog dlg(TRUE, "3dsi", "*.3dsi",
OFN_HIDEREADONLY|OFN_FILEMUSTEXIST,
"SI Projekte (*.3dsi)|(*.3dsi) |Alle Dateien (*.*)|*.*||",
this);
Maxwell Chen
|
|
|
|
|
I call it like this
char BASED_CODE szFilter[] = "3D SI Files (*.3dsi)|*.3dsi|All Files (*.*)|*.*||";
CFileDialog dlg(TRUE,"3dsi",NULL,OFN_ENABLESIZING|OFN_OVERWRITEPROMPT|OFN_HIDEREADONLY,szFilter,this);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
"*.3dsi" should be passed as argument to the third parameter to select the clone, otherwise nothing would show.
Maxwell Chen
|
|
|
|
|
The third parameter is "the initial filename that appears in the filename edit box. If NULL, no filename initially appears."
He never said he wants something by default
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Specifying "*.3dsi" does not select any specific file by default.
Originally I tested it with NULL as what you said, but no file appeared. So I looked at the example in MSDN, and found that something was required for the 3rd param.
Maxwell Chen
|
|
|
|
|
allright, it works!
Thanks, Mark
|
|
|
|
|
Hi Guys,
My requirement is little bit peculier. I would like to keep the Screen saver in Dialog Box like we keep controls on the Dialog BOx.
thanks in advance.
bbye
|
|
|
|
|
take a look at this article:
http://www.codeproject.com/bitmap/ballfusion.asp
go through the screen-saver api see if the fChildPreview can help you out...
|
|
|
|
|
Hi all
This is my first mail to this forum.
I am seeing this message while compiling my DLL(on WIN2K), which is using SDK.
"NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information."
Origionaly it didn't compiled a free build but when i define this in my header file,it does compile a free build.
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
Can someone please tell how to rectify it.
Where to get these retail headers.,i am using the SDK CD which came with Oct. 2002 MSDN subscription.
Thanks in advance
Regards
Hardeep
|
|
|
|
|
It sounds like your directories are out of order: you're still including the headers which came with Visual Studio 6.0.
You should see if the SDK install put options on the Start Menu to 'Register PSDK Directories With Visual Studio', which recent versions of the SDK do. If you want a more up-to-date SDK, you can download it from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/default.htm[^].
Otherwise, ensure that the SDK directory appears before the VC98 directory in Tools > Options > Directories.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I'm writing a TCP client and server program which uses sockets, ReadFile, overlapped I/O and completion ports. To test it I've written one client and one server program which use standard winsock functions for the sake of simplicity.
When testing the server part of the program ReadFile will sometimes fail giving ERROR_IO_PENDING as the reason.
What should I do to correct this error situation? If I "leave it alone" it never wakes up again. What I've done thus far is simply close the socket and discard the session attached to it. There has to be a more intelligent way than just discovering something went wrong and killing the session.
Thanks,
Olof
|
|
|
|
|
Surely 'ERROR_IO_PENDING' just means that you will get the data in an overlapped operation later? IOW it's not an error but an intrinisic part of overlapped IO.
Sorry if I've missed the point.
Paul
|
|
|
|
|
Actually there are two parts to using ReadFile:
1. Post the ReadFile which usually returns TRUE.
2. When there is data available the completion port will be notified by the socket.
The ERROR_IO_PENDING error is uncovered when the ReadFile posting returns FALSE. If you leave it the completion port will never be notified.
Nifty, huh?
|
|
|
|
|
I have a network server framework that uses IOCP, ReadFile/WriteFile etc. So I did some experimenting.
In a simple echo server test app the WriteFile always returns no error, the data has been passed to the transport etc. It also always causes the IOCP routine to run afterwards. The ReadFile always returns 'FALSE' with a status of ERROR_IO_PENDING unless there is data ready at the time it is called. In either case the IOCP routine is entered afterwards. Both these calls are also being made from the IOCP routine.
So IME whether you see ERROR_IO_PENDING or not doesn't matter, your completion routine runs anyway.
I'm puzzled why yours appears not to.
Paul
|
|
|
|
|
Hi Paul,
Sorry I've taken so long to reply.
I think I may have found what causes the problem.
In some cases the ReadFile parameter 3 (count) added to parameter 2 (pointer) may result in an address which causes a memory protection fault. (In my case) NT4 detects this and reports an error, but in some of the cases - where there is unallocated memory available immediately after the allocated buffer - NT is "nice" and allows the ReadFile call. In other cases - where there is no memory - you get the error. This gives the error the appearance of being intermittent which caused me to start digging into the apparent fact that it always occurred after the xth call to ReadFile and what had I been doing x times elsewhere.
You get the picture.
Olof
|
|
|
|
|
Sir,
I am doing a file searching program before my appication shows its screen.
If the file exists then the main window is shown otherwise an error is reported to the client.
I know the code to be written will be in InitInstance but do not understand the exact place to write.
Say.....
if File Exists
Show the Main window
else
Do not show the main window
Report an error to the client.
Regards
Ykut
Pls guide
|
|
|
|
|
well, this seems to be pretty simple to me if i got that right:
BOOL FindFile(void)
{
BOOL bResult;
// ...
return bResult; // return TRUE if your file's been found
}
// initinstance()
if( FindFile() )
{
CYourDialog dlg;
if( dlg.DoModal() == IDOK )
// client clicked OK
else
// client clicked cancel
}
else
{
MessageBox(NULL, // your error msg...
}
//////////////////////////////////////////
i made a dialog-based app, for the sake of simplicity and clarity...
hope this helps
Я люблю русский языкь!
|
|
|
|
|
Sir,
I am doing a file searching program before my appication shows its screen.
If the file exists then the main window is shown otherwise an error is reported to the client.
I know the code to be written will be in InitInstance but do not understand the exact place to write.
Say.....
if File Exists
Show the Main window
else
Do not show the main window
Report an error to the client.
Regards
Ykut
Pls guide
I am doing a multi threaded application that involves exchange of data.
ONE UI THREAD
AND 3 WORKER THREADS.PLS LET ME HOW TO EXCHANGE THE DATA BETWEEN THESE 3 WORKER THREADS.
FOR EX:THE FIRST THREAD WILL GIVE THE SECOND THREAD THE 2 NUMBERS AS ARGUEMENTS.the second thread should return the first thread the sum.
Pls help
|
|
|
|
|
How can I integrate Perl with Microsoft Visual C++? I have both 6.0 and 7.0, but would appreciate any links or standard texts on this subject.
|
|
|
|
|
|
I use project CpolyBtn of Chris Losinger . when only one Dialog is ok.
When two Dialog then error in function OnPreSubClassWinDow, project is running but function SetFillColor is not running.
Thank
Hello
|
|
|
|