I am using Visual Studio 2008 Express Edition with Windows 7 64 bit edition.
I want to write a sub-routine to scroll text passed to the subroutine via a LPTSTR pointer parameter.
The subroutine prototype is:-
|
void ScrollText(HDC hdc,int x,int y, LPTSTR string);
|
The intention is to print the string text to the window specified in the HDC command at the x and y co-ordinates passed to the subroutine.
The actual calling code looks like this:-
|
ScrollText(hdc,100,670,L"This is a demonstration of how to scroll text");
|
In the subroutine,I want to re-access the text associated with the pointer so that I can manipulate it with the C++ equivalent of Visual Basic's LEFT$,MID$ and RIGHT$ commands to create the effect of scrolling by constantly moving the left character of the string to the opposite end of the string and then re-displaying it on screen in a loop.
Unfortunately, at present I cannot find a character type or method to use to access the LPTSTR pointer text passed in the calling code.
Can anyone help please? TIA.