Hi fellow forum users,
I'm trying to learn Visual C++. I have run into some problems while learning to use the complier. I'm currently studying the the book " Teach Yourself Visual C++ in 21 Days"
The problem is that I can't seem to understand the problem with this code example in the book.
I will upload the complete code if is required, but it appears to be this section of the code causing the problem. The letters are ment to change the arrow icon to a wait icon and a beam icon.Code:void CMouseDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
char IsChar;
HCURSOR ihCursor;
IsChar = char (nChar);
if (IsChar == 'A')
{
ihCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
SetCursor(ihCursor);
}
if (IsChar == 'B')
{
ihCursor = AfxGetApp()->LoadStandardCursor(IDC_IBEAM);
SetCursor(ihCursor);
}
if(IsChar == 'C')
{
ihCursor = AfxGetApp()->LoadStandardCursor(IDC_WAIT);
SetCursor(ihCursor);
}
if (IsChar == 'X')
{
ihCursor = AfxGetApp()->LoadStandardCursor(IDC_ARROW);
SetCursor(ihCursor);
OnOK();
{
CDialog::OnKeyDown(nChar, nRepCnt, nFlags);
{
}
I don't know anything about Visual C++ so your advise would be most helpful to get some insight to the problem.
