Reading data from Arduino to MFC/C++

hi this is my code, i do need your help as i cant figure it out what i did wrong with reading data from Arduino.

#include "stdafx.h"
#include
#include<stdlib.h>
#include"SerialPort.h"
using namespace std;

#include "MPProject.h"
#include "MPProjectDlg.h"
#include "afxdialogex.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

char *port = "\\.\COM7";
char incomingData[MAX_DATA_LENGTH];

void CMPProjectDlg()
{
SerialPort arduino = new SerialPort(port);
if (arduino->isConnected())
{
int hasRead = arduino->readSerialPort(incomingData, MAX_DATA_LENGTH);
if (hasRead) printf("%s", incomingData);
else printf("Error occured reading data");
}

}
CMPProjectDlg::CMPProjectDlg(CWnd* pParent /=NULL/)
: CDialogEx(CMPProjectDlg::IDD, pParent)
{
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CMPProjectDlg::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
}

BEGIN_MESSAGE_MAP(CMPProjectDlg, CDialogEx)
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BUTTON1, &CMPProjectDlg::OnBnClickedButton1)
END_MESSAGE_MAP()

BOOL CMPProjectDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here
control = 0;
return TRUE; // return TRUE unless you set the focus to a control
}

i cant figure it out what i did wrong with reading data from Arduino.

Think about when each of those functions is called. Think about what happens when you open the serial port. How long after you open the serial port does it take for the Arduino to reset and to send some data? How long are you waiting for that data?

What IS the Arduino actually doing?

Why are there so few useful printf() statements in your code?