Hi Justin,
What you are after is:
SetCtrlAttribute(..., ..., ATTR_FIRST_VISIBLE_LINE, 0);
Now, if you want the cursor to actually appear at the beginning of the first line, you run into a little glitch which may in fact be a CVI bug. You can use ...ATTR_TEXT_SELECTION_START, 0) to position the caret at the beginning of the text, but it doesn't work as you would expect it to when in coordination with ATTR_FIRST_VISIBLE_LINE. If you just use ATTR_TEXT_SELECTION_START, the caret will move but the box won't scroll up. If you use just ATTR_FIRST_VISIBLE_LINE, the box will scroll up but the caret will remain at the end of the text. I wasn't able to get the scroll and the caret to both go together like I think it should.
Does anyone out there know some other way to move the caret properly, or is this really a bug?
Good luck,
Orlan