TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Todd Weis
from: Jonathan de Boyne Pollard
date: 1997-03-07 12:09:59
subject: Insert Vs overtype mode

TW> Is it possible to switch the PM to overtype mode versus insert mode?

Get out your trusty PM Guide and Reference and search for "insert mode".  

You can switch the insert mode of PM as a whole using WinSetSysValue, or
you can force it for individual entry fields by sending them
EN_SETINSERTMODE whenever they send you a focus change notification
message.

 TW> We have some applications that default all currency fields to 0.00 and
 TW> when you tab to that field you are in insert mode.  It is a pain to
 TW> delete the entry field before typing in the new value.  I have
 TW> noticed that the WinXX operating systems default to Overtype mode and
 TW> OS/2 defaults to insert mode.  Any utilities out there that can
 TW> change that?  If not, any ideas on how one could go about writing
 TW> one?

If you are _not_ maintaining these applications, then the simplest approach
is to press the insert key.  I believe that regular entry fields assume the
insert mode of PM (they call WinQuerySysValue) when given the focus.  So if
you switch to insert mode by pressing the insert key, you effectively
change the insert mode for all entry fields.

I, personally, would be very upset by an application that switched the
whole system from insert to overtype whenever I ran it.  So if you do set
insert mode when these entry fields are given the focus, make sure that you
save the old insert state and restore it whenever they lose the focus.

 ¯ JdeBP ®

--- FleetStreet 1.16 NR
* Origin: JdeBP's point, using Squish (2:440/4.3)
SEEN-BY: 50/99 54/99 270/101 620/243 625/160 711/401 413 430 934 712/311 407
SEEN-BY: 712/505 506 517 623 624 704 713/317 800/1
@PATH: 440/4 141/209 270/101 712/624 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.