Voila j'ai fait un programme C et je dois réaliser une IHM.
J'ai commencé une IHM a base de MFC.
1ère question:
Comment lier mon programme fait sous Win32 Console Application et mon IHM fait avec MFC wizzard? Est ce possible
Sinon dois-je implanter mon pgm C dans mon MFC?
2ème question:
J'ai pour l'instant ds mon IHM une listBox que je rempli statiquement.
CListBox* pListBox=static_cast<CListBox*>(GetDlgItem(IDC_LIST1));
pListBox->AddString("a");
pListBox->AddString("b");
pListBox->AddString("c");
J'aimerai a partir du code par exemple ci dessous, remplir ma lisbox. Est ce possible?
#include "pcap.h"
main()
{
pcap_if_t *alldevs;
pcap_if_t *d;
int i=0;
char errbuf[PCAP_ERRBUF_SIZE];
char NIC[1000];
/* Retrieve the device list from the local machine */
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL /* auth is not needed */, &alldevs, errbuf) == -1)
{
fprintf(stderr,"Error in pcap_findalldevs_ex: %s\n", errbuf);
exit(1);
}
/* Print the list */
for(d= alldevs; d != NULL; d= d->next)
{
printf("%d. %s", ++i, d->name);
if (d->description)
printf(" (%s)\n", d->description);
else
printf(" (No description available)\n");
}
if (i == 0)
{
printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
return;
}
/* We don't need any more the device list. Free it */
pcap_freealldevs(alldevs);
}
Si qqun peut me filert un coup de main.... Je ss un peu perdu et je dois avancer!!!!
Merci