🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #1961

Edit control scrollbar query

#1961
From: John Ciccarelli Plexus Software ...
Date: Tue, 07 Nov 1989 00:06
35 lines
1628 bytes
[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
Technical Details
Message-ID: <2094@plx.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sun-barr!newstop!sun!plx!John

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sun-barr!newstop!sun!plx!John
From: John Ciccarelli, Plexus Software, Santa Clara CA
Newsgroups: comp.windows.ms
Subject: Edit control scrollbar query
Keywords: edit, scroll, notepad
Message-ID: <2094@plx.UUCP>
Date: 7 Nov 89 00:06:35 GMT
Sender: johnc@plx.UUCP
Reply-To: johnc@plx.uucp (...sun!plx!johnc)
Lines: 35