HDTenEightyP/NetNews huggingface dataset:
From: scstech@solomon.technet.sg (Kenneth Soh)
Subject: Memory Model Help
Organization: Singapore Computer Systems Ltd
Date: Thu, 17 Dec 1992 17:31:00 GMT

Hi all...

Thanks for all who helped me with the memory management stuff in Windows,
especially Brad of NASA - who promptly answered my SOS message even at
1:30 in the morning.

I've now "migrated" to large memory model as my Windows application needs
large memory for data. My application is to be run on a dedicated PC
and hence I don't have to worry about not being able to run multiple
instances of it under the large model.

Microsoft C/C++ and its MFC library actually comes with .lib's for the
different memory models. We can actually use mixed models by simply
utilising the "_f*" set of functions like _fmemcpy(), _fstrcpy() etc for
far access from within a small or medium model. Correct me if I am
wrong.

My only doubt is that I have those ?LIBCE.LIB library files. Why my
linker keeps saying that the ?LIBCA.LIB file not found ? I suspect
that this is due to the comm library which I linked with. If I just ignore
that message and force it to link with the ?LIBCE.LIB it works fine
thus far. Just dunno whats wrong. Anyone can tell me why ?

Merry Xmas !

Kenneth Soh
Singapore
Newsgroups: comp.os.ms-windows.programmer.tools
From: oneil@cwis.unomaha.edu (Sharon O'Neil)
Subject: Re: Is here anyone using Visual Basic 2.0 ?
Organization: University of Nebraska at Omaha
Date: Fri, 18 Dec 1992 12:20:37 GMT

jonm@Ingres.COM (Don't Judge a book by your cover) writes:

>>We are using VB 2.0 for product development.
>> 
>>Yes, it is buggy. Yet the new features are needed so we are sticking
>>with it.
>>--

>What do you mean exactly by 'buggy'.  I am waiting for VB 2.0 now.  I might
>mention that I have been waiting for about 2 months and the dealers pass
>the buck on to Microsoft saying I have about another month and a half to wait.
>Is VB 2.0 worth waiting for?  By the time I get it, will these bugs be 
>resolved?
>The answers to these Questions and others await in the next episode...

Yes, I know what you mean.  I haven't experienced the bugs yet, but I did get
somewhat perturbed with Microsoft because they take a million years to get
registered users of their products on their database.  I had to wait for my
upgrade until they managed to get around to it: and of course that took four
or five weeks.

Sharon O'Neil
oneil@cwis.unomaha.edu

Newsgroups: comp.os.ms-windows.programmer.tools
From: rryan@panix.com (Rob Ryan)
Subject: Re: MSC 7.0 windows debug mode and 'Cant read from device AUX'
Date: Fri, 11 Dec 1992 16:02:46 GMT
Distribution: comp.os.ms-windows.programmer.tools
Organization: Panix, NYC

In <RHARMON.92Dec10144328@triton.uucp> rharmon@uucp (Robert Harmon) writes:

>I got a System error: Can't read from device AUX'
>
>when running MSC 7.0 Windows Enhanced Debug Mode
>
>This happens if I try to resize the Solitate app.  The only other
>thing running is clock.
>
>Anyone know why Its got to read from AUX (when I didn;t ask it to).

Yeah, the debugging kernel has found some errors and wants to report it to
your debugging window.  If you run dbwin.exe (in c700\bin), that should
fire up a window that will receive the AUX output and report the errors for
you.  Incidentally, using the debugging kernel in conjunction with
dbwin.exe is an invaluable programming tool.  Not only does it report a lot
of otherwise unseen errors, but you can use the dbwin window to send trace
messages (a la DebugOutput(DBF_TRACE | DBF_APPLICATION, "trace message")).

-- Rob

(P.S. Don't be surprised that applications that work fine report errors.
I've found that most Windows programs overlook some subtleties of the
Windows API.  Also, if you've been wondering why the number of Free
Resources drops after running programs, dbwin can be used to report which
applications are allocating resources but forgetting to free them when
they're done.  It can give you a feel for how well programmed those
commercial packages that you bought really are.)

-- 
 Rob Ryan
    rryan@panix.com
Newsgroups: comp.os.ms-windows.programmer.tools
From: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: How to implement a Linked List 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Wed, 16 Dec 1992 19:03:08 +0000

In article <1992Dec16.062628.3410@nuscc.nus.sg> shah@cherry.NoSubdomain.NoDomain writes:

>Hi there!
>Does anyone out there knows how to implement a linked list for Windows using
>MS C7. I know how to do it in C but in Windows it look tricky. I think I may
>need to use the global heap with the GMEM_MOVEABLE flag but I not too sure
>of going around  doing it. Can anyone gave me some pointer, please. Any 
>source code sample is also appreciated. 
>
>Shahrin 
>E-mail shah@iss.nus.sg
>

If you're using Microsoft C7, you can implement a linked list in Windows
in exactly the same way you would for DOS - just use the standard run time
library "malloc" function.  If you use the large memory model (and there's
no reason not to, any more), "malloc" gets mapped onto calls to a pretty
good "sub-allocator".

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
| (Still awaiting inspiration              | CIX: cmarriott              |
|  for a witty .sig .... )                 | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
 
Newsgroups: comp.os.ms-windows.programmer.tools
From: rkenning@cc.curtin.edu.au
Subject: Visual Basic help needed
Organization: Curtin University of Technology
Date: Tue, 15 Dec 1992 05:49:25 GMT

I am currently writing an application in Visual Basic 1.0 and I am having 
trouble setting up a display window to display results and text in a formatted
manner.  I want to be able to have a scrollable form that will also allow
row/column selections as well as having different fonts and styles for the 
text.

Any suggestions on how to do this with VBasic 1.0 or recommendations of suitable
tools would be appreciated.

Thanks.

P.S. Does anybody know all the features that Visual Basic 2.0 offers

rkenning@cc.cutin.edu.au

Newsgroups: comp.os.ms-windows.programmer.tools
From: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: printing 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Fri, 18 Dec 1992 21:15:45 +0000

In article <1658@bdrc.bdrc.bd.com> jcl@bdrc.bd.com writes:

>How does one print using OWL?  The Borland documentation is very confusing
>to me (perhaps because I'm a windows newbie).  It seems to me that
>all I would need to do is instead of writing to a display context
>I would write to device context instead.  Windows should take
>care of everything else for me.  Thus, if I had a function that produced
>some output, I would send it a device context or a display context
>depending on where I wanted the output to go.  Am I being naive? 
>

That's exactly right.  Just write your drawing code to draw on a DC.
In most cases the code shouldn't care if it's drawing on the screen,
to a printer, a metafile, or whatever.  In the rare cases you DO need
to know, call "GetDeviceCaps" to find out.

>Another question is how to I get a device context?  The CreateDC function
>needs the driver name, the device name, and so on.  Why do I need to
>supply these things?  I just want output to go to the default printer.
>

The simple way in Window 3.1 is to use the printer common dialog box.  Just
call the "PrintDlg" function, and it returns you a DC.  Easy.

>Would some kind soul send me a minimal program to print the phrase
>"Hello, world!" via Windows?
>

I don't have any code to hand, but, in its simplest form all you do is:

    ... Get Printer DC from common dialog function .....

    StartDoc(....);
    StartPage(.....);

    ... draw to printer DC ....

    EndPage( ... );
    EndDoc( ... );

    DeleteDC( hPrinter );

If you have multiple pages to print, just have StartPage()/EndPage() around
each one.

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
| (Still awaiting inspiration              | CIX: cmarriott              |
|  for a witty .sig .... )                 | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
 
Newsgroups: comp.os.ms-windows.programmer.tools
From: steve@monu6.cc.monash.edu.au (Steve Balogh)
Subject: Re: unhelpful newgroup 
Keywords: post or email as answer
Organization: Monash University, Melbourne, AUSTRALIA
Date: Mon, 14 Dec 1992 06:41:25 GMT

In article <8H5kVB1w165w@cmm.ovum.ka.sub.org> cm@cmm.ovum.ka.sub.org (Christoph Mueller) writes:
>
>So pleeeze everybody:  post a summary of the email-answers you got, at
>least if your question was not a FAQ.

Better still... send your answers to the person who organises the FAQ!  :) :)

Regards,
         Steve

----_--_-_-_--_-__-_------_-__---_-___-_----_-____-_-_--__-_--_--___-_-_-_--__-_
Steve Balogh  VK3YMY   (Maths G.14)   | steve@monu6.cc.monash.edu.au
Monash University, Clayton Campus     |      37 54'38.8"S  145 07'47.1"E ...ICBM
Wellington Road, Clayton.  	      |      +61 3 565 4747 Voice (Office)
Melbourne, AUSTRALIA. 3168	      |      +61 3 565 4746 Fax
Newsgroups: comp.os.ms-windows.programmer.tools
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: Borland's RESource manager
Organization: Energy, Mines, and Resources, Ottawa
Date: Mon, 14 Dec 1992 01:00:10 GMT

In article <Bz7woH.M49@news.cso.uiuc.edu> duff@cs.uiuc.edu writes:
>I began making my first .RES file using the Toolkit last night, and I
>finished the "pretty" part of making it, but I'm having trouble understanding
>how to make one set of Radio buttons allow the user to ONLY choose ONE
>of five buttons.  What I mean to say is, I have five buttons, GROUPED,
>and I want the user to be able to choose one of them and have ONLY that one
>highlighted.  Do I have to do that from my calling program, or
>can I set that up in the .RES ?
	  1. give each one an ID (ID_RB1,ID_RB2,...ID_RB5)
	  2. in the DlgProc for the dialog box, handle the messages
	     as follows:
		case WM_COMMAND:
		  id=(int)wparam;
		  switch(id){
		    ID_RB1:
		    ID_RB2:
		    ID_RB3:
		    ID_RB4:
		    ID_RB5: CheckRadioButton(hdlg,ID_RB1,ID_RB5,id);
			    break;
>
>Also, I have another set of radio buttons that I want to be able to
>have the user choose any or ALL of them, depending on preferences.
>The same question applies to this: can I do this in .res or in my .cpp?

	You should not use radio buttons for this type of selection.
	Use checkboxes instead.  If you use BS_AUTOCHECKBOX, then
	the control will check & uncheck itself.  You only have to
	'read' the settings when you press OK to terminate the
	dialog box.  Here you will want to use IsDlgButtonChecked().

BTW, most of this stuff is in Petzold's "Programming Windows 3.1"
which is essential.  If you don't have it, get it.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Newsgroups: comp.os.ms-windows.programmer.tools
From: gregde@microsoft.com (Greg Demichillie)
Subject: Re: How to implement a Linked List 
Date: 17 Dec 92 17:54:20 GMT
Organization: Microsoft Corporation

In article <1992Dec17.084558.9832@nuscc.nus.sg> shah@cherry.NoSubdomain.NoDomain (Shahrin Abdullah) writes:
>In article <724532588snz@chrism.demon.co.uk>, chris@chrism.demon.co.uk (Chris Marriott) writes:
>|> In article <1992Dec16.062628.3410@nuscc.nus.sg> shah@cherry.NoSubdomain.NoDomain writes:
>|> 
>|> >Hi there!
>|> >Does anyone out there knows how to implement a linked list for Windows using
>|> >MS C7. I know how to do it in C but in Windows it look tricky. I think I may
>|> >need to use the global heap with the GMEM_MOVEABLE flag but I not too sure
>|> >of going around  doing it. Can anyone gave me some pointer, please. Any 
>|> >source code sample is also appreciated. 
>|> >
>|> >Shahrin 
>|> >E-mail shah@iss.nus.sg
>|> >
>|> 
>|> If you're using Microsoft C7, you can implement a linked list in Windows
>|> in exactly the same way you would for DOS - just use the standard run time
>|> library "malloc" function.  If you use the large memory model (and there's
>|> no reason not to, any more), "malloc" gets mapped onto calls to a pretty
>|> good "sub-allocator".
>|> 
>|> Chris
>|> -- 
> 
>The problem here is that malloc will map the memory allocation to the local
>heap. Thus if the node dynamically grow too large the local heap won't be
>able to handle that. So the question remain - how do U implement a linear 
>linked list using the Global Heap? Thanks Chris.
>

This is incorrect.  In versions prior to C7 malloc was implemented by 
allocating out of the local heap.  This is no longer the case.  In C7
malloc allocates larger blocks from the global heap and suballocates from
them.

You CAN just use malloc/free to do your linked list.


-Greg


-- 
Greg DeMichillie          
gregde@microsoft.com      -- All opinions are mine, not Microsoft's -- 
Newsgroups: comp.os.ms-windows.programmer.tools
From: ron@syacus.acus.oz.au (Ron Williams)
Subject: Re: BCW 3.1 IDE question
Organization: ACUS Australian Centre for Unisys Software, Sydney
X-Newsreader: TIN [version 1.1 PL6]
Date: Tue, 15 Dec 1992 06:04:41 GMT

Terry Traub (ttraub@world.std.com) wrote:
> Maybe a dumb question but this is really annoying me: BCC 3.1's BCW
> IDE is a wonderful edit-compile-debug environment, but it always
> repositions the cursor at the top of the file after a compile.  I've
> gotten to memorizing the line number and then paging back down after
> the compile.  What the hell am I doing wrong here?  This is
> ridiculous; I'm going back to BRIEF in a DOS window.
> 
> Terry
> 

I have a similar 'feature' in mine. Worse. When I finish a compile, click the
OK button for 'success' (if only :-), when I CTRL-TAB back to the last source
window (you get the message window whether there _are_ any or not), it dumps
me about 15% into the file, and the horizontal scroll bar is paged across, too.

AAAAARRRRGGGHHHHHHHHHHHHHHHHHHH............. whimper ....

ron.
--
Ron Williams                  ACSnet : ron@syacus.acus.oz
Ph : +61 2 390-1366         Internet : ron@syacus.acus.OZ.AU
Fax: +61 2 390-1391             UUCP : uunet!munnari!syacus.acus.oz.au!ron
Standard Disclaimers Apply
Newsgroups: comp.os.ms-windows.programmer.tools
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: printing
Organization: Energy, Mines, and Resources, Ottawa
Date: Sat, 19 Dec 1992 02:45:52 GMT

In article <1658@bdrc.bdrc.bd.com> jcl@bdrc.bd.com (John C. Lusth) writes:
>This question maybe a FAQ; if it is, I most humbly apologize and will
>wait anxiously for it to appear as it is not on site at the moment.
>
>How does one print using OWL?  The Borland documentation is very confusing
>to me (perhaps because I'm a windows newbie).  It seems to me that
>all I would need to do is instead of writing to a display context
>I would write to device context instead.  Windows should take
>care of everything else for me.  Thus, if I had a function that produced
>some output, I would send it a device context or a display context
>depending on where I wanted the output to go.  Am I being naive? 

	You're on the right track.  All you need is an hDC connected
	to either a printer or a client window.  For printing, use
	StartDoc/EndDoc and StartPage/EndPage around your code.
	See Petzold's book for details on how to do this.  You may
	also want a 'cancel' dialog box - this is all explained
	in his and other books as well.

>Another question is how to I get a device context?  The CreateDC function
>needs the driver name, the device name, and so on.  Why do I need to
>supply these things?  I just want output to go to the default printer.

	Use COMMDLG function PrintDlg() to get an hDC.  You can have
	it come up with the standard interactive display or you
	can have it just return an hDC for the default printer
	with no interaction.  Look at PD_RETURNDC (so it returns
	an hDC) and also PD_RETURNDEFAULT (for default printer,
	with no dialog box displayed).

My printing function looks like:
	void PrintMyPicture(HDC hdc,HWND hwnd);

so I can use it to process paint & print messages:
	case WM_PAINT:	hdc=BeginPaint(hwnd,&ps);
			PrintMyPicture(hdc,hwnd);
			EndPaint(hwnd,&ps);
			break;

	case WM_COMMAND:if(wparam==IDM_PRINT){
			  PrintDlg(&pd);
			  PrintMyPicture(pd.hDC,NULL);
			  DeleteDC(pd.hDC);
			}else{
			  ...
			}
			break;

Inside PrintMyPicture, I use hwnd to detect whether or not I
am drawing to the printer (hwnd==NULL) or if I am drawing to
the client area.  If I am drawing to the client area,
I use GetClientRect(hwnd,&rect) to get the dimensions of it and
if I am drawing to the printer, I use GetDeviceCaps(hdc,VERTSIZE)
(and HORZSIZE) to get the paper dimensions.  This assumes you
always want to scale your output to the printer page or client
area - it all depends on what you want to do.  With careful
planning, you can structure your code so the same routine
works for both.  I guess this is primarily for graphics - perhaps
it is more difficult for text (I don't do text, just pictures)
since you have to worry about scroll bars etc.  I dunno - maybe
it will work just as well.

Good luck.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
From: mills@athena.lkg.dec.com (George Mills)
Newsgroups: comp.os.ms-windows.programmer.tools
Subject: Re: Is there tool to write for Windows on C quickly?
Date: 18 Dec 92 02:04:22 GMT

agpro@numond.msk.su (Andrew M. Gershun) writes:

Try using Borlands OWL (Object Windows Library). Programs
are MUCH shorter and clearer (in my opinion).
From: agallagh@slate.mines.colorado.edu (GALLAGHER ANDREA J )
Newsgroups: comp.os.ms-windows.programmer.tools
Subject: Re: FYI : Zortech c++ bundle deal
Date: 16 Dec 92 23:07:23 GMT
Distribution: na
Organization: MercWorks, Denver
Replyto: ngorelic@speclab.cr.usgs.gov

simmons@cs.washington.edu (David Simmons) writes:
: I just received 2 offers from Symantec for the following bundle:
:  * Zortech c++ 3.1  dos / windows
:    -  includes 16- and 32-bit dos extenders
:  * MultiScope debugger 2.0
:  * Whitewater Resource Toolkit 3.0
: 
: One offer was for $249, the other was for $169, so if you're interested
: in the bundle you should demand the cheaper price :-)

The $169 is if you are already a registered Zortech user.

Noel (ngorelic@speclab.cr.usgs.gov)
From: liman@obelix.cpp.do.open.de (Arnd Liman)
Newsgroups: comp.os.ms-windows.programmer.tools
Subject: Re: Is here anyone using Visual Basic 2.0 ?
Date: 18 Dec 1992 17:57:21 GMT
Organization: News ausm Ruhrpott
NNTP-Posting-Host: obelix.do.open.de

johnf@scd.hp.com (John Flowers) writes:

>We are using VB 2.0 for product development.

>Yes, it is buggy. Yet the new features are needed so we are sticking
>with it.

Buggy? Can you tell us more?

Arnd
--
   __          _
  /  )       _//                       Mail Addr. liman@cpp.do.open.de
 /--/        /                                    Am Hartweg 106
/  (_ rnd   /___ iman                             D-4600 Dortmund 1
Newsgroups: comp.os.ms-windows.programmer.tools
From: lum@netcom.com (stacey lum)
Subject: Re: Is here anyone using Visual Basic 2.0 ?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Fri, 18 Dec 1992 06:36:07 GMT

johnf@scd.hp.com (John Flowers) writes:

>We are using VB 2.0 for product development.

I've noticed that too.  For example, after exiting from a compiled version of
VB/Win 2.0 that runs fine in the interpreted mode, Windows on my machine
crashed.  The standalone EXE for VB/DOS also crashed when I used the keyboard
instead of the mouse to make selections.

Has anyone else noticed other bugs with the latest release of VB?

Stacey Lum
lum@netcom.com

Newsgroups: comp.os.ms-windows.programmer.tools
From: scstech@solomon.technet.sg (Kenneth Soh)
Subject: Resource Help
Organization: Singapore Computer Systems Ltd
Date: Thu, 17 Dec 1992 17:35:25 GMT

Hi !

This is my first attempt to use a resource from a windows program.
I've created a dialog window using the Microsoft Windows' Dialog
Editor and I intend to use it in my program as a modeless dialog.

I am using the Microsoft MFC classes and I have inherited from
the CDialog a customised class of my own. The constructor of this
class then does a call to Create( <resource-dialog-name>, <parent
window> ). I then call SendMessage(WM_INITDIALOG) to force my
OnInitDiag() to execute.

I cannot manage to get the dialog window out and hence upon tracing
I realise that my Create() actually returns zero. The resource
cannot be loaded. Can someone advise ??

Many thanks.

Kenneth Soh
Singapore
From: moriarty@tc.fluke.COM (Jeff Meyer)
Newsgroups: comp.os.ms-windows.programmer.tools
Subject: Re: Is here anyone using Visual Basic 2.0 ?
Date: 18 Dec 92 18:52:56 GMT
Article-I.D.: tc.1992Dec18.185256.12173
Reply-To: moriarty@tc.fluke.COM (Jeff Meyer)
Organization: The John Fluke Mfg. Co.  /a.k.a. The Gizmonics Institute/

We're using it (VB Professional 2.0) for creating prototypes calling DLLs
and such stuff.  The major thing I've noticed is how many bugs have been
fixed that existed in VB 1.0 (VB controls not working as a DDE server if the
controls were inside a frame) and the VB 1.0 Professional Toolkit (all sorts
of 3D control bugs that existed) have been fixed in 2.0.  They also made
some very intelligent additions to the language and to the user interface.
I'm very pleased with it so far.

We've also been using VB-DOS Professional Edition 1.0, and the bugs I've
found with that puppy have *not* been much fun.  This also has the worst
documentation I've ever run into with a Microsoft product, which is saying
something.

                           "The whole subject area is rife with speculation
                            and half-baked ideas, some of which are my own."

                                           -- H. Finlayson
---
                                        Moriarty, aka Jeff Meyer
INTERNET:     moriarty@tc.fluke.COM
Manual UUCP:  {uunet, uw-beaver, sun, microsoft}!fluke!moriarty
CREDO:        You gotta be Cruel to be Kind...
                 **>> Keep circulating the tapes <<**