🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.announce
1 messages
1 total messages Started by Tom Haapanen Wed, 27 Jan 1993 16:59
Windows Programmer FAQ: ASCII format, 01/04
#66
Author: Tom Haapanen
Date: Wed, 27 Jan 1993 16:59
1013 lines
44849 bytes
The following is part 01 of 04 of the ASCII text version of the
Microsoft Windows Programmer FAQ.  While some of you may find this the best
format, the more popular format is the WinHelp file.  These are posted
simultaneously with the ASCII version to comp.binaries.ms-windows.

You can obtain a copy of the WinHelp version as "faqprg01.zip" by ftp
from sonygate.sony.com [192.63.138.2], in /pub/comp.binaries.ms-windows.
It will also be placed on ftp.cica.indiana.edu once disk space permits.



BEGIN--------------cut here--------cut here------------cut here----------
                               Microsoft Windows
                                Programmer FAQ
                          Frequently Asked Questions

  
Copyright
  This document is compilation copyright (c) 1990-1993 by Tom Haapanen.  It
  may be freely copied and/or distributed in its entirety as long as this
  copyright notice is not removed.  It may not be sold for profit or
  incorporated into commercial products without the author's written
  permission.  [Compilation copyright means that you can freely use
  individual sections of this document, but any significant collection of
  sections is subject to the copyright.]
  
Note: This is an ASCII text version of the actual WinHelp-based FAQ.  The
      WinHelp version is posted to comp.binaries.ms-windows, and will also
      be available for ftp at ftp.cica.indiana.edu.


CONTENTS
========

1.  Credits

2.  Microsoft Windows
  2.1.  Windows 1.0
  2.2.  Windows 2.0
  2.3.  Windows/386
  2.4.  Windows 3.0
  2.5.  Windows 3.1
  2.6.  Windows for Workgroups 3.1
  2.7.  Windows NT 3.1
  2.8.  Win32s for Windows 3.1
  2.9.  Windows for Pen Computing 3.1
  2.10.  Multimedia Windows
  2.11.  Modular Windows
  2.12.  Win-OS/2

3.  Internet and Usenet
  3.1.  Usenet
  3.2.  Usenet Windows newsgroups
  3.3.  Alternatives to Usenet
  3.4.  Freeware and shareware by ftp
  3.5.  Popular Internet ftp sites
  3.6.  Using archie
  3.7.  Ftp by email
  3.8.  More about Internet and Usenet
  3.9.  FTP archives on CD-ROM

4.  Software Development Kits
  4.1.  Windows 3.1 SDK
  4.2.  Windows 3.1 DDK
  4.3.  Windows 3.0 SDK
  4.4.  Windows NT (Win32) Pre-Release PDK
  4.5.  Windows NT (Win32) Pre-Release DDK

5.  Windows SDK programming techniques
  5.1.  User interface and windows
    5.1.1.  Activating a window without bringing it to the top
    5.1.2.  Changing the icon on the fly
    5.1.3.  Changing the application's language
    5.1.4.  Changing the restored size of a maximized window
    5.1.5.  Creating an initially invisible MDI child window
    5.1.6.  Drag-and-drop: File Manager and Print Manager
    5.1.7.  Drag-and-drop: generalized client
    5.1.8.  Drag-and-drop: generalized server
    5.1.9.  Forcing a window to stay fixed size or iconic
    5.1.10.  Getting the handle of the active window
    5.1.11.  Keeeping a window on top
    5.1.12.  Limiting window size
    5.1.13.  Right-justifying menu items
    5.1.14.  Right-justifying menu items at runtime
    5.1.15.  Trapping mouse clicks on desktop
    5.1.16.  Using status bars with MDI
  5.2.  Dialogs
    5.2.1.  A dialog as an MDI child window [Borland OWL]
    5.2.2.  Adding controls to a non-dialog window
    5.2.3.  Doing a timeout in a dialog
    5.2.4.  Minimize button on modal dialog moves when clicked
    5.2.5.  Modifying common dialogs
    5.2.6.  Null dialog handles from Borland custom dialogs
    5.2.7.  Preventing switching away from a modal dialog
    5.2.8.  Using a dialog as your main window
    5.2.9.  Using Borland custom dialogs with other compilers
  5.3.  Controls
    5.3.1.  Allowing ENTER in a multiline edit control
    5.3.2.  Aligning multi-column listboxes
    5.3.3.  Changing button colors
    5.3.4.  Creating controls at runtime in Visual Basic
    5.3.5.  Combo boxes with tab stops
    5.3.6.  Custom button bitmaps in Borland dialogs
    5.3.7.  Drawing on a dialog background
    5.3.8.  Hiding dialog controls
    5.3.9.  Listboxes with large amounts of data
    5.3.10.  Subclassing standard controls
    5.3.11.  Using a window as a modal dialog
  5.4.  Memory
    5.4.1.  Using new() in C++
    5.4.2.  Global memory owned by DLL
    5.4.3.  Determining size of physical memory
  5.5.  GDI
    5.5.1.  Animation
    5.5.2.  Background color
    5.5.3.  Changing palette entries in 16-color mode
    5.5.4.  DIB bitmaps
    5.5.5.  Speeding up WM_PAINT redraws
    5.5.6.  Using CMY colors instead of RGB
    5.5.7.  Using only solid colors
  5.6.  Text and fonts
    5.6.1.  Creating new fonts
    5.6.2.  Rotating fonts
    5.6.3.  TrueType width calculation
  5.7.  Miscellaneous
    5.7.1.  Activating the previous instance
    5.7.2.  Changing your current directory
    5.7.3.  Detecting idle time
    5.7.4.  Enumarating active processes
    5.7.5.  Extracting icons from a .EXE or .DLL
    5.7.6.  Finding the location of the executable
    5.7.7.  Finding the number of instances running
    5.7.8.  Getting the instance handle
    5.7.9.  GettMultimedia RIFF file format
    5.7.10.  Restarting Windows
    5.7.11.  Rebooting the system
    5.7.12.  Using NetDDE
    5.7.13.  Waiting for completion of WinExec()
    5.7.14.  Wsprintf and sprintf

6.  Other development tools
  6.1.  Turbo Pascal for Windows
    6.1.1.  Using CTL3D.DLL with Turbo Pascal
  6.2.  Visual Basic
    6.2.1.  Allowing user interaction in tight loops
    6.2.2.  Animating the icon
    6.2.3.  Disabling automatic variables
    6.2.4.  Passing a structure back to Visual Basic from a DLL
    6.2.5.  Right mouse clicks on command buttons
    6.2.6.  Using Visual Basic strings in a DLL
    6.2.7.  Visual Basic and Fortran

7.  Interfacing to the outside world
  7.1.  Communicating with DOS applications
    7.1.1.  Determining whether a task is a DOS task
    7.1.2.  Passing commandline parameters to DOS applications
    7.1.3.  Passing a pointer to a DOS application or TSR
    7.1.4.  Starting a Windows application from a DOS session
  7.2.  Multimedia
    7.2.1.  MIDI file format
    7.2.2.  Playing sounds from Visual Basic
    7.2.3.  RIFF ( DIB, MIDI, RTF and WAV) file formats
    7.2.4.  Using an accurate timer

8.  Putting it all together
  8.1.  Compiling and linking
    8.1.1.  Emulator vs. alternate floating-point math
    8.1.2.  Emulator floating-point: corrupted code segments
    8.1.3.  Exporting CDECL functions
    8.1.4.  Large memory model: why or why not?
    8.1.5.  Using STRICT with windows.h
  8.2.  Debugging
    8.2.1.  Turbo Debugger video configuration
    8.2.2.  Turbo Debugger and Windows 3.1
    8.2.3.  Dr. Watson log files
    8.2.4.  Programmer's WorkBench and tab characters
  8.3.  Resources and resource tools
    8.3.1.  Borland C++ Windows tools and Windows 3.1
    8.3.2.  Building a DLL with Zortech C++
    8.3.3.  Extracting resources from an .EXE file
    8.3.4.  Linking fonts into a .FON file
    8.3.5.  Running out of resources in Visual Basic
    8.3.6.  Tracking down unfreed resources
  8.4.  Documentation and help
    8.4.1.  Adding bitmaps to helpfiles
    8.4.2.  Screen Snapshots

9.  A programmer's bibliography
  9.1.  Windows 3.1 SDK
  9.2.  Windows 3.0 SDK
  9.3.  Win32 (Windows NT) API
  9.4.  User interface guidelines
  9.5.  Microsoft Technical Notes
  9.6.  Third-party programming guides: general
  9.7.  Third-party programming guides: class libraries
  9.8.  Third-party programming guides: device drivers and internals
  9.9.  Third-party programming guides: macro languages
  9.10.  Magazines

  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


1.  CREDITS
===========
  The author may be contacted by the following means:
     
     Internet:   tomh@wes.on.ca
     UUCP:       uunet!watserv1!wes!tomh
     BITNET:     tomh@wes.on.ca
     CompuServe: >INTERNET: tomh@wes.on.ca
     
     Mail:       Tom Haapanen
                 Software Metrics Inc.
                 22 King St. S., suite 303
                 Waterloo, Ont.
                 N2J 1N8, Canada
  
  
  The Word for Windows 2.0 to Windows Help conversion utility used for
  creating and maintaining this document, Dr. Help,  was created by Roger
  Hadgraft, senior lecturer in Civil Engineering at Monash University,
  Clayton, Victoria, Australia.
          
     Internet:  roger.hadgraft@eng.monash.edu.au
     UUCP:      uunet!eng.monash.edu.au!roger.hadgraft
     CompuServe:    >INTERNET: roger.hadgraft@eng.monash.edu.au
  
  
  I would also like to express my gratitude to the countless people who have
  contributed information to the Windows FAQs, through Usenet news, email and
  personal conversations.  You know who you are: I'm grateful for your help,
  as this FAQ would not be what it is without your help.
  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


2.  MICROSOFT WINDOWS
=====================
  
---------------------------------------------------------------------------

2.1.  Windows 1.0
=================
  Microsoft first began development of the Interface Manager (subsequently
  renamed Microsoft Windows) in September 1981.  Although the first
  prototypes used Multiplan and Word-like menus at the bottom of the screen,
  the interface was changed in 1982 to use pull-down menus and dialogs, as
  used on the Xerox Star.
  
  Microsoft finally announced Windows in November 1983, with pressure from
  just-released VisiOn and impending TopView.  This was after the release of
  the Apple Lisa (but prior to the Macintosh), and before Digital Research
  announced GEM, another competing graphical environment.  Windows promised
  an easy-to-use graphical interface, device-independent graphics and
  multitasking support.  The development was delayed several times, however,
  and the first version hit the store shelves (after 55 programmer-years of
  development!) in November 1985.  The selection of applications was sparse,
  however, and Windows sales were modest,
  
  The following were the major features of Windows 1.0:
  * Graphical user interface with drop-down menus, tiled windows and mouse
     support
  * Device-independent screen and printer graphics
  * Co-operative multitasking of Windows applications
  
---------------------------------------------------------------------------

2.2.  Windows 2.0
=================
  Windows 2.0, introduced in the fall of 1987, provided significant
  useability improvements to Windows.  With the addition of icons and
  overlapping windows, Windows became a viable environment for development of
  major applications (such as Excel, Word for Windows, Corel Draw!, Ami, Page
  Maker and Micrografx Designer), and the sales were spurred by the runtime
  (Single Application Environment) versions supplied by the independent
  software vendors.  When Windows/386 (see next section) was released,
  Microsoft renamed Windows to Windows/286 for consistency.
  
  The following are the major changes from earlier versions of Windows:
  * Overlapping windows
  * PIF files for DOS applications
  
---------------------------------------------------------------------------

2.3.  Windows/386
=================
  In late 1987 Microsoft released Windows/386.  While it was functionally
  equivalent to its sibling, Windows/286, in running Windows applications, it
  provided the capability to run multiple DOS applications simultaneously in
  the extended memory.
  
  The following are the major changes from earlier versions of Windows:
  * Multiple DOS virtual machines with pre-emptive multitasking
  
---------------------------------------------------------------------------

2.4.  Windows 3.0
=================
  Microsoft Windows 3.0, released in May, 1990, was a complete overhaul of
  the Windows environment.  With the capability to address memory beyond 640K
  and a much more powerful user interface, independent software vendors
  started developing Windows applications with vigour.  The powerful new
  applications helped Microsoft sell more than 10 million copies of Windows,
  making it the best-selling graphical user interface in the history of
  computing.
  
  The following are the major changes from earlier versions of Windows:
  * Standard (286) mode, with large memory support
  * 386 Enhanced mode, with large memory and multiple pre-emptive DOS session
     support
  * No runtime versions available
  * Program Manager and File Manager added
  * Network support
  * Support for more than 16 colors
  * API support for combo boxes, hierarchical menus and private .ini files
  
---------------------------------------------------------------------------

2.5.  Windows 3.1
=================
  Microsoft Windows 3.1, released in April, 1992 provides significant
  improvements to Windows 3.0.  In its first two months on the market, it
  sold over 3 million copies, including upgrades from Windows 3.0.  It is
  currently continuing to sell at a rate of over 1 million copies per month.
  
  The following are the major changes from Windows 3.0:
  * No Real (8086) mode support
  * TrueType scalable font support
  * Multimedia capability
  * Object Linking and Embedding (OLE)
  * Application reboot capability
  * "Mouse Trails" for easier mouse use with LCD display devices
  * Better inter-application protection and better error diagnostics
  * API multimedia and networking support
  * Source-level API compatability with Windows NT
  
---------------------------------------------------------------------------

2.6.  Windows for Workgroups 3.1
================================
  The Windows for Workgroup package is the first integrated Windows and
  networking package offered by Microsoft.  It provides peer-to-peer file and
  printer sharing capabilities (on a level comparable to LANtastic or Netware
  Lite) highly integrated into the Windows environment.  The simple-to-use-
  and-install networking allows the user to specify which files on the user's
  machine should be made accessible to others.  The files can then be
  accessed from other machines running either Windows or DOS.
  
  Windows for Workgroups also includes two additional applications: Microsoft
  Mail, a network mail package, and Schedule+, a workgroup scheduler.
  
---------------------------------------------------------------------------

2.7.  Windows NT 3.1
====================
  Microsoft Windows NT, scheduled for release in the first half of 1993, is
  Microsoft's platform of choice for high-end systems.  It is intended for
  use in network servers, workstations and software development machines; it
  will not replace Windows for DOS.  While Windows NT's user interface is
  very similar to that of Windows 3.1, it is based on an entirely new
  operating system kernel.
  
  The following are the major changes from Windows 3.1:
  * Based on a new microkernel design
  * Portable architecture for Intel x86, MIPS R4000 and DEC Alpha processors
  * 32-bit addressing for access to up to 4 GB of memory
  * Fully protected applications with virtualized hardware access
  * Installable APIs for Win32, Win16, MS-DOS, POSIX and OS/2
  * Installable file systems, including FAT, HPFS and NTFS
  * Built-in networking (LAN Manager and TCP/IP) with remote procedure calls
     (RPCs)
  * Symmetric multiprocessor support
  * Security designed in from start, to be initially C2 certified, with a B-
     level kernel design
  * API support for unsynchronized message queues, advanced interprocess
     communication, registration databases, Bezier curves and graphics
     transformations.
  
  Although Windows NT has not yet been released, the following is generally
  accepted as the minimum platform for use with the retail release of Windows
  NT:
  * 33 MHz 386 processor
  * 8 MB memory
  * 100 MB hard disk
  * VGA graphics
  
  As of July 1992, Windows NT is available as a pre-release SDK (Software
  Development Kit) from Microsoft at the cost of $69 (or $399 for the pre-
  release SDK plus full printed documentation).  This release is supplied on
  CD-ROM only, and contains the Windows NT operating system as well as all
  the necessary 32-bit development tools (including a 32-bit C++ compiler and
  all documentation online on the CD-ROM).  The purchasers of this SDK will
  also receive free updates to Windows NT up to and including final release.
  
  The pre-release Windows NT SDK requires 12 MB of RAM and is not suitable
  for evaluating the Windows NT environment.  It is intended strictly for
  software development!  Contact your national Microsoft subsidiary (or
  Microsoft itself in Redmond, WA) for ordering information.
  
---------------------------------------------------------------------------

2.8.  Win32s for Windows 3.1
============================
  Win32s is a set of libraries for Windows 3.1, which enable users to run
  most Windows NT 32-bit applications on Windows 3.1, without the extensive
  hardware requirements of Windows NT.  The Win32s interface will likely
  replace the older Windows-32 interface used by current 32-bit Windows
  applications such as Mathematica.
  
  The Win32s development tools are currently in beta release, but Microsoft
  has not announced minimum system requirements for using Win32s
  applications.
  
---------------------------------------------------------------------------

2.9.  Windows for Pen Computing 3.1
===================================
  Microsoft developed Windows for Pen Computing for use on pen-based systems.
  In most aspects, it is basically equivalent to Windows 3.1 with extensions
  for pen support.  These extensions include the useof a pen as a pointing
  device as well as handwriting recognition and conversion.  Pen Windows
  first shipped in April, 1992.
  
---------------------------------------------------------------------------

2.10.  Multimedia Windows
=========================
  The term Multimedia Windows describes a package with Windows 3.0 and the
  Multimedia Extensions.  These extensions are included in Windows 3.1, and
  thus Multimedia Windows is no longer sold as a separate product.
  
---------------------------------------------------------------------------

2.11.  Modular Windows
======================
  Modular Windows is the operating system for Tandy Corp.'s Video Information
  System (VIS) multimedia player.  It is essentially similar to Windows'
  core, but without any desktop accessories, TrueType fonts or a number of
  other features.
  
---------------------------------------------------------------------------

2.12.  Win-OS/2
===============
  Win-OS/2 is the Windows component of IBM's OS/2 2.0.  It is based partially
  on Windows 3.0 and partially on 3.1.  While it runs a majority of the
  commercial Windows applications, it is not covered by this document.
  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


3.  INTERNET AND USENET
=======================
  
---------------------------------------------------------------------------

3.1.  Usenet
============
  If you received this FAQ from somewhere other than Usenet or Internet, you
  may not be familiar with Usenet.  Basically, Usenet is a loose collection
  of over 100,000 computers which exchange mail and news.  The network is
  unstructured and highly distributed; most communication is either by TCP/IP
  over high-speed connections, or UUCP over public telephone lines.  Internet
  is a (almost proper) subset of Usenet, consisting of somewhere  between
  50,000 and 100,000 computers connected by high-speed TCP/IP network
  connections.
  
  Usenet news is a software system where a person can post an article to a
  selected newsgroup, and have every other news reader be able to read it.
  There are over 1000 newsgroups (including the alt groups), and daily volume
  of news is approaching 40 MB.
  
  While most Usenet systems are Unix-based, it is not a requirement.  If you
  have an Internet or UUCP connection, ask your system administrator whether
  you have Usenet news available.  Some of the most common newsreading
  software packages are readnews, rn, trn, nn and notes.
  
---------------------------------------------------------------------------

3.2.  Usenet Windows newsgroups
===============================
  There are a total of eight Usenet newsgroups dealing with Microsoft
  Windows:
  
  * comp.os.ms-windows.advocacy
     This group is intended for adversarial discussions, arguments and
     comparisons to other computers and operating systems.
  * comp.os.ms-windows.announce
     This is a low-volume moderated group with only Windows-related
     announcements and with no discussion.   Moderated by Todd Derr
     (infidel@pitt.edu).
  * comp.os.ms-windows.apps
     This group contains discussions, questions, and comments about the
     selection and use of Windows applications.
  * comp.os.ms-windows.setup
     This group is meant for questions and discussions about Windows setup
     process, driver availability and selection, and hardware compatability
     and selection.
  * comp.os.ms-windows.misc
     All other discussions about Windows should be in this group.
  * comp.os.ms-windows.programmer.tools
     This group is intended for discussions about the selection and use of
     tools for Windows software development.
  * comp.os.ms-windows.programmer.win32
     All discussions about the Win32 applications programming interface (used
     in Windows NT and Win32s) and the Windows NT SDK belong in this group..
  * comp.os.ms-windows.programmer.misc
     This group is for all other discussions about Windows software
     development.
  * comp.binaries.ms-windows
     This group is for postings of free and shareware Windows applications,
     utilities, display and printer drivers -- and for the latest FAQs.
     Moderated by Tin Le (tin@something.sony.com).
  
  The following groups have been replaced by those shown above:
  * comp.windows.ms
     This group was for discussions about Microsoft Windows.
  * comp.windows.ms.programmer
     This group was for discussions about programming for Microsoft Windows.
  
  The following groups may also be of interest:
  * comp.os.msdos.programmer
     This groups contains general MS-DOS programming questions.  Some,
     especially those concerning compiler selection, may be of interest to
     Windows programmers.
  * bit.listserv.win3-l
     This group is a two-way gateway of the BITNET WIN3-L mailing list.
  
  The following groups are not for Microsoft Windows!
  * comp.windows.misc
     This group is for miscellaneous discussions about windowing systems in
     general.
  * comp.windows.news
     This group is for dicussions about the Sun Microsystems NeWS windowing
     system.
  
  In general, these newsgroups are only available to computers connected to
  Usenet or Internet; they are not gatewayed into BITNET, CompuServe, Prodigy
  or other services. Some FidoNet BBS systems, however, do carry selected
  Usenet newsgroups.
  
---------------------------------------------------------------------------

3.3.  Alternatives to Usenet
============================
  If you are unable to find a connection to the Internet (that procedure can
  not be easily defined, as the Internet does not have any sort of a formal
  structure), there are several alternatives available for finding more
  information about Windows, and for locating Windows software and drivers.
  
  BITNET users (as well as any other with an electronic mail connection to
  Internet) can subscribe to WIN3-L (win3-l@uicvm.bitnet), a mailing list
  dedicated to Windows discussions.  This mailing list is similar in content
  to the comp.os.ms-windows.misc newsgroup; no programmer mailing list exists
  on BITNET.
  
  If you live in North AMerica (or in one of selected Western European
  countries), you can subscribe to CompuServe, a commercial service.
  CompuServe has extensive Windows-oriented discussions and a fairly good
  selection of free software.  Although the level of discussion is often less
  technical, it is much more structured than the Internet.  CompuServe also
  has numerous vendor-supported forums, including ones organized by Microsoft
  for Windows and Windows NT.
  
  Many FidoNet-based BBS systems also carry the Internet Windows newsgroups.
  Consult a local BBS listing to find your nearest FidoNet BBS.
  
---------------------------------------------------------------------------

3.4.  Freeware and shareware by ftp
===================================
  While CompuServe (which has a lot of software) and your local BBS may have
  large selections, the Internet provides an immense resource for all PC
  users.  The key program to access this software is called ftp (File
  Transfer Protocol), and it's useable from most Internet system, but is not
  usable through UUCP links.
  
  If you do have ftp available to you, follow the example below to connect to
  ftp.cica.indiana.edu (do not type in the // comments):
  
     $ ftp ftp.cica.indiana.edu    // make connection
     Connected to ...              // cica responds
     Userid (user@cica): ftp       // enter "ftp" as userid
     Password: real_userid@site    // enter your own userid
     ftp> tenex                    // for binary transfers
     ftp> cd /pub/pc/win3          // where the goodies are
     ftp> ls -l                    // list the directory
     ftp> get ls-ltR               // get the current index
     ftp> quit                     // we're done!
     $ _
    
  Of course, you can get multiple files at a time -- read the ftp manual page
  for more information.
  
  Remember that shareware is not free: register the software you use to
  encourage the development of more low-cost software.
  
---------------------------------------------------------------------------

3.5.  Popular Internet ftp sites
================================
  The following ftp sites provide significant amounts of software of interest
  to Windows users:
  * ftp.cica.indiana.edu (129.79.20.84)
     Directory /pub/pc/win3  contains one of the largest selections of Windows
     software and device drivers anywhere.  Mirrored by wuarchive.  Please do
     not access ftp.cica.indiana.edu between 8am and 6pm EST to prevent
     overloading the system.
  * simtel10.army.mil (26.2.0.74)
     Directories /msdos1, /msdos2 and /msdos3  contains a very large selection
     of MS-DOS (and some Windows) software.  Mirrored by wuarchive.
  * wuarchive.wustl.edu (128.242.135.4)
     Directory /mirrors/win3 contains a copy of the cica Windows archives, and
     directory /mirrors/msdos contains a copy of the simtel10 MS-DOS archive.
  * ftp.uu.net (137.39.1.9)
     Directory /vendors/microsoft contains a lot of the Microsoft developer
     support materials available on CompuServe, including tech notes, sample
     sources, the ODBC SDK and WinHelp documentation for Windows and Win32
     SDKs.
  * garbo.uwasa.fi (128.214.12.3)
     Directories /win3 and /win31 contain a majority of the cica Windows
     archives, and a fair amount f non-cica material.  Note that garbo.uwasa.
     fi is located in Finland, and North American users should avoid
     congesting transatlantic Internet links by ftping from this site.
     Mirrored by wuarchive.
    
    If your ftp program complains about an unknown site, you can substitute
    the numeric Internet address (shown after each site name above) for the
    name in the ftp command.
  
---------------------------------------------------------------------------

3.6.  Using archie
==================
  If you know the program you're looking for, but don't know where to find
  it, you might try using a utility called archie.  This program allows you
  to search for a filename in all the available ftp sites.
  
  There are numerous archie servers available; to use one of them, telnet to
  the system, and sign on as archie.  Follow instructions to search for a
  file.  The following lists some of the know archie servers currently
  available for use; pick one in your geographical area:
     
     * archie.rutgers.edu     United States (Northeast)
     * archie.sura.net   United States (Southeast)
     * archie.unl.edu    United States (West)
     
     * archie.mcgill.ca  Canada
     * archie.au         Australia and New Zealand
     * archie.funet.fi   Europe
     * archie.doc.ic.ac.uk    United Kingdom
  
---------------------------------------------------------------------------

3.7.  Ftp by email
==================
  There are several sites that will perform general FTP retrievals for you in
  response to a similar mail query, although it appears that the info-
  server@cs.net server is permanently out of order.
  
  In general, please be considerate, and don't over-use these services.  If
  people start using them to retrieve megabytes and megabytes of GIF or WAV
  files, they will probably disappear.  Also, keep in mind that your system
  may be linked to the net using a long-distance UUCP connection, and your
  sysadmin may not be happy about large mail files using up modem time and
  filling overloaded spool directories.
  
     * bitftp@pucc.bitnet
     For information on this one (available only to BITNET sites) send it the
     message:
       help
  
     * ftpmail@decwrl.dec.com
     For information on this server, available to all Internet sites, send it
     a mail message with a body containing simply:
       help
  
     * mailserv@garbo.uwasa.fi
     One final choice is to use the garbo.uwasa.fi server, which lets you
     access the garbo.uwasa.fi archive (which contains most of the cica
     files).  For instructions, send it a mail message with "Subject: garbo-
     request" and a single line of text "send help" to
       send help
     Please do not use this service if you are located in North America!
  
---------------------------------------------------------------------------

3.8.  More about Internet and Usenet
====================================
  To learn more about Internet and Usenet, I strongly recommend you purchase
  or borrow a copy of Ed Krol's The Whole Internet User's Guide and Catalog
  (ISBN 1-56592-025-2, $24.95), which covers email, news, ftp, archie and
  much more.  This 400-page handbook is a thorough guide to getting around on
  the Net, clear enough for neophytes but with new information even for true
  Internet veterans.
  
  To purchase The Whole Internet User's Guide and Catalog, check your local
  bookstore or contact the publisher, O'Reilly and Associates at 1-800-998-
  9938 (103 Morris St., Sebastopol, CA 95472).
  
---------------------------------------------------------------------------

3.9.  FTP archives on CD-ROM
============================
  Walnut Creek offers copies of the cica, wuarchive and simtel  FTP archives
  on CD-ROM, at prices ranging from $25 to $50, with annual subscriptions
  available.  Call (800) 786-9907 or (510) 947-5996 for more information.
  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


4.  SOFTWARE DEVELOPMENT KITS
=============================
  
---------------------------------------------------------------------------

4.1.  Windows 3.1 SDK
=====================
  The primary Windows development tool you need to do development is the
  Windows 3.1 Software Development Kit (SDK).  It includes the libraries,
  header files, resource tools, documentation and the Windows debug kernel
  you need to create native Windows applications.
  
  Before you rush out to buy the SDK, though, note the following points:
     * A number of integrated development tools (such as Actor, Visual Basic
       and Turbo Pascal for Windows) do not require the SDK to operate.  See
       the Microsoft Windows Development Tools FAQ for details on which tools
       do not require the SDK.
     
     * A number of compilers (such as Microsoft C/C++ 7.0, Borland C++ 3.0 and
       Zortech C++ 3.0) include the SDK to operate.  See the Microsoft
       Windows Development Tools FAQ for details on the extent of the
       libraries, documentation and resource tools included with various
       compilers..
  
  The SDK includes the tools you need to create pen-based and multimedia
  applications, and it also allows you to create applications to run on
  Windows 3.0.
  
  The list price of the Windows 3.1 SDK is $349.
  
---------------------------------------------------------------------------

4.2.  Windows 3.1 DDK
=====================
  In order to develop device drivers or VxDs for Windows 3.x, you need to
  purchase the Windows 3.1 Device Driver Kit (DDK).  It includes the
  necessary header files, libraries, documentation and sample source code to
  create new device drivers.
  
  The list price of the Windows 3.1 DDK is $495.
  
---------------------------------------------------------------------------

4.3.  Windows 3.0 SDK
=====================
  The older version of the SDK, 3.0, is still quite useable with Windows 3.1,
  although it includes older versions of the resource tools, Windows 3.0
  debug kernel and is not capable of creating applications which take
  advantage of the new Windows 3.1 features.
  
---------------------------------------------------------------------------

4.4.  Windows NT (Win32) Pre-Release PDK
========================================
  The latest membner of the Windows SDK family is the Win32 pre-release
  Professional Development Kit (PDK).  As of July 1992, it is available from
  Microsoft at the cost of $69 (or $399 for the pre-release PDK plus full
  printed documentation).
  
  Thie pre-release PDK is supplied on CD-ROM only, and contains the Windows
  NT operating system as well as all the necessary 32-bit development tools
  (including a 32-bit C++ compiler).  The base package includes all the
  documentation online on the CD-ROM in PostScript format, while the full
  package includes printed manuals as well.  The purchasers of this PDK will
  also receive free updates to Windows NT up to and including final release.
  
---------------------------------------------------------------------------

4.5.  Windows NT (Win32) Pre-Release DDK
========================================
  The Windows NT Device Driver Kit (DDK) will be available from Microsoft in
  late September for $495.  It will include full printed documentation, and
  be available on CD-ROM only.  No base CD-ROM version (without printed
  documentation) is currently planned.
  
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


5.  WINDOWS SDK PROGRAMMING TECHNIQUES
======================================
  
---------------------------------------------------------------------------

5.1.  User interface and windows
================================
  
...........................................................................

5.1.1.  Activating a window without bringing it to the top
----------------------------------------------------------
  In Windows 3.1 and Windows NT, it is possible to activate a window without
  making it the topmost one (i.e. without changing the existing window Z
  order).  To do this, make the following function call:
       SetWindowPos(hWnd, NULL, 0, 0, 0, 0,
                    SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
  
...........................................................................

5.1.2.  Changing the icon on the fly
------------------------------------
  If you want to change the icon of an application while it is minimized, you
  need to call:
       SetClassWord(hWnd, GCW_HICON, hIcon);
       RedrawWindow(hWnd, NULL, NULL, RDW_FRAME | RDW_ERASE |
                    RDW_INVALIDATE);
  This call with these flags invalidates a window's non-client area, with the
  RDW_ERASE forcing a WM_ERASEBKGND.
  
...........................................................................

5.1.3.  Changing the application's language
-------------------------------------------
  Windows is designed to make it easy for the developer to maintain multiple
  national language versions of an application.  The general technique
  involves modifying only the resource file (with menus, dialogs, strings and
  accelerators) for each national edition, and leaving the source code alone.
  For example, to change the message strings to the correct national
  language, you'd have multiple .rc files, one for each language, such as
  this:
  
      rc.h
          #define IDS_NOTFOUND     8000
          #define IDS_REPLACEFILE  8001
          ...
  
      english.rc
          STRINGTABLE
          BEGIN
              IDS_NOTFOUND,       "File not found"
              IDS_REPLACEFILE,    "Replace existing file '%s'?"
              ...
          END
  
      finnish.rc
          STRINGTABLE
          BEGIN
              IDS_NOTFOUND,       "Tiedostoa ei lydy"
              IDS_REPLACEFILE,    "Korvaa tiedosto '%s' uudella?"
              ...
          END
  
      error.c
          DisplayError(WORD wCode)
          {
              char szMsg[256];
  
              LoadString(hInst, wCode, szMsg, 256);
              MessageBox( ..... );
          }
  
  
  For each national language version, you would use rc to compile the
  resources, and then build them into the executable.
  
  If you need to be able to switch languages on the fly, you have several
  options.  First, you can use multiple DLLs, each one containing a
  particular language's resources.  As an alternative, if the number of
  languages you need to support is fairly limited, you can include all the
  languages you need to support.  In this example, you would have something
  like:
  
      rc.h
          #define IDL_ENGLISH         0
          #define IDL_FINNISH        100
          #define IDL_SWEDISH        200
          ...
  
          #define IDS_NOTFOUND       8000
          #define IDS_REPLACEFILE    8001
          ...
          #define IDS_E_NOTFOUND     (IDS_NOTFOUND    + IDL_ENGLISH)
          #define IDS_E_REPLACEFILE  (IDS_REPLACEFILE + IDL_ENGLISH)
          ...
          #define IDS_F_NOTFOUND     (IDS_NOTFOUND    + IDL_FINNISH)
          #define IDS_F_REPLACEFILE  (IDS_REPLACEFILE + IDL_FINNISH)
          ...
  
      national.rc
          #include <english.rc>
          #include <finnish.rc>
          ...
  
      english.rc
          STRINGTABLE
          BEGIN
              IDS_E_NOTFOUND,       "File not found"
              IDS_E_REPLACEFILE,    "Replace existing file '%s'?"
              ...
          END
  
      finnish.rc
          STRINGTABLE
          BEGIN
              IDS_F_NOTFOUND,       "Tiedostoa ei lydy"
              IDS_F_REPLACEFILE,    "Korvaa tiedosto '%s' uudella?"
              ...
          END
  
      error.c
          DisplayError(WORD wCode)
          {
              char szMsg[256];
              extern WORD wLanguage;
  
              LoadString(hInst, wCode + wLanguage, szMsg, 256);
              MessageBox( ..... );
          }
  
  
...........................................................................

5.1.4.  Changing the restored size of a maximized window
--------------------------------------------------------
  If your application's window is maximized, and you want it to be set to a
  size other than what it was (before maximizing) when the user hits the
  "restore" button, you will need to process the WM_WINDOWPOSCHANGING message
  in your window procedure.  This will allow you to set the size and position
  of the restored window to anything you need.
  
...........................................................................

5.1.5.  Creating an initially invisible MDI child window
--------------------------------------------------------
  Before creating the child window,
       SendMessage( hClientWindow, WM_SETREDRAW, 0, 0L);
  Then, in your child window WM_CREATE processing,
       ShowWindow( hChildWindow, SW_HIDE).
       SendMessage( hClientWindow, WM_SETREDRAW, 1, 0L);
  
...........................................................................

5.1.6.  Drag-and-drop: File Manager and Print Manager
-----------------------------------------------------
  You will need to register your application in the registration database.
  You can do this either using the Registration Editor, or the Reg* API in
  Windows 3.1 SDK.  One of the simplest mechanisms is that used by several
  Windows 3.1 applets -- to print a file the parameters are
       /p filename
  See the registration database for examples.
  
...........................................................................

5.1.7.  Drag-and-drop: generalized client
-----------------------------------------
  To do generalized drag-and-drop, you'll need shell.dll, shipped with
  Windows 3.1.
  * Either do DragAccept() or create the window as WS_EX_DROPFILES (0x10L)
  * Wait for the WM_DROPFILES message (0x0233), which passes a handle to
     something in wParam
  * You can then issue
       WORD DragQueryFile(hDrop, 0xffff, NULL, 0)
      to get the file count, and then
       WORD DragQueryFile(HANDLE hDrop, WORD nFile, LPSTR sDest, WORD max)
      for each of the dropped files
  * Once you have finished, call
       DragFinish( hDrop )
  
  For Visual Basic, get the file dd.zip from CompuServe's MBASIC forum, which
  lets you implement drag-and-drop from VB.  This file may also be available
  at ftp.uu.net and  ftp.cica.indiana.edu.
  
...........................................................................

5.1.8.  Drag-and-drop: generalized server
-----------------------------------------
  To act as a drag-and-drop server (meaning that the user can drag files from
  your application to a drag-and-drop client application), you will need to
  follow the following steps:
  * Capture the mouse
  * On mouse movement, get the client window with WindowFromPoint(), and test
     it for WS_EX_ACCEPTFILES style to determine whether to allow dropping
  * Construct a file structure in memory allocated with GMEM_DDESHARE as
     follows:
     typedef struct tagDRAGHEADER {
       UINT wStructSize;      // Size of the structure (8 bytes)
       UINT x;                // x-coordinate in window's client hDC
       UINT x;                // y-coordinate in window's client hDC
       BOOL fInClient;        // TRUE if on window's client area
     } DRAGHEADER;
      followed by a list of filenames separated by nulls, and terminated by a
     double null.
  * Post a WM_DROPFILES message to the client window with the above structure
     as a parameter.
  
  
...........................................................................

5.1.9.  Forcing a window to stay fixed size or iconic
-----------------------------------------------------
  In order to make your app stay as an icon, you must process the
  WM_QUERYOPEN message.  If you always return 0 for this message, you
  indicate that the icon can not be opened into a ordinary window.
  
  To retain a fixed size, you must process the WM_GETMINMAXINFO message. When
  you get it, modify the info pointed to by lParam:
       LPPOINT lpSize = (LPPOINT)lParam;
       lpSize[3].x = lpSize[4].x = theRightWidth;
       lpSize[3].y = lpSize[4].y = theRightHeight;
  If you don't want the window to be maximized or iconized, create it with
  the ~WS_MAXIMIZEBOX and/or ~WS_MINIMIZEBOX styles, and disable those items
END--cut here--cut here
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads