|
|
No problem good luck coding.
|
|
|
|
|
While smesser's technique works (using the reversefind), I prefer using the _splithpath so here's an alternative:
TCHAR buff[MAX_PATH];
GetModuleFileName(NULL, buff, MAX_PATH);
char drive[2];
char dir[MAX_PATH];
char fname[MAX_PATH];
char ext[MAX_PATH];
_splitpath(buff, drive, dir, fname, ext);
|
|
|
|
|
Hey
How to request data from an URL and display this data into an editbox or static text?
thanks in advance
|
|
|
|
|
URLDownloadToFile will download the page to a file. You can then open and display the file
URLDownloadToCacheFile will download the page to a cached file where you can access the data
By the way, I think VC++ MVP Michael Dunn has a really nice article on this site showing how to use the URLDownloadToFile function. You should be able to search and find it easily enough.
|
|
|
|
|
okay thanks alot, I will give it a try....
|
|
|
|
|
Hi everybody.
I want to make an application, that its added to the start menu by itself. If any body can explain me how i can make that, i will be gratefull.
|
|
|
|
|
As the Start menu simply displays folder entries, I would imagine that you could simply create an entry in the desired folder. For example, if you wanted to create an entry for the user tomarcher, you would add the entry to the c:\documents and settings\tomarcher\start menu folder. If you open the documents and settings folder you can see all this or if you right click the start menu and select Explore you can easily see where your entries would go.
[EDIT] Note that what I'm saying is a "manual" way of doing things. There might be a specific API for doing this that someone else can share with us.
|
|
|
|
|
The start menu itself is just a user directory. Usually C:\Documents and Settings\%USER%\Start Menu\ but you should call SHGetSpecialFolderLocation with CSIDL_STARTUP, then you can copy a shortcut to this path.
|
|
|
|
|
I read something about IShellLink and IPersistFile. But when i go to save the link, the aplication sends me an AccessDenied error. But i dont know what is the problem.
|
|
|
|
|
I don't really know what to say except check the permissions, not everyone can modify other users directories or "AllUsers."
|
|
|
|
|
When a link is cliked in any webpage then a "tick" sound is played. I want to Quiet this sound. My web Page is in WebBrowser control and i using VC++6.0.
Please guide me.
Quaidian For Once, Quaidian For Ever
|
|
|
|
|
I think you can only disable the tick sound globally... for every instance of internet explorer etc.
Don't try it, just do it!
|
|
|
|
|
ok -- tel me How
Quaidian For Once, Quaidian For Ever
|
|
|
|
|
The user can disable the "tick" sound in the control panel where he sets the Sound Schema
(have no english windows here, my translation backto englis his "Sounds and Multimedia", "Sounds", and then in the "Windows Explorer" group the "Begin selection" sound).
There is no documented programmatic access to these settings.
However, they are stored in the registry under HKCU\AppEvents\Schemes\Explorer\Navigating\
Note: this might be different between Windows versions (I haven't checked Win9x, ME, NT, 2K3), and might change in the future without warning.
However, this is global for the current user.
Another limited workaround I found is:
Hide the explorer control in BeforeNavigate, and show it in OnDownloadComplete.
This is fine for short documents that don't take a long time to load. I tried to set it tighter (.g. using OnNavigateComplete), but then clicks sometimes come through.
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
hi
i want to use the winsock api in my application. but right at start when i call the wsastartup() i cannot start up. can anybody tell me how to use the winsock api in mfc
ddd
|
|
|
|
|
tasleem143 wrote:
but right at start when i call the wsastartup() i cannot start up.
Doesn't make sense!?
Don't try it, just do it!
|
|
|
|
|
yes i make sense
when u start netowrk programming u had to start the newtork socket or initialize the network socket through the wsastartup() funcion.
hope u will be satisfied.
ddd
|
|
|
|
|
This works for me in VC++6:
Header:
class Network : public CAsyncSocket
{
// Attributes
public:
CAsyncSocket Socket;
// Operations
public:
Network();
virtual ~Network();
// Overrides
public:
int Update(IN unsigned char * data, IN int datalength,OUT unsigned char * result, OUT int * resultlength);
// Implementation
protected:
WSADATA wsaData;
};
Implementation:
Network::Network()
{
int err;
char text[64];
if (AfxSocketInit(&wsaData)){
Socket.Create(0, SOCK_DGRAM );
if (!Socket.Connect("192.168.1.77",666)){
err = Socket.GetLastError();
wsprintf(text,"Connect Error %x",err);
MessageBox(NULL,text,"Network",MB_OK);
}
}
}
int Network::Update(IN unsigned char * data, IN int datalength,OUT unsigned char * result, OUT int * resultlength)
{
if (!datalength) return -1;
return Socket.Send(data, datalength);
}
|
|
|
|
|
can i not use the socket api instead the casyncsocket. bcos i dont know much about the Casynch functions whether they work on the blocking or the nonblocking mode.
ddd
|
|
|
|
|
The CAsyncSocket is the MFC version of the 'classic' API.You can use it blocking or non-blocking. Depends if you give it the events it should notify. MSDN has some good info on it.
Wim
|
|
|
|
|
anybody help me
i have read the main header of Shape File successfully.right now i m reading record header og each record contained in that file the problem i m facing is that record header contain1)Record Number 2)Content length
Record Number must begin with zero but i have retrieved 10
what can i do now.
|
|
|
|
|
What does the file look like and how are you reading it?
|
|
|
|
|
thnx david.
actually i have read the FileHeader of Shape file after header of shape file the RecordHeader of each record i have to read.
structure of file is like
__________
FileHeader
____________________________
RecordHeader |RecordContent
____________________________
RecordHeader |RecordContent
_____________________________
.
.
.
Recordheader contain the Record number and Content length.
each have type Int
|
|
|
|
|