|
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
|
|
|
|
|
Try posting the question in the article forum from where you downloaded the project, Chris Losinger may reply you directly.
God is Real, unless declared Integer.
|
|
|
|
|
Hello!
To avoid flickering during scrolling and resizing I use next code:
<br />
BOOL CMyView::OnEraseBkgnd(CDC* pDC)<br />
{<br />
return TRUE;<br />
}<br />
<br />
void CMyView::OnPaint()<br />
{<br />
CPaintDC dc(this);<br />
<br />
CRect rcPaint = dc.m_ps.rcPaint;<br />
<br />
CBitmap bmp;<br />
bmp.CreateCompatibleBitmap(&dc, rcPaint.Width(), rcPaint.Height());<br />
CDC newDC;<br />
newDC.CreateCompatibleDC(&dc);<br />
CBitmap *pOld = newDC.SelectObject(&bmp);<br />
<br />
newDC.SetViewportOrg(-rcPaint.left, -rcPaint.top);<br />
<br />
OnPrepareDC(&newDC);<br />
OnDraw(&newDC);<br />
<br />
VERIFY(dc.BitBlt(rcPaint.left, rcPaint.top, rcPaint.Width(), rcPaint.Height(), &newDC, rcPaint.left, rcPaint.top, SRCCOPY));<br />
SelectObject(newDC, pOld);<br />
}<br />
But during scrolling the content is not repainted correctly. Could you help me to improve it?
Thank you in advance.
|
|
|
|
|
Reunion wrote:
newDC.SetViewportOrg(-rcPaint.left, -rcPaint.top);
try commenting this line and are you considering the scroll position ???
God is Real, unless declared Integer.
|
|
|
|
|
I want to download an encrypted exe file from server. Then a client app will unencrypt it to memory and execute it from memory. So the client can not get this important exe file. But I do not know how to do that. Can you tell me how I can realize it?
Thanks.
|
|
|
|
|
Save it to disk first, then use CreateProcess() or ShellExecute() .
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I need add a data file to a exe file,and also need make the additional data file changeable.Can i do that only by edit the exe file,and not need to rebuilt it from source code?
How can I do that?Or if you have any suggestion?
opening view with wild mind
|
|
|
|
|
Probably you can do it by placing data to resources, and using resource related functions. You should be able to both read and modify resources in executables without problems. I have never used this myself, though.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|