[comp.windows.ms] Edit control scrollbar query

John Ciccarelli, Plexus Software, Santa Clara CA (11/07/89)

[To Microsoft: This query was also sent via Microsoft Online]

1. SITUATION

I want to implement a "file browser" control in a dialog box,
based on the EDIT control class.

Unlike NOTEPAD, I want to be able to browse arbitrarily large
files, not just what will fit in (local) memory.  I intend to copy
text from disk into the control's memory buffer in response to the
EN_VSCROLL notification.

However, I anticipate a problem in that the edit control
scrollbar's thumb position indicates the position of the
visible text RELATIVE TO THE MEMORY BUFFER, whereas I will
want it to indicate the position RELATIVE TO THE START AND
END OF THE FILE.

I have looked through the EM_xxx and EN_xxx messages already.

2. QUESTIONS

a) How can I control the EDIT control's scrollbar thumb position
   independently of the top visible line's position in the memory
   buffer?

b) Can I get the HWND of the built-in scrollbar?  If so, will it
   do me any good?

c) If I subclass this EDIT, will I see WM_NCPAINT (or any other
   useful message) when the built-in scrollbar is about to be
   repainted?  If so, can I do anything useful at that point?

Please advise,
/John Ciccarelli