I have a quick general question, that I admit i havent put much time into researching (im currently at work).

Anyways, Whe you call "GetWindowText" on an edit box, the API wants a buffer address and the size of the buffer...

My question is what is the message, or API, to determine the size of the text in the edit window before you call "GetWindowText".

This is so you can appropriately generate a buffer with a size that will accomodate what ever is in the edit window....

Im sure this is a trivial thing, I just dont have my resources with me at work...

Thanks
:alright:
NaN
Posted on 2003-08-28 11:59:43 by NaN
You almost got it right in the subject line :) Use GetWindowTextLength


The GetWindowTextLength function retrieves the length, in characters, of the specified window's title bar text (if the window has a title bar). If the specified window is a control, the function retrieves the length of the text within the control.

int GetWindowTextLength(

HWND hWnd // handle of window or control with text
);
Posted on 2003-08-28 12:15:28 by Delight
Perfect ;)

Thanks!
Posted on 2003-08-28 15:52:31 by NaN