Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMFC Commandline.... Pin
Phil.Benson10-Jul-06 21:29
professionalPhil.Benson10-Jul-06 21:29 
AnswerRe: MFC Commandline.... Pin
Abhi Lahare10-Jul-06 21:47
Abhi Lahare10-Jul-06 21:47 
AnswerRe: MFC Commandline.... Pin
Monty210-Jul-06 22:20
Monty210-Jul-06 22:20 
GeneralRe: MFC Commandline.... Pin
Phil.Benson10-Jul-06 22:28
professionalPhil.Benson10-Jul-06 22:28 
QuestionIP ADRESS Pin
ashish dogra10-Jul-06 21:06
ashish dogra10-Jul-06 21:06 
AnswerRe: IP ADRESS Pin
Abhi Lahare10-Jul-06 21:12
Abhi Lahare10-Jul-06 21:12 
GeneralRe: IP ADRESS Pin
ashish dogra10-Jul-06 21:17
ashish dogra10-Jul-06 21:17 
AnswerRe: IP ADRESS Pin
A_Fa10-Jul-06 21:13
A_Fa10-Jul-06 21:13 
Hi jigar .

void GetIPAddress(char *ipAddress)
{
#define MAX_NAME_LEN 65

WSADATA wsaData;
if ( WSAStartup( MAKEWORD( 2, 2 ), &wsaData ) == 0 )
{
char HostName[MAX_NAME_LEN];
struct in_addr *ptr;

gethostname (HostName,MAX_NAME_LEN);

hostent *host = gethostbyname(HostName);

if(host == NULL)
{
ipAddress = NULL ;
WSACleanup( );
return ;
}

ptr = (struct in_addr *)host->h_addr_list[0];

CString str;
str.Format("%d.%d.%d.%d",
ptr->S_un.S_un_b.s_b1,
ptr->S_un.S_un_b.s_b2,
ptr->S_un.S_un_b.s_b3,
ptr->S_un.S_un_b.s_b4);
strcpy(ipAddress,(char*)str.GetString());
}

WSACleanup( );
}

AnswerRe: IP ADRESS Pin
Hamid_RT10-Jul-06 21:27
Hamid_RT10-Jul-06 21:27 
Questionhow can i get the images into listcontrol. Pin
Amit Agarrwal10-Jul-06 20:35
Amit Agarrwal10-Jul-06 20:35 
AnswerRe: how can i get the images into listcontrol. Pin
Code_Zombie10-Jul-06 20:55
Code_Zombie10-Jul-06 20:55 
GeneralRe: how can i get the images into listcontrol. Pin
Amit Agarrwal10-Jul-06 21:06
Amit Agarrwal10-Jul-06 21:06 
AnswerRe: how can i get the images into listcontrol. Pin
Hamid_RT10-Jul-06 20:56
Hamid_RT10-Jul-06 20:56 
GeneralRe: how can i get the images into listcontrol. Pin
Amit Agarrwal10-Jul-06 21:10
Amit Agarrwal10-Jul-06 21:10 
GeneralRe: how can i get the images into listcontrol. Pin
Hamid_RT10-Jul-06 21:29
Hamid_RT10-Jul-06 21:29 
QuestionDetecting Mic Pin
atimpoo10-Jul-06 20:28
atimpoo10-Jul-06 20:28 
AnswerRe: Detecting Mic Pin
Hamid_RT10-Jul-06 20:34
Hamid_RT10-Jul-06 20:34 
Questionhow to find the value of a macro? Pin
George_George10-Jul-06 20:15
George_George10-Jul-06 20:15 
AnswerRe: how to find the value of a macro? Pin
Code_Zombie10-Jul-06 21:00
Code_Zombie10-Jul-06 21:00 
GeneralRe: how to find the value of a macro? Pin
George_George10-Jul-06 21:14
George_George10-Jul-06 21:14 
QuestionAbout CMutex And CSingleLock Pin
Diglu10-Jul-06 20:11
Diglu10-Jul-06 20:11 
AnswerRe: About CMutex And CSingleLock Pin
FarPointer10-Jul-06 23:46
FarPointer10-Jul-06 23:46 
QuestionHow to get list of printer names Pin
Vinod Moorkkan10-Jul-06 20:10
Vinod Moorkkan10-Jul-06 20:10 
AnswerRe: How to get list of printer names Pin
Hamid_RT10-Jul-06 20:13
Hamid_RT10-Jul-06 20:13 
GeneralRe: How to get list of printer names Pin
Vinod Moorkkan10-Jul-06 23:10
Vinod Moorkkan10-Jul-06 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.