Hi all,
I write server application (in fact it is FTP server) using MFC CSocket-derived classes (I know it is not the best approach but I didn't know it when I started).
When user wants to put file on server (upload, STOR command), my receive loop looks like this:
BOOL...
fopen doesn't serve to open directories, it is only for files.
Use this function to test whether the directory exists:
BOOL existsFolder(const CString & folderName)
{
WIN32_FIND_DATA data;
HANDLE hFile = FindFirstFile(folderName, &data);
if ( hFile == INVALID_HANDLE_VALUE ) // directory...
Hi all,
I have MFC SDI application with two toolbars on the same row.
In each of these toolbars I have some buttons which I wrap when it is needed so that all buttons stay visible.
But I have problem with calling RecalcLayout() then.
I set the position of both toolbars using MoveWindow()...
It's just control derived from CSplitterWnd, which contains two panes (CListView-derived classes). At the moment when user drags the splitter divider (between those two panes) I'd like to show the tooltip. Maybe you know it from Total Commander or Servant Salamander, they have it implemented...
Hi all,
I would like to display tooltip, when user drags the splitter divider. The tooltip would display some percents. The important is, that the tooltip should move with the cursor and that the text inside tooltip would be dynamically update (based on cursor's position).
How to achieve that...
Yes, get rid of <winsock.h> (it will be probably in your StdAfx.h file). Then include <winsock2.h> in StdAfx.h and in cpp files where you want to use Windows Sockets functions include just StdAfx.h (and not winsock2.h).
That should help
The following will dump frames into a window called m_imgView. Find the comment for where you can save to disk instead.
With this way, you are using VideoForWindows.
PAVIFILE pfile;
AVIFILEINFO pfi;
PAVISTREAM pavi;
LPBITMAPINFOHEADER lpbi;
PGETFRAME pgf;
HDRAWDIB hdd;
CDC *pDC =...
- Include the header file 'winsock2.h' into the .cpp file where you want to use winsock functions
- Add the library 'ws2_32.lib' to your project (Project -> Settings -> Link -> Object/library modules)
Standa K.
You need to create a named mutex semaphore when you start your application. When the second one starts it tries to get access to the mutex but will fail...
// app.h
class CYourApp : public CWinApp
{
...
private:
HANDLE hMutex;
};
// app.cpp
BOOL CYourApp::InitInstance()
{
// Create...
> Well, IE doesn't know that. I'd assume its trying to
> browse the place given by the url. Isn't the CWD followed > by a RETR later in the progress?
That's just the problem - CWD is not followed by RETR...IE sends CWD twice instead..
> You sure you want to expose the local file structure to
>...
It seems that you try either to delete memory which has already been released or to delete memory which wasn't allocated dynamically on heap, but on stack. Eg.
void func()
{
int i = 0;
int* pi = &i;
delete pi; // we're deleting non-heap memory
}
Standa K.
Hi all,
I'm developing FTP Server and I'm standing in front of quite interesting problem with handling FTP URLs in Internet Explorer: consider this FTP URL:
ftp://127.0.0.1/=Temp=/Update/hi/2/Main.upd
The physical path of FTP's root is c:\=FTP=Of course Main.upd is file. But, when I click on...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.