Serious problems using 'DrawText'...

Seems 'DrawText' is looking for a type of variable that doesn't exist. I have spent the last four hours reading through help files trying to figure this out and I can only conclude that one of my header files may be messed up.

case WM_PAINT:
{
PAINTSTRUCT ps;
HDC pDC = BeginPaint(cbWnd, &ps);
RECT paintrect;
GetClientRect(pDC, &paintrect);
DrawText(pDC, buffer, strlen(buffer), paintrect, DT_EDITCONTROL | DT_NOPREFIX);
...
}

Now when I compile, I get this error message:

"Cannot convert tagRECT to tagRECT *"

There is no such variable/structure listed in ANY of my help files, so I am lost if there is such a thing. How can I get around or solve this problem? I need to use 'DrawText' in both printing operations and window operations, but until I can create or find this variable/structure type, I have to stop all work on my project. Thanks for any help I get in advance.

-Seph


Comments

  • My help files didn't tell me that 'DrawText' required a pointer to the rectangle, so I was just using the rectangle variable. I just tried it on a whim and it works fine. I think I need my head examined; too much time programming and not enough real life, lol!

    -Seph


  • : My help files didn't tell me that 'DrawText' required a pointer to the rectangle, so I was just using the rectangle variable. I just tried it on a whim and it works fine. I think I need my head examined; too much time programming and not enough real life, lol!
    :
    : -Seph
    :

    When you see * in C or C++, then it's bound to signify a pointer :-)


  • That's just it, there's no '*' in the help file, lol! I have found several things in my help files that were wrong, such as "Zeromemory" instead of "ZeroMemory". I think Borland contracted to do them...


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories