|
If it has the LBS_OWNERDRAWFIXED style, then be sure to add the LBS_HASSTRINGS style as well.
|
|
|
|
|
Arrgh!!
It was not meant to be an ownerdraw ListBox, but in some way I did hit the "Ownerdraw" selection property in VC++ by chance!!!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Hi,
I just made a program to download a file from the web (using URLDownloadToFile). I'm trying to download a html file with the latest news in a particular site, but it always comes unrefreshed... I always get the same file!
How can I do to refresh it before download ?
Or download the refreshed one ?
thanks.
|
|
|
|
|
It sounds like you're fetching via a proxy... -or- you forced to use a proxy (via your ISP for example). have a look on the HTTP headers, if you find a proxy notice.
|
|
|
|
|
I use CInternetSession::OpenURL() and specify INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_RELOAD.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
i've written a program, using winsock.h
now i want to implement some client server functionality in the program, yet when i try to include CSocket.h and use it as a basis for my own class, the compiler presents me with the following error message: "CSocket base class unknown" or something like that.
has anyone had this problem before, or does anyone have any idea on how to fix this problem.
i would appreciate some help.
thanx in advance,
laue
|
|
|
|
|
laue wrote:
"CSocket base class unknown" or something like that.
CSocket (or CAsyncSocket) are MFC classes, you need to include and link against MFC stuff (if you want to use one of those). You can also use pure Winsock and write your own classes.
Moak
|
|
|
|
|
Moak wrote:
You can also use pure Winsock and write your own classes.
Which is much better than using the MFC classes!
But if you want to use the MFC classes laue, go for it!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
it is easy and most of all fast to implement MFC classes. since i'm doing this project for school and it has to be turned in on monday, i would very much like to use CSocket.
Is there any way of using both winsock an CSocket in the same project? what do i have to link/include for it to work?
thanx,
laue
|
|
|
|
|
laue wrote:
Is there any way of using both winsock an CSocket in the same project?
Why do that!?
CSocket is a wrapper class for the Winsock API, a bad wrapper besides.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
i'll try coding it using winsock, but due to my deadline, if it turns out to be too time consuming, i'm afraid i'll take the easy way out (however non-elegant).
thanx for your reply,
jef
|
|
|
|
|
I understand your point!
Go for the MFC classes but please promise me: Never use the MFC classes for serious projects!
just kidding man!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
laue wrote:
Is there any way of using both winsock an CSocket in the same project?
I second Rickard. You don't want that!
For examples of using Winsock or CAsyncSocket or overlapped IO ask Google (Codeproject has some tutorials too).
Time for more .... Moak
PS: Rickard I did answer your older post
|
|
|
|
|
Moak wrote:
Rickard I did answer your older post
Great thanks!
I've answered you too here
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Hi Moak,
I read you from GnutellaForums today.
I hope you'll get this message...
I wanted to ask you: www.groove.com
does this product seems to fit the bill of someone
who needs a P2P framework for a decentralized SETI
like app ?
Thanks!
Me
|
|
|
|
|
There is no CSocket.h header file. Just add this line to your stdafx.h header file:
#include AfxSock.h
and then call AfxSocketInit(NULL) in your CMyApp::InitInstance() !
A. Riazi
|
|
|
|
|
Iv'e tried to use RasConnectionNotification() but I get an error:
'undeclared identifier'
Iv'e tried to write a prototype:
DWORD APIENTRY RasConnectionNotificationW(HRASCONN, HANDLE, DWORD);<br />
DWORD APIENTRY RasConnectionNotificationA(HRASCONN, HANDLE, DWORD);<br />
<br />
#define RasConnectionNotification RasConnectionNotificationW
got an error: 'RasConnectionNotification' - unresoulved external
I've added Rasapi32.lib to the linker, also included Ras.h
I also use in my code RasEnumConnections() - links great(How???, same lib!)
What have I done wrong?
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
RasConnectionNotification was defined in Ras.h also RasEnumConnections.
There is no need to write function declaration manually!
A. Riazi
|
|
|
|
|
At 1st, I didn't declared RasConnectionNotification , but I got an error of 'undeclares identifier'. My WINVER is 0x500 (Win2K) and I linked properly to Rasapi32.lib, so I don't find any reason for this not to work.
IT DOESN'T WORK!!!
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Are you using the "correct" version of Windows? Ras.h has this line in it before RasConnectionNotification #if (WINVER >= 0x401)
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
My WINVER is 5 (Win2K). Maybe it's in my project settings symbols.
Friends, I need help!
--BlackSmith--
/*The roof is on fire, we don't need no water, let the MF burn*/. BHG.
|
|
|
|
|
Just created a simple console app on my PC NT4 Visual C++ 6.0
#include "Windows.h"<br />
#include "Ras.h"<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
HRASCONN hrasconn = NULL;
HANDLE hEvent = NULL;
DWORD dwFlags = RASCN_Connection;
<br />
RasConnectionNotification(hrasconn, hEvent, dwFlags);<br />
return 0;<br />
}
Compiles and links OK I think I am using November 2001 SDK as well, so it looks like your settings!
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
confused:hi all,
I am trying to run an exe using shellexecute() function...but it is failing I guess..can anyone tell me what the problem is..when i am giving the full path of the EXE it runs well..but when I am giving it the relative path...suppose the full path of exe is c:\somedir\dir1\file.exe okay..and i am working in suppose somedir..then If i am giving the full path above it is working..but when i tell it just like \dir1\file.exe it doesn't work...why..i am completely pissed off with this..can anyone please help...
thanks in advance
Himanshu
|
|
|
|
|
Use this statement: .\dir1\file.exe or dir1\file.exe
A. Riazi
|
|
|
|
|
:(i tried this but this doesn't work..
thanks for reply..
cheers
Himanshu
|
|
|
|