HDTenEightyP/NetNews huggingface dataset:
From: magmy@modeld.no (Magne Myrtveit)
Subject: Math error handling
Reply-To: magmy@modeld.no
Posting-Front-End: Winix Conference v 91.06.07.01 (running under MS-Windows)
Date: Mon, 17 Aug 92 22:08:33 +0000

BACKGROUND
-----------------------------------------------------------------
I want to handle math errors in my program (the program computes
values based on user input, and is supposed not to abort whenever
a user enters illegal inputs).

I have experimented with the following functions for handling
math errors:

	_matherr(...)
	signal(...)
	_fpreset()
	errno
	_control87(...)
	_status87()
	_clear87()

In a C program compiled for DOS things works OK, but when
compiled using C++ and the MFC library, i do not get the
_status87() and _clear87() functions to return the expected result.

TEST PROGRAM
-----------------------------------------------------------------
Fragments of my test program looks like this:

   ...
   #include <math.h>
   #include <float.h>

   main() {

   // Set IEEE control register

      _control87(
        _EM_INVALID |
        _EM_DENORMAL |
        _EM_ZERODIVIDE |
        _EM_OVERFLOW |
        _EM_UNDERFLOW |
        _EM_INEXACT, _MCW_EM);

   // Perform divide by zero

      double A;
      double B = 0.0;
      int S;

      A = 10.0 / B;

      S = _clear87();

   // The value of 'S' is zero at this point

   }  // main

ALTERNATIVE SOLUTION
-----------------------------------------------------------------
I have solved the problem temporarily by catching error exceptions
using 'signal'. All ths same I'd like to have the explanation of why
the above code does not work.

Sincerely,
Magne Myrtveit
Newsgroups: comp.os.ms-windows.programmer.misc
From: bruhn@exaib.wu-wien.ac.at ( Peter Bruhn )
Subject: Landscape - Portrait, how can I switch?
Organization: Vienna University of Economics and Business Administration
Date: Sun, 16 Aug 1992 12:28:27 GMT

I am writing a program in dbFast (that is a sort of Dbase or Clipper
for Windows). My problem is how to change the Print-Manager from
landscape to portrait and vice versa. There is no support for this
in dbFast. So I would like to use a DLL doing this job (Dbfast is
able to use DLLs). Does anybody know if there already exists such a
DLL. If not could you please give me some hints how to write it.

Thanks a lot

Peter
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
From: stevesi@microsoft.com (Steven Sinofsky)
Subject: Re: MFC and Custom Controls / WM_NCPAINT
Date: 20 Aug 92 20:21:09 GMT
Organization: Microsoft Corporation
Keywords: Windows Development, Microsoft C/C++

In article <8304@ncratl.AtlantaGA.NCR.COM> kso@ncratl.AtlantaGA.NCR.COM (Khun So) writes:
>
>
>    I have a couple of questions on Windows developement using C/C++ 7.0.
>    Any insights on the subjects will be greatly appreciated.
>
>
>        1. How does one extend MFC to support custom controls
>           and other window classes?  Specifically I would like
>           to derive a class from CWnd for the custom controls
>           I had developed.  Many of my controls use extra bytes
>           per window instance (cbWndExtra!=0 in WNDCLASS data
>           structure).  The current AfxRegisterWndClass always
>           sets cbWndExtra=cbClsExtra=0.  Is there a simple way
>           to do this without modifying MFC source?
Let's say you have a Window class called "MYCLASS", then all you
need to do to have a C++ class is the following:

class CMyClass : public CWnd
{
public:
	BOOL Create(LPCSTR lpszWindowName, DWORD dwExtraStyles, 
			const RECT& rect, CWnd* pParentWnd)
		{
			static char BASED_CODE szMyClass[] = "MYCLASS";
			return CWnd::Create(szMyClass, lpszWindowName,
				dwStyles, rect, pParentWnd);
		}

	// add additional member functions to support custome WM_
	// SendMessages here


	DECLARE_MESSAGE_MAP() // use this to handle messages as
				// you would expect
};

You don't even need to derive your own class if you don't plan
on customizing the Window at all, since CWnd::Create will
allow you to pass a Window class name.  The window will still then be
part of the normal MFC message routing.	
			
>
>        2. In processing WM_PAINT, BeginPaint() API is called
>           and an invalidated region of the window is returned.
>           What about WM_NCPAINT?  Is there a way to detect only
>           the invalidated area in the non-client area for
>           painting?  Or do I have to paint the entire non-client
>           area everytime?
>
>    Thanks in advance.

Painting in the non-client area of a Window is "not recommended" (from
page 475 of the Programmers Reference v2).  If you must, then
you retrieve a DC via CWnd::GetWindowDC.  In your code you should
paint everything.


-- 
Steven Sinofsky
stevesi@microsoft.com
Disclaimer: I don't speak for Microsoft, BillG does that.
Newsgroups: comp.os.ms-windows.programmer.misc
From: guy@st.ife.ethz.ch (Guy Morbach)
Subject: Re: Greying buttons, listbox items etc.
Organization: Swiss Federal Institute of Technology (ETH), Zurich, CH
Date: Wed, 12 Aug 1992 12:33:29 GMT

che358w@vaxc.cc.monash.edu.au writes:

>>
>> To unselect everything, try sending this message to your list box with
>> wParam equal to -1:
>>
>> LB_SETCURSEL
>>
>>         This message selects a string and scrolls it into view, if
>>         necessary. When the new string is selected, the list box removes the
>>         highlight from the previously selected string.
>>
>>         Parameter   Description
>>
>>         wParam      Contains the index of the string that is selected.
>>                     If wParam is -1, the list box is set to have no
>>                     selection.
>>
>> SendDlgItemMessage (hYourDlgBox, nYourListBoxID, LB_SETCURSEL, -1, 0L);
>>   .... [ more ]
>I think that there is a bug in TPW 1.0 (my opinion only) . When I put -1 for
>wparam in sendlgitemmessage I get a compiler error saying it is an invalid value
>. This is using the tdialog senddlgitemmessage that doesn't require a handle to
>the window to be passed. Hmm maybe its fixed in 1.5.
>Samantha Lane

wParam is defined as WORD which by definition is an unsigned integer 0..65535
Pascal compilers are very itchy on these things (strong type checking etc)
use explicit type casting: word(-1) and the compiler will run happily...
--Guy

IH8 vi
Newsgroups: comp.os.ms-windows.programmer.misc
From: blakeco@microsoft.com (Blake Coverett)
Subject: Re: BC++, Interrupt/msg at const time interval
Date: 20 Aug 92 04:01:57 GMT
Organization: Microsoft Canada Inc.

In article <130@elli.une.edu.au> pshepher@elli.une.edu.au (Philip Shepherd) writes:
>
>What is the best method for setting up an interrupt (or prehaps message)
>to be activated at a quaranteed time interval using Bc++3.0, Win 3.1

timeSetEvent and related functions.

(Note these are part of mmsystem.dll and as such probably not documented
with BC++ 3.0 but I believe you can get the appropriate Win 3.1 
additions from Borland.)

-Blake
-- 
#include <std/disclaimer.h>                       blakeco@microsoft.com
Mail Flames, Post Apologies.                      ...!uunet!microsoft!blakeco
Newsgroups: comp.os.ms-windows.programmer.misc
From: cparker@centerline.com (Charles Parker)
Subject: change font for TEdit
Reply-To: cparker@centerline.com
Organization: CenterLine Software
Date: Sun, 16 Aug 1992 20:30:18 GMT

How does one change the font for a TEdit in 
a window, or, failing that, for an EDIT control.

The default font seems to be some variable-pitch 
font, and I am trying to display code. It just
won't do

	cparker
From: d7joaki@cd.chalmers.se (Joakim Lundvall)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Problems with color ps printing
Date: 14 Aug 92 07:15:43 GMT
Organization: Chalmers Datorf|rening

Hello fellows,
  I have an Calcomp Colormaster+ at my office and I would like my programs to
  be able to write color to it, but I haven't managed to do so this far. I have 
  tried borlands WinPrint unit (uhh... sorry I program in TPW 1.5), no sucess.
  I tried to laike they said in the manual, didn't work. What should I do?
  The driver for the printer is for windows 3.0, and prints color pictures from
  Paintbrush & CorelDRAW and ..., but not from my programs. Is there some unit
  someone has written that I can use/by/borrow to learn where I do wrong?
  Is there any one that knows what I have done wrong with borlands winprint?
  can it print colors?

  Thnx net....

  Joakim Lundvall

  Would appriciate answer by email to:
    d7joaki@cd.chalmers.se

    thanks again.

Newsgroups: comp.os.ms-windows.programmer.misc
From: ekalenda@netcom.com (Edward J Kalenda)
Subject: Re: GDI: Foreground color and StretchBlt
Date: Fri, 21 Aug 92 19:45:01 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 

From article <mikael.64.714410136@udac.uu.se>, by mikael@udac.uu.se (Mikael Lundgren):
> 
> First a short presentation  of my goal. I need to define a custom
> raster opertion code in order to achieve a special effect in an application
> we are working on. After doing some calculations I have decided that the 
> code to use is 0x00b8074a. The idea is that i want to use a b/w bitmap as a 
> kind of filter in order to put a color (specified in a brush) on a specific 
> area of the screen. Now, the destination bitmap is a color bitmap, this 
> MIGHT mean that the b/w bitmap will be converted to a color bitmap which in 
> turn might affect the results I see on the screen.
> 
> "If StretchBlt must convert a monochrome bitmap to color, it sets white 
> bits (1) to the background color and black bits (0) to the foreground color."
> 
> My question is: what is the "foreground color"? I cannot seem to find that 
> info anywhere! I hope that this is a REALLY easy question to answer...

SetTextColor() sets the foreground color, SetBkColor() setss the background
color. I think they return the color they were set to before the call.
-- 

Ed
ekalenda@netcom.COM
Newsgroups: comp.os.ms-windows.programmer.misc
From: PAULETTI@biel.be.tech.ascom.ch (Pauletti Andreas)
Subject: Re: 2 List Boxes in one window... Transfering Information
Organization: Ascom Tech Ltd., Corporate Services, Division for Research 
Date: Fri, 14 Aug 1992 13:37:31 GMT
X-News-Reader: VMS NEWS 1.11

In <1992Aug14.045959.1689@njitgw.njit.edu> axs9017@hertz.njit.edu writes:

> Hi, Maby some one out there could help me.
> Im trying to open up a dialog box, that has 2 list boxes...
> I cant seem to figure out what Im doing wrong...
> I know that it is something to do with
> 
> TransferBuffer
> 
> I have to write it like that, so that when I click on the
> AvailableListBox, the information gets transfered to the
> SelectedListBox... (sort of like the printer and font stuff in windows)
> 

Transfer buffer s are used to set and retrieve information of controls.
The data is transfered from the buffer to the controls before the dialog
is shown and back after the dialog is finished (normally when the OK
button was selected.
What you need is to alter the behaviour of the AvailableListBox Control
in that way that a selection adds the selected string into the
SelectedListBox (CHANGESEL message)

cheers andreas pauletti
From: wlb@progress.COM (Warren Bare)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Documentation for RECORDER.DLL
Date: 21 Aug 92 20:49:39 GMT
Organization: Progress Software Corp.

Hi folks,

  I am trying to figure out a way to play back a Windows
Recorder macro under the control of my own application.

  It looks like I should be able to access the RECORDER.DLL
directly to do this.  The problem is that I have no idea what
the API is.  The exports for the dll are below.

  Has anyone figured out how to do this?  Does anyone have
any doc for this dll?

Thanks,
Warren

RECORDER.DLL
Exports:
ord seg offset name
 17   2  002f  WEP exported, shared data
  3   1  0010  STOPRECORD exported, shared data
 10   1  1e28  ENAHOTKEYS exported, shared data
 14   1  034a  SETPBWINDOW exported, shared data
 13   1  0548  WAIT exported, shared data
  7   1  05f5  KHOOK exported, shared data
  2   1  1ba1  STARTRECORD exported, shared data
  8   1  1d1a  ADDHOTKEY exported, shared data
 16   1  1b57  CLOSERDLL exported, shared data
  4   1  01d4  STARTPLAYBACK exported, shared data
  5   1  0371  STOPPLAYBACK exported, shared data
  9   1  1d9c  DELHOTKEY exported, shared data
 15   1  1b87  ENABLEBREAK exported, shared data
 11   1  1af8  INITRDLL exported, shared data
  6   1  0785  JPHOOK exported, shared data
  1   1  12f4  JRHOOK exported, shared data
 12   1  1c12  SUSPENDRECORD exported, shared data

--
Warren L. Bare                UUCP: mit-eddie!progress!Warren.Bare
Progress Software Corp.   Internet: Warren.Bare@progress.com
14 Oak Park                    FAX: 1 617 275 4595
Bedford, MA  01730
-- 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Kyle Tucker - Email Administrator  | 		Progress Software Corporation
tucker@bedford.progress.com 	   |		14 Oak Park
Newsgroups: comp.os.ms-windows.programmer.win32
From: kevin@edscom.demon.co.uk (Kevin Broadey)
Subject: wsprintf and wvsprintf - why?
Organization: EDS-Scicon, Milton Keynes, UK
Date: Thu, 13 Aug 1992 13:01:14 GMT

I know I read it somewhere (probably in the  Win32 API Programmer's Reference)
but I can't find it now I need it, so...

Can anyone tell me (or point me to) the reason why wsprintf and wvsprintf
should be used in preference to sprintf and vsprintf?

I had a problem just now where a function in a DLL caused a fatal software
exception when it called vsprintf, and all was wonderful when I replaced it
with a call to wvsprintf.

TIA
-- 
Kevin Broadey, EDS-Scicon
Mail:	Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England
E-mail: kbroadey@edscom.demon.co.uk
Phone:	+44 908 284198 or +44 908 585858 ext 4198
From: yeh@sceng.ub.com (David W. Yeh)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Questions on NT KDK installation
Keywords: KDK, boot disk, SDK
Date: 13 Aug 92 21:58:28 GMT
Organization: Ungermann-Bass


Hi, 
	I got a July '92 version of Windows NT KDK (kernel debugging version), 
then I tried to install it according to the document "\readme\newcomer.txt". The
document says that you have to "Follow the instructions in the PDK2 release
notes to make the disks needed to build the FAT boot sector". My questions are:
What is PDK2? and how to make this boot disk? I have tried to use the July '92 
NT SDK boot disk to boot up my Compaq 386/33 Deskpro, copy \nt (from KDK) 
directory, copy \ntldr, modify boot.ini, registry.ini then reboot the machine,
but it hangs after it checked the file system.

	Could any kind soul help me on this?

								David

	p.s. I have used this machine to install NT SDK and I didn't get any
	     problem at all.
Newsgroups: comp.os.ms-windows.programmer.win32
From: alistair@microsoft.com (Alistair Banks)
Subject: Re: FILETIME and Pope Gregory XIII 
Date: 21 Aug 92 02:19:23 GMT
Organization: Microsoft Corporation

In article <714170346snx@apusapus.demon.co.uk> tfj@apusapus.demon.co.uk (Trevor Jenkins) writes:
>
>In article <KEVIN.92Aug18150139@buffalobill.edscom.demon.co.uk> kevin@edscom.demon.co.uk writes:
>
>> Okay, I've got to ask this one.  Sorry if it's an FAQ, but MicroSoft have
>> really set themselves up for it...
>> 
>> The documentation for the FILETIME structure says it holds the number of 100ns
>> intervals since January 1st, 1601.

Just FYI - the next update of the kit will change the date & time
Win32 APIs - we've moved everything to a universal time, so that
issues like time stamps on shared files servers throughout the world
dont hurt anymore -- Alistair
From: perkins@gamma1.ltn.dec.com (Eric Perkins)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: EXE file formats:
Date: 14 Aug 92 17:49:55 GMT
Reply-To: perkins@gamma1.ltn.dec.com (Eric Perkins)
Organization: Digital Equipment Corporation

We have a need to be able to read in .EXE and .DLL files on both
the MIPS version of NT and the Intel version. I have looked through
the printed documentation and the online documentation, but have 
not been able to find any information on this.

Has someone else found this information?
It was made available in the Win 3.1 SDK so I would have thought
it was available in the Win NT SDK?

Could someone from Microsoft please comment on this, and either post
a response here or mail me a response. My enet address is
given below.

-- Thanks, in advance, Eric Perkins
-- perkins@tallis.enet.dec.com
From: rion@Ingres.COM (Rion Cassidy (x3357) OGT)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: I too have unable to print the PS files
Date: 20 Aug 92 19:58:19 GMT
Reply-To: rion@Ingres.COM
Organization: Ask Computer Systems Inc., Ingres Division, Alameda CA 94501

I have been able to print some of the docs, but with some problems.

The tools manual is broken into some 20 or so files (corresponding to
chapters), but the Win32 API manuals are in two files around 2.5MB each!!
My postscript printer can print these just fine, but the print spool area is
limited to approx 1 MB, so the API manuals get truncated down to 372 pages.

Does anyone know how to break up postscript files?

Rion
From: sammy@anagld.analytics.com (Sam Blackburn)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: Missing WIN32 SDK CD-ROMs?
Date: 21 Aug 92 00:41:07 GMT
Distribution: usa
Organization: Computer Sciences Corporation - Systems Engineering Division

mcnally@wsl.dec.com (Mike McNally) writes:

>brian%jaguar.cs.utah.edu@cs.utah.edu (Brian Sturgill) writes:
>>If you attended the NT conference, in addition to the SDK CD-ROM, you
>>got 2 additional ones.

>That's news to me and the other five people from this office that
>attended the NT conference in San Francisco in July.  We got 1 (one)
>(uno) (ein) CD.

Were you guys Green Badgers or Purple Badgers?  We were Greenies and the three
CD's were in our black bags.
From: lothar@cyrcle.uucp (Bob Trembley)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Win32s and Windows 3.1
Summary: Will MS upgrade existing Win3.1 apps to use Win32s?
Keywords: Win32s
Date: Tue, 11 Aug 92 22:23:06 EDT
Reply-To: lothar@angus.mi.org
Organization: Cyrcle Systems

I have read that the DLLs/VxD to run Win32s under DOS/Windows will be on the
Beta-release CD of NT (in September I believe?)

I have a question:  Is Microsoft going to release upgrades for the Windows
3.1 Program Manager, File Manager and other apps to use Win32s?

How much (if any) of what we know of as DOS/Windows 3.1 today will be using
Win32s in 3 months, 6 months, etc...?  Will this become the desired
"platform" for Windows apps?

--==>>BobT>
From: claborne@npg-sd.SanDiegoCA.NCR.COM (Chris Claborne)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: Microsoft NT staff please read
Date: 14 Aug 92 14:50:15 GMT
Organization: NCR Corp., Network Products - San Diego

In <1992Aug13.183231.21206@pony.Ingres.COM> nitin@Ingres.COM (Nitin Borwankar) writes:

>In article <183052@pyramid.pyramid.com> atam@pyrps5.eng.pyramid.com (Alexander Tam) writes:
>>There are a lot of people,including myself, out here on the internet network
>>don't have access to Compuserve. If NT is really going to compete with UNIX,
>>you have to let someone on the UNIX network know what you are doing. Please
>>post ALL the articles, bug report form, Q&A, announcements,etc. you put in
>>Compuserve to somewhere on internet. You may either post them to
>>comp.os.ms-windows.programmer.win32 or open another news group. Do you 
>>understand?

[... stuff deleted]

Couldn't a mail address be setup so that anything sent to that address would
echo to a news group?  I know that CI$ users can send internet mail.
If MS has an easy solution, they might be a little more receptive.


    2
== C  ==
chris.claborne@sandiegoca.ncr.com                    CI$: 76340.2422
Newsgroups: comp.os.ms-windows.programmer.win32
From: joiner@mega.cs.umn.edu (Jay K. Joiner)
Subject: Re: Can Flexboot be removed temporarily?
Organization: University of Minnesota
Date: Thu, 13 Aug 1992 20:15:39 GMT

In <92225.175802CJS@psuvm.psu.edu> Christopher Sacksteder <CJS@psuvm.psu.edu> writes:

>Is there a way to remove the the flexboot/multiboot/portable booter (I've
>found only 3 names so far!) just temporarily?  Like perhaps renaming on
>of the files or such?

You can remove Flexboot from your boot partition with the SYS command 
after booting DOS from a floppy.  

You should be able to borrow from the DOS2NT batch file on
the CDROM to figure out how to reinstall it quickly.  I believe its
just a simple debug script to install it.

Jay Joiner
From: rose@galtee.cs.wisc.edu (Scott Rose)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: I too have unable to print the PS files
Summary: edit the headers
Date: 20 Aug 92 21:18:33 GMT
Organization: University of Wisconsin, Madison -- Computer Sciences Dept.

In article <1992Aug20.063746.12690@microsoft.com> alistair@microsoft.com (Alistair Banks) writes:

>These files were intended to be generic - at least as generic as postscript
>is - but with the problems I've been seeing here, and on compuserve, we
>can see that it's far from perfect - please note, at least some people
>have been reporting succes here, so check with them and learn how they
>succeeded

I encountered two problems with these files that I had to solve before I could
get more than a few pages at a time to print:

1. There is a ^D embedded in the first few bytes of each file.  Don't know why
   it's there, much less why it is not always in the same place; do know that
   I got zero pages of output until I used an editor to remove it.

2. The docs use fonts that are not supported by the printers-- three flavors
   of them-- that are in my shop.  For example, Helvetica Narrow and Helvetica
   Narrow Bold.  I could get a number of pages of each doc to print before 
   associated error messages from the printer caused lpd to abort the jobs.
   The fix?  Edit the header of each file to redefine the macros to use other,
   supported fonts.  For example, change /HNB to use Helvetica Bold.

After doing these edits, the files printed for me without problem on all of my
printers.  Unless you count irate coworkers as a problem, that is.

Hope this helps.
Newsgroups: comp.os.ms-windows.programmer.win32
From: vscarafi@eccdb1.pms.ford.com (Vincent F. Scarafino)
Subject: Re: NT hang? 
Originator: news@pms001
Organization: Ford Motor Co.
Date: Fri, 21 Aug 1992 21:40:13 GMT

Yes, I experienced a hang like the one you described.  It happenned only
once to me, after I had pushed NT pretty hard by starting a few hundred
Win16 applications.  The shutdown attempt was able to get rid of all
processes except for the final two, and the Logoff window was in limbo.
I hit the reset button.  When I brought NT back up, I got no complaints
from it.

Vince
From: daveg@prowler.clearpoint.com (Dave Goldblatt)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Emacs for NT?
Date: 19 Aug 92 02:52:27 GMT
Reply-To: daveg@prowler.clearpoint.com
Organization: Clearpoint Research Corp, Hopkinton MA 01748


*sigh*

I've got NT running on my machine, but I haven't had much luck with
the editor Microsoft tosses in, and while MicroEMACS for Windows seems
to run, it isn't really what I'm looking for..

So, the question is: has anyone ported GNU Emacs to NT, and if so,
where's it available?  (and to whom do I send thanks? :-)

Any help will (a) make my life easier, and (b) earn email of
gratitude..

-dg-
--
"Luck is defined as when preparation   |  Dave Goldblatt [daveg@clearpoint.com]
  meets opportunity."                  |  Subsystems Engineering
                                       |  Clearpoint Research Corporation
               -- Neil Peart           |  Hopkinton, MA 01748 - (508) 435-7425