HDTenEightyP/NetNews huggingface dataset:
From: stevesi@microsoft.com (Steven Sinofsky)
Subject: Re: Buglist for MSC 7.0 ?
Date: 26 Aug 92 20:13:49 GMT
Organization: Microsoft Corporation

Information on updates, problems and workarounds for Microsoft C/C++ 7.0
is available on Compu$erve.  At this time, this information is not
available on USENET.


In article <kaVuPB2w165w@freitag.sta.sub.org> pas@freitag.sta.sub.org (Juergen Bernau) writes:
>Is there a buglist for MSC/C++ 7.0 ?
>
>thanks for any help.
>
>------------------------------------------------------------------------
>juergen bernau                                   pas@freitag.sta.sub.org


-- 
Steven Sinofsky
stevesi@microsoft.com
Disclaimer: I don't speak for Microsoft, BillG does that.
Newsgroups: comp.os.ms-windows.programmer.misc
From: yon@world.std.com (David A Yon)
Subject: EnableKBHandler in TPW?  Help!
Followup-To: comp.os.ms-windows.programmer.misc
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 2 Sep 1992 12:18:50 GMT

I'm running TPW 1.5 under Win 3.1, and can't seem to get the
ObjectWindows EnableKBHandler feature to work.  I've got a resizable
window under MDI where I have two comboboxes, a single-line edit, and
a multi-line edit control.  I've tried calling EnableKBHandler in both
the Init and SetupWindow methods, all to no avail.  Anytime I hit
<tab> in the window the computer just beeps.  I realize the that the
multi-line edit is a wrench in the works, but I don't really care
whether or not you can tab out of that control anyway.  I just want to
be able to traverse the other controls.  Any help appreciated!

David Yon
yon@world.std.com

The Init and SetupWindow methods follow.  Note that I am specifying
ws_TabStop and ws_Group for the four controls that I want to traverse:


{**
 ** Init -- This method initializes each instance of the
 **         TLetterEditor class.
 **}
constructor TLetterEditor.Init(AParent: PWindowsObject; 
				 owner: PLetter);
const
    LineHeight = 30;

begin
    TLetterWindow.Init(AParent,owner);
    EnableKBHandler;
    Contents^.Attr.Style := Contents^.Attr.Style and
			    not (es_AutoHScroll or ws_HScroll);

    EnableTransfer;

    {--- Set up Controls ---}
    with DestinationSize do
    	Destination := New(PComboBox, Init(@Self,
      			  id_LetterEditorDestination, X,Y,W,H,
		cbs_DropDown or cbs_HasStrings or cbs_AutoHScroll, 81));
    Destination^.Attr.Style := Destination^.Attr.Style or 
			       ws_TabStop or ws_Group;
    with InfoDestSize do
        InfoDest := New(PComboBox, Init(@Self, 
 			id_LetterEditorServ,X,Y,W,H,
                        cbs_DropDownList or cbs_HasStrings or cbs_AutoHScroll, 81));
    InfoDest^.Attr.Style := InfoDest^.Attr.Style or 
			    ws_TabStop or ws_Group;
    with SubjectSize do
    	Subject := New(PEdit, Init(@Self, id_LetterEditorSubject,
		       '',X,Y,W,H, 40, False));
    Subject^.Attr.Style := Subject^.Attr.Style or 
			   ws_TabStop or ws_Group;
end;


{**
 ** SetupWindow -- This method installs widgets for the Lettor Editor;
 **}
procedure TLetterEditor.SetupWindow;
var
     Msg: TMessage;
begin
    EnableKBHandler;
    Dirty := False;

    {--- Enable transferring of Data to and from the Destination,
         Subject, and Contents ---}
    Destination^.EnableTransfer;
    InfoDest^.EnableTransfer;
    Subject^.EnableTransfer;
    TLetterWindow.SetupWindow;

    {--- Enable Soft Line-Breaks ---}
    SendMessage(Contents^.HWindow,em_GetRect,0,Longint(@FmtRect));
    with FmtRect do
         begin
         Left := 0; Top := 0;
         end;
    SendMessage(Contents^.HWindow,wm_SetFont,
		GetStockObject(SYSTEM_FIXED_FONT),0);
    SendMessage(Subject^.HWindow,wm_SetFont,
		GetStockObject(SYSTEM_FIXED_FONT),0);
    Contents^.SetText(ownedBy^.GetBody);
    SetFocus(Destination^.HWindow);
end;
From: woodford@skcla.monsanto.com
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How can I set up items from DOS?
Date: 1 Sep 92 10:31:18 GMT
Organization: Searle, Skokie, IL
Nntp-Posting-User: heszar



   From DOS, How can I: 

         a.  Make sure that a group exists.

         b.  Know whether an item is defined in that 
             group.

         c.  Read where the ICON file is

         d.  Add an entry with the correct ICON if
             it's not defined.
Newsgroups: comp.os.ms-windows.programmer.misc
From: neils@microsoft.com (Neil Smith)
Subject: Re: MSC++ 7.0 large model compiling
Date: 04 Sep 92 14:03:51 GMT
Organization: Microsoft Corporation
Keywords: Microsoft C/C++ 7.0 arrgh

In article <1992Sep4.023430.16008@cs.UAlberta.CA> ken@cs.UAlberta.CA (Huisman Kenneth M) writes:
>
>If I compile with /AL ( large model ) and link with lafxdwd, libw, llibcew
>it compiles ok, but when I run it it comes up with an application error
>( "no main procedure" ).  I thought this was really odd since the main
>procedure I think it is looking for is supposed to be defined in the
>class library.

LAFXDWD.LIB is the DLL-support version of the large model MFC library
(similar in spirit to LDLLCEW.LIB).  You need to link against
LAFXCWD.LIB -- this is the proper version for making executables.

LAFXCWD.LIB isn't provided pre-built in the C7 box; you need to compile
it yourself.  To do this:

Ensure your INCLUDE environment variable points to \C700\MFC\INCLUDE
and \C700\INCLUDE.

cd \C700\MFC\SRC
nmake TARGET=W MODEL=L DEBUG=1

or see \C700\MFC\SRC\README.TXT for more detailed instructions.
-- 

Neil Smith - Microsoft/AFX - neils@microsoft.com
Visualize Whirled Peas!
Newsgroups: comp.os.ms-windows.programmer.misc
From: cparker@centerline.com (Charles Parker)
Subject: Re: Changing font in edit controls
Reply-To: cparker@centerline.com
Organization: CenterLine Software
Date: Mon, 31 Aug 1992 22:50:37 GMT

In article 14569@wam.umd.edu, castanos@wam.umd.edu (Jose Alberto Castanos) writes:
>    Hello, 
>

>    I'm working on an ObjectWindows application that derives
>a window from the TFileWindow class.  I need to change the font 
>of the Editor window and cannot find a way to do this.  According 
>to the ObjectWindows User's Guide this could be done, but no details
>are given on how to do it.
>     My question is how can the font in an edit control be changed?
>

The only reason that I know the answer is that I asked the same question
a couple weeks ago.

Send a WM_SETFONT message to the TFileWindow's Editor->HWindow, as per:

TFileWindow *foo;

	SendMessage(foo->Editor->HWindow,WM_SETFONT,...);

I forget the rest of the message parms, but you can easily get them by
hitting Ctrl-F1 while the cursor is on WM_SETFONT inside the IDE. 
One of them is a HFONT

---
---------------------------------------------------------
                                       cyberspace
momma, don't let yer children grow up to be ^ cowboys ...
---------------------------------------------------------

Newsgroups: comp.os.ms-windows.programmer.misc
From: jonka@microsoft.com (Jonathan Kagle)
Subject: Re: PETZOLD's COLOR PROGRAM AFU??
Date: 31 Aug 92 18:19:58 GMT
Organization: Microsoft Corporation
Distribution: usa

In article <1992Aug28.004811.7803@cis.ohio-state.edu> lavigne@spaghetti.cis.ohio-state.edu (david lavigne) writes:
>Has anybody else had the following problem with the colors program is PETZOLDs
>PROGRAMMING WINDOWS book.
>
>The program is not giving up some resource and will eventually cause windows to
>UAE or whatever the new term is.  This happens after moving the scrollbox 
>thumbs for quite a while.  Even terminating the program does not free the 
>resources. 
>

This is a known problem with COLORS and Windows 3.1. The code uses 
DeleteObject to delete the colored brush before deselecting it from the
device context (with SetClassWord). As a result, the DeleteObject fails
and the brush is never deleted. When you run the slider up and down, you
fill memory with brushes created by CreateSolidBrush.

For some reason, Windows 3.0 was more forgiving, though the API guide 
clearly states (under DeleteObject):

"An application should not delete an object that is currently selected into
a device context."

This problem isn't instantly obvious when glacing at the code because of
all of the cute tricks that Petzold uses (in this case to save the use of
a temporary variable). In general, when using a modern optimizing compiler,
these tricks rarely pay off in terms of code quality, and can really make
your programs harder to read and debug.

       -Jonathan
From: thanos@reef.cis.ufl.edu (Thanos Karras)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Owner Drawn Buttons
Date: 31 Aug 92 13:23:49 GMT
Organization: Univ. of Florida CIS Dept.

Hello fellow Windowers:

I have a problem with creating owner drawn buttons. 

More specifically, I am registering my own button class and 
create the buttons with WS_CHILD | WS_VISIBLE | BS_OWNERDRAW.
The problem is that the parent never receives WM_DRAWITEM messages.
Is there something I am doing wrong?

Thanks in advance,

Thanos Karras
thanos@reef.cis.ufl.edu



Newsgroups: comp.os.ms-windows.programmer.misc
From: whedon@netcom.com (Bill Whedon)
Subject: Re: Using extended character set in menus
Date: Wed, 26 Aug 92 06:12:16 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Keywords: Windows 3.0

In article <55864@olivea.atc.olivetti.com> os2dev@flash.ATC.Olivetti.Com (Bruce Rienzo) writes:
>I would like to display arrow symbols next to a menu item to indicate 
>that the arrow key is the accelerator for this item.
>
>How do I do it?
See "Programming Windows" by Charles Petzold, Microsoft Press, 
ISBN 1-55615-264-7, the section titled "USING BITMAPS IN MENUS"
Cheers,
Bill Whedon




Newsgroups: comp.os.ms-windows.programmer.misc
From: joero@microsoft.com (Joe Robison)
Subject: Re: Using VB+Fortran
Date: 01 Sep 92 06:14:23 GMT
Organization: Microsoft Corp.

In article <16294@ucdavis.ucdavis.edu> JRBANGA@poppy.ucdavis.edu wrote:
> 
>  Hi everybody.
> 
>  I'm trying to give a GUI to some scientific Fortran programs.
>  I'm thinking of using MS Visual Basic in combination with MS Fortran.
> 
>  Has anyone gone through the same experience?
>  Any advice/comments/references?
>  Anything I should be aware of?
>  
>  Is there a better way to do this?

This is the right approach.  It works quite well.
You compile your Fortran code as a Windows DLL (this is documented in 
the latest version of Microsoft Fortran). Build the UI in Visual
Basic, declare the functions exported in the DLL, and call them. 
I've never actually done the Fortran side of this, but I've helped
several people who have.  The only tricky part is (as usual) getting
the Declare statements in Visual Basic to match up with what the
Fortran functions are expecting.  It's not hard if you carefully
think through what you're actually passing (or expecting to be
passed) for each argument.  The floating point format is identical
for the two languages, so that helps.

There was an article on this in the Microsoft Systems Journal,
about a year ago (summer of 91).  Also, I believe Microsoft
Fortran actually includes an example file that does this.
Some of the more engineering-oriented journals have run articles
about this as well (sorry, I don't remember titles or dates).

Hope this helps.

--
Joe Robison
joero@microsoft.com
Not A Microsoft Spokeshuman


Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
From: tmurphy@well.sf.ca.us (Thomas Murphy)
Subject: Re: MONEY to be made: VB & Grid Control!
Organization: Whole Earth 'Lectronic Link
Date: Tue, 1 Sep 1992 17:27:03 GMT

In article <anderson.27.715355124@mayo.edu> anderson@mayo.edu (Alfred I. Anderson) writes:
>Several days ago I posted a message asking if anyone had information on a 
>GRID control (like that distributed with the Visual Basic Professional 
>Toolkit) that provided the ability to have character attributes of Forecolor 
>and FontSize to be set on a Cell-by-Cell basis at run-time.
>
>I got an unexpected number of responses from people asking me to let them 
>know if I find such a control - they want it too.
>
>In fact, I think people might even PAY for such a control!
>
>
>(The original note read:  
>Microsoft distributes the GRID control as an enhancement to Visual Basic in 
>the Professional Toolkit.  It is a very useful control!
>
>Queston: How can the character attributes of forecolor and fontsize be set 
>on a CELL by CELL basis?
>
>It is easy to give the entire grid these attributes.  However, I can't find 
>a way to adjust the attributes on a cell basis.  For example, all numbers 
>appearing in Column 1 should be in black unless they are negative in which 
>case they should appear in red.  Or, every 5th row should be printed in a 
>bold-face font, other rows printed in a normal font.
>
>Can anyone suggest a way of doing this?)
>
>
>
>Alfred
>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>Alfred Anderson                Internet:    anderson@Mayo.edu
>Mayo Foundation - Rochester MN 55905
>-----------------------------------------------------------------


Having just looked at this...you would need to modify the control itself and
I don't think you can do that....your only other option is to create your
own grid control...thus the money to be made idea.....you should suggest
this to ms though as they are interested in feedback for the next version
etc.

tom
-- 
Thomas Murphy
Product Review Editor - Computer Language Magazine
Technical Editor - AI Expert
600 Harrison St., San Francisco, CA 94107
From: JRBANGA@poppy.ucdavis.edu (JULIO RODRIGUEZ BANGA)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Test
Date: 24 Aug 92 01:55:44 GMT
Organization: University of California, Davis
X-News-Reader: VMS NEWS 1.20

Sorry, this is a test.
From: bchen@diva.Berkeley.EDU (Benjamin Chen)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Combining Regions in MFC (gripe)
Date: 2 Sep 1992 18:34:17 GMT
Organization: University of California, Berkeley
Distribution: usa
NNTP-Posting-Host: diva.berkeley.edu

I was trying to do the following to combine a circular and rectangular
region:

    CRect bbox;
    CRgn circle, rect, combine;
    int status;

    status = circle.CreateEllipticRgnIndirect( bbox );
    status = rect.CreateRectRgn(top, left, right, bottom);
    status = combine.CombineRgn(&circle, &rect, RGN_DIFF);

This did not work by itself.  CombineRgn() returned ERROR.
I needed to add the following statement beforehand:

    status = combine.CreateRectRgn(0, 0, 0, 0);

in order for the CombineRgn() to work, apparently to initialize the
destination CRgn to some arbitrary dummy region.  This info is nowhere 
in the MFC docs.  I only tried this after reading the API docs
(Programmer Reference, Vol 2., p 63) where it states:
    
    To use CombineRgn MOST EFFCIENTLY, hrgnDest should be a 
    trivial region ....

So it probably isn't MFC's "fault".  Still, the note should be reflected
in the MFC docs.  Also, "MOST EFFICIENTLY" should be deleted from the text 
since it doesn't work AT ALL if you don't create a trivial region (which
seems to be a little hacky anyway). Oh, well, just venting some frustration.

    BC

-- 
Benjamin Chen
Office:   550-A4 Cory Hall, 2-4332
UUCP:     !ucbvax!diva!bchen               
HEPNET:   LBL::"bchen@diva.Berkeley.EDU"
Newsgroups: comp.os.ms-windows.programmer.misc
From: blakeco@microsoft.com (Blake Coverett)
Subject: Re: SetViewportExt and Screen Mapping
Date: 01 Sep 92 03:03:12 GMT
Organization: Microsoft Canada Inc.

In article <92242.153745IO70935@MAINE.MAINE.EDU> <IO70935@MAINE.MAINE.EDU> writes:
>I working on an application that requires a real time display for a data acqusi
>stion program and I need to remap the window. I would like to map the window in
> a user coordinate system such that one corner is x1,y1 and the other x2,y2. I
>am looking for any information or examples of how to do this my BC 3.0 Manuals
>are no help and Microsofts Reference Book little better. Thanks in advance.

HDC GetScaledDC(HWND hwnd, int left, int top, int right, int bottom)
{
	HDC hdc;
	RECT r;

	hdc = GetDC(hWnd);
	GetClientRect(hWnd, &r);
	SetMapMode(hdc, MM_ANISOTROPIC);
	SetWindowOrg(hdc, left, bottom);
	SetWindowExt(hdc, right-left, top-bottom);
	//SetViewportOrg(hdc, 0, 0); This is the default in a clean DC
	SetViewportExt(hdc, r.right, r.bottom);

	return hdc;
}

-Blake (typed off the top of my head, all disclaimers apply)
-- 
#include <std/disclaimer.h>                       blakeco@microsoft.com
Mail Flames, Post Apologies.                      ...!uunet!microsoft!blakeco
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: GDI: Drawing a dotted line
Date: 23 Aug 92 21:24:52 GMT
Organization: PE-Nelson

In article <70550002@hpcc01.corp.hp.com>, azarian@hpcc01.corp.hp.com (Randy Azarian) writes:
|> I want to draw a line with alternating pixels; in other words, a dotted line.
|> CreatePen provides a number of patterns that I am able to use, however what
|> they call PS_DOT alternates about every two or three pixels, but not what I
|> want, which is to alternate *every* pixel.
|> 

I sympathize with this, I've noticed some truly ugly dotted lines with
certain drivers.  Therein, I think, lies the problem -- it is the driver (video
or printer) that determines what a dotted line looks like.  You certainly
wouldn't want a dotted line that simply alternated pixels on a 400dpi laser
printer, would you?

I do wish that MS Windows had the capability to specify a dash style a la
X Windows (in logical units, of course).


----------------------------------------------------------------------------
Tom Brown               |  "Strange women, laying in ponds, distributing
PE Nelson Systems       |   swords is no basis for a system of government."
twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
----------------------------------------------------------------------------
From: jere@uta.fi (Jere K{pyaho)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Weird problem with MMAPI and STRICT
Date: 26 Aug 92 06:27:49 GMT
Organization: University of Tampere, Finland

Can anyone figure out what is happening here:

This is Win3.1, Borland C++ 3.1. I have the following, very
simple piece of code, written in straight C, which uses the
Windows 3.1 Multimedia API:

#include <windows.h>
#include <mmsystem.h>
...
HMIDIOUT hMidiOut;	/* handle to MIDI output device */
UINT uiMidiOut;		/* MIDI output device ID */
int iReturn;		/* call return value */

iReturn = midiOutOpen( (LPHMIDIOUT) &hMidiOut, uiMidiOut,
			(DWORD) hwnd, 0L, CALLBACK_WINDOW );

Here, uiMidiOut has been initialized to a valid MIDI device ID -
this I checked. The hwnd is just a window handle -- I don't
think it makes any difference even if it is actually a dialog:
a window is a window, right? So I could direct the MIDI messages
to a scrollbar if I felt like it. ;-)

Anyway, what happens is that when I compile this stuff with
WIN31 and STRICT, the midiOutOpen() call bombs, giving me
an Error 11: Invalid parameter passed to a system function.
The funny thing is that when I compile it _without_ STRICT,
the call works OK.

So what's the invalid parameter? The obvious workaround is
to compile without STRICT, but then you lose many other
nice checks for stupid errors.

Jere
-- 
/* Jere K{pyaho -- jere@kielo.uta.fi -- University of Tampere, Finland */
/* Department of Translation Studies -- Department of Computer Science */
Newsgroups: comp.os.ms-windows.programmer.misc
From: blakeco@microsoft.com (Blake Coverett)
Subject: Re: Cursor location in edit control?
Date: 02 Sep 92 01:40:23 GMT
Organization: Microsoft Canada Inc.

In article <1992Sep1.104811.1@cortex> mboucher@cortex.prospect.com (Mike Boucher) writes:
>Is there a way, when you get a WM_CHAR message in an edit control, to determine
>where the cursor is?  I mean the location in the string, not the screen coords.
>I need to know if the character is being appended to the end of the string,
>tacked onto the front, or in the middle for validation purposes.

I answered a closely related question by email just yesterday.  Since this is
the second along the same line (from a different person) I'll post this
response.

The easy way to remember this is to consider characters typed into an edit
control as always replacing the current selection (which they do).  The
trick is that the selection is sometimes zero width, i.e. just the caret,
resulting in the character being insert at that point.

It is then obvious that you can use EM_SETSEL and EM_GETSEL to set and query
the caret position just by making the end position equal to the start position.

-Blake
-- 
#include <std/disclaimer.h>                       blakeco@microsoft.com
Mail Flames, Post Apologies.                      ...!uunet!microsoft!blakeco
Newsgroups: comp.os.ms-windows.programmer.misc
From: jching@watnow.uwaterloo.ca (John Y. Ching)
Subject: Objectvision and Sound Blaster Pro
Organization: University of Waterloo
Date: Mon, 24 Aug 1992 00:47:41 GMT

A friend of mine is trying to use Borland's ObjectVision to write some
simple Windows applications that use the Sound Blaster Pro.  My first
guess is that there must be some SBPro DLL's available and that there
must be a way to link with these DLL's in Objectvision.  If anyone out
there who has some experience with ObjectVision and Sound Blaster
programming, and can answer a few of our questions, please email me
at this account.

Thanks.



-- 
 John Y. Ching (jching@watnow.waterloo.edu)     
 Pattern Analysis and Machine Intelligence Group
 Department of Systems Design Engineering      
 University of Waterloo, Canada            
Newsgroups: comp.os.ms-windows.programmer.misc
From: jamescho@leland.Stanford.EDU (James Cho)
Subject: moving the cursor in an edit control
Keywords: cursor edit control
Organization: CIS, Stanford University, CA 94305, USA
Date: Thu, 27 Aug 92 23:20:26 GMT

how can you move the cursor in an edit control in a windows
program?  i didn't see anything in the EM_* window messages
which seem to do the job.  i'm looking for something like
EM_SETCURSOR.  i'm trying to put the cursor at the end of
a string which i put into the edit control by using this
command:

  SetDlgItemText (hWnd, XX_EDITID, string);

but this leaves the cursor at the beginning of the string in
the edit control instead of at the end.

jamescho
__________________________________________________________________________
James S. H. Cho h: (415) 494-8344 o: 725-3649 o _   _ _  _   _  _   /   _
Center for Integrated Systems, Elec. Eng.    / /_\ /\/\ /_\ /_ /   / \ / \
CIS-038, MC-4070, Stanford, CA 94301     \__/ /  //   / \_  _/ \_//  / \_/
Newsgroups: comp.os.ms-windows.programmer.misc