|
Ernest thanks for being patient. Yeah all the literature I have on MFC always say use AfxBeginThread, and thanks for elaborating on the different thread calls.
I wonder why the PSDK or the many books I HAVE on MFC don't mention those functions?!?!
Thanks!
HomeNuke
----
"Nuke'd Your Home, Yet?"
Run your own PostNuke based web server from home
http://www.homenuke.com
|
|
|
|
|
Might not get into the while until the listen call returns, i.e. something connects.
As stated above, might want to fake a connection on 127.0.0.1 to kick the listen off its perch when shutting down.
|
|
|
|
|
Checked for that with the debugger was able to start stepping through the while loop. That gave me the impression that I was in there, hopefully the while loop is not split off into it's own thread that runs while listen is tied up That would be just my luck...
HomeNuke
----
"Nuke'd Your Home, Yet?"
Run your own PostNuke based web server from home
http://www.homenuke.com
|
|
|
|
|
Ok - my impression was that the listen would block until it rec'd a connection. Are you using the WSAAsyncSelect or WSAEventSelect to get around that?
Thats different then.
Never mind.
|
|
|
|
|
I need to have a function to delete a directory. Every month or week I will create a directory and store files inside. After so many weeks or months, it should auto delete itself. I have looked but don't know how to enum or search the directories on some disk and then do my thing. Any suggestions?
Thanks in advance!
|
|
|
|
|
Use ::FindFirstFile / ::FindNextFile to enumerate the directories , and ::RemoveDirectory to delete what you want
|
|
|
|
|
Use SHFileOperation() , which doesn't require the dir to be empty.
--Mike--
"COM didn't solve the old version of DLL hell - it just provided us with a new and improved version of hell."
-- John Simmons, 1/22/2002
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan.
|
|
|
|
|
i'm writing an application that creates CWebBrowser Controls in a form view at run time, and i need to catch the these control's events. All the examples i've seen use the class wizard to generate the Event Sink Map.
Is there a way to catch all the events in the FormView and then determine wich control fired the event ?
Thanx
Abdiel Jaramillo
Arango Software International
Panama, Rep. of Panama.
|
|
|
|
|
Hi!
Anybody who could give me a clue on how to convert a text into a BML (Broadcast Markup Language) format or DTD(Document Type Definition) format???
I would appreciate whatever tip you could give.. Thanks...
Samantha
|
|
|
|
|
Hey I'm working on a project and I am having some memory leaks and access violations that are driving my up the wall. I was wondering if someone would be willing to do a code review. It shouldn't take too long it's (at this moment) only 1000 lines. I'd ask someone i know to do it but I am the only person who know c++. Thank you.
Stephen Caldwell
Blackfission, CEO
http://blackfission.myip.org:81
|
|
|
|
|
HI I would like to help. Tell me how I can access you code?;)
|
|
|
|
|
Hello everybody again!
Nobody can help me?
Who may help me with such question
The size pInfo->m_rectDraw always is less than structure CPrintInfo, than the real size of a sheet.
Whether it is possible to determine displacement m_rectDraw from the left top corner of a sheet, if yes, as?
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
Hi,
I would like to do something very innocent.. just print a normal little bitmap with the logo of my product in a page...
Well, I have started reading about that, and seems that is a nightmare to do that !, take the bitmap, convert it from DDB to DIB, and then ok, there is no class in MFC to handle dibs... ?????
Is there any easy way to do that ? ( I mean, print a normal bitmap ( with 3 or 4 colors not more)).
Thanks, Bye !
Braulio
|
|
|
|
|
I'm designing a custom control based on the CWnd class that displays a card
for a card game. I have been able to get the control to send back messages
to the parent dialog (MFC Dialog App) but I have had no end of trouble trying
to figure out which card has been clicked when they are overlapped. I've
tried messing around with the z-order, but have had no success. Any ideas?
|
|
|
|
|
Hello, I'm trying to construct a 3D image using OpenGL by getting the coordinates from a series of bitmap files. Each bitmap contains a cross section of the shape at a different height. So I need to get 2D coordinates from the files to construct my image. How do I get coordinates from a bitmap picture, supposing that I have marked all the necessary coordinates with red dots in the bitmap files. (note: there is no red in the bitmap otherwise).
|
|
|
|
|
The powers that be have dropped a Grand Multi Capture Card on my desk. It has four ports that CCTV cameras my be plugged into. Using AVICAP I can capture from one camera at a time. By calling up the source dialog box, I can select which camera is captured from.
What I would like to do is programatically select which camera is captured from. As far as I've managed to figure out, AVICAP can't do this, however I've heard a rumour about something called "crosspoint matrix" in DirectX.
Has anyone heard of this, or know of how I can do this please? Thanks
Jeremy Davis
http://www.astad.org
|
|
|
|
|
I want to find out the colour of every pixel in my bitmap.
GetPixel seems to be very slow
Can anybody help or point me to a certain docs?
Thank you in advance...
|
|
|
|
|
If memory serves me correctly, theres a bmbits pointer in the BITMAP structure. This might help. dont quote me onit though. arggh i cant type today
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
hi all
i am able to get the ip address of local host using gethostname() and gethostbyname() functions. but it is not working in Windows 95. it says WSAHOST_NOT_FOUND.
if i given value of hostname in gethostbyname function as Win95 m/c's name and i run it in Win98, its fetching the IP address perfectly(Win95 m/c ip address).
i don't know why its not fetching in Win95?
these system are all DHCP configured.
please get me if u have any idea
Thanks in advance.
regards
Halid
|
|
|
|
|
(Just a guess) Have you previously initialized Winsock with WSAStartup ?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hi,
i initialized Winsock by using WSAStartup function.
i am able to get the IP address in 98/NT systems. but its not woking in Win95.
i don't know the problem why its not working in Win95.
any suggestions.
regards
Halid
|
|
|
|
|
Well, you can pass NULL to gethostbyname if it's the local machine IP what you're after, but that would only mask your problem.
What version of Winsock are you using? If it is 2.0, how did you do the upgrade? (95 comes with 1.1 by default)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
hi
this is my code to fetch the ip address of local host.
CString hname, IPAddress;
IPAddress.Empty();
WSADATA WSAData;
if(WSAStartup(MAKEWORD(1,1), &WSAData) != 0)
{
// MessageBox("Sockets unInitialized ","Server Sockets", MB_OK);
return ;
}
char hostname[250];
/* SOCKADDR_IN sin;
sin.sin_family = AF_INET;
sin.sin_port = 5000;*/
memset(hostname,'\0',sizeof(hostname));
if( gethostname(hostname,sizeof(hostname)) == SOCKET_ERROR)
{
// MessageBox(" Error getting host name","Server Sockets", MB_OK);
return ;
}
AfxMessageBox(hostname);
PHOSTENT phe;
phe = gethostbyname(hostname);
CString s;
struct in_addr *inaddr;
// AfxMessageBox(phe->h_name );
inaddr = (struct in_addr *)phe->h_addr_list[0];
int a = inaddr->S_un.S_un_b.s_b1;
int b = inaddr->S_un.S_un_b.s_b2;
int c = inaddr->S_un.S_un_b.s_b3;
int d = inaddr->S_un.S_un_b.s_b4;
IPAddress.Format("%d.%d.%d.%d",a,b,c,d);
AfxMessageBox(IPAddress);
}
how do i upgrade Winsock 1.1 to Winsock 2.0.
i'll try with hostname as NULL.
Thanks for your suggestion.
but reply me if you find any other method
regards
Halid
|
|
|
|
|
Your code seems OK to me (I compiled and ran it in a 95 box without problems).
I'd say probably your network settings are misconfigured, or it could be a problem with DHCP. I suggest to try the following tests:- Record the name returned by
gethostname and issue a ping to that name from the command line. It it fails then something's be wrong with your network settings.
- Run
winipcfg from the command line and check that your machine has been given an IP from the DHCP server. If it is not, then that could be the cause of the problem: in that case, try clicking on "Renew all" and running your program again. - Just for testing purposes, disable momentarily DHCP on your 95 machine and assign it some fixed IP instead. Run your program to see what happens.
You can follow this link to Windows Socket 2 Update for Windows 95. I don't think your problem will solve with the upgrade, though.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks for your suggestion.
i have tried out all the options what you mentioned in message. In winipcfg, it shows the full details of that machine, including IP,DHCP server IP,MAC address and etc.,
if i run this code in 98/NT machine with hostname as Win95 machine's name, it shows the IP address of Win95 machine perfectly.
In gethostbyname function, i given "www.google.com" it shows the IP address of Google webserver, i ran this it in Win98. the same code is not running in Win95.
for all the values it says "WSAHOST_NOT_FOUND" error. i have passed NULL value in gethostbyname, still its giving this error only.
Pls, i need help from u.
regards
Halid
|
|
|
|