HDTenEightyP/NetNews huggingface dataset:
From: mpiet@is.morgan.com (Mark Pietrasanta)
Subject: M% in U,G,M - HELP!
Organization: Morgan Stanley - IS
Date: Tue, 17 Nov 1992 15:52:11 GMT

Okay.  I can get the User and GDI percentages, but I can't get the
Memory percentage.  This is what I'm currently doing:

        unsigned int UserP, GDIP;
        unsigned long MemP;
        MEMMANINFO lpmmi;

        UserP = GetFreeSystemResources(GFSR_USERRESOURCES);
        GDIP = GetFreeSystemResources(GFSR_GDIRESOURCES);
        lpmmi.dwSize = sizeof(lpmmi);
        MemManInfo(&lpmmi);
        MemP = ((lpmmi.dwMaxPagesAvailable*100)/lpmmi.dwTotalLinearSpace);

        wsprintf(resources, "U%02i G%02i M%02i\0", UserP, GDIP, MemP);

But this seems to be returning the percentage of free _contiguous_
pages, not total free pages.  I've tried the other pieces of the record
to no avail (all the ones with Total in them).

I thought I had it licked with this one, but NOPE!

Any help would be GREATLY appreciated, as I've run out of ideas.

Please e-Mail and I'll post the results.

Thanks,
Mark Pietrasanta - mpiet@is.morgan.com
* * * * * * * * *

"Great spirits have always encountered violent opposition from
mediocre minds." - Albert Einstein

----------------------------------------------------------------
Disclaimer: These responses are my own and in no way reflect the
            views of my employer.
----------------------------------------------------------------
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: messages from ComboBox
Organization: Energy, Mines, and Resources, Ottawa
Date: Mon, 23 Nov 1992 00:31:34 GMT

I have a dialog box with several simple combo-boxes with read-only
drop-down lists (i.e. if I click on a selection it pops up to the top as
the selected item).

*During* the dialog, do I have to process messages received from the
combo-boxes, i.e. do I have to:
	index=(int)SendDlgItemMessage(hdlg,id,CB_GETCURSEL,0);
to get the current selection or is it sufficient to just retrieve them all
(for each combo-box) at the end when OK is selected?  It doesn't seem
necessary to respond *during* the dialog, since the combo-box will pick the
selection and copy it to the top line as 'selected'.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
From: jan@nasobem.stgt.sub.org (Jan Schiefer)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: HELP with owner-draw buttons
Date: Sat, 21 Nov 92 0:19:31 GMT
Distribution: world

twbrown@PE-Nelson.COM (Tom W. Brown) wrote:
> The owner of the button responds to the WM_MEASUREITEM message to tell
> Windows how big the button is and responds to WM_DRAWITEM messages to paint
> the button -- you can do anything you wish to display the button, make it
> clear, any color, put text in it, etc.

While we're on topic, how can I create a bitmap for an owner-draw button,
which looks like an normal Windows button, but is empty? The problem here
is to get the 3D effect right. I suspect this is driver dependant.

Well, I might create an empty normal button of the same size and BitBlt its
bitmap to a memory DC, but there must be an easier way.

I guess everyone must have had this problem!?!

Jan

--
             Jan Schiefer, DL5UE, jan@nasobem.stgt.sub.org
                 "Oracle et laboracle!"   - Fritz Hohl
Xref: sparky comp.os.ms-windows.programmer.misc:3469 comp.lang.c++:16384
From: 890751r@dragon.acadiau.ca (Dave Ritacco)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.lang.c++
Subject: Help with Child Window
Date: 16 Nov 92 19:13:02 GMT
Organization: Acadia University

Hi. I am working on my thesis involving numerical simulation of chaos
and I wish to write some points to a child window of my main window.
I am not sure exactly how to do this: for a parent window, I just
found the display context(DC) and away I went. I can't seem to find
anything equivalent for the Child Window. I am sure this is simple, but
I can't seem to find any reference on how to do this. Any help appreciated.

please e-mail any responses to 890751r@dragon.acadiau.ca



-- 
************************************************************************
*        Dave Ritacco                Product of Acadia University      *
*           "Why don't you pull the trigger and find out?"             *
*        ritacco@otter.phys.uvic.ca                W.H.Bonney          *
Newsgroups: comp.os.ms-windows.programmer.misc
From: jstall@ih-nxt01.cso.uiuc.edu (Jeff Evan Stall)
Subject: Help with displaying 256 color bitmaps and drag and drop
Organization: University of Illinois at Urbana
Date: Mon, 16 Nov 1992 17:07:00 GMT

Keywords: bitmaps 256 drag help

I am making a program in Windows 3.1 using TPW 1.5 and BC++&AF 3.1 with  
Borland's Resource Workshop.  I can't figure out how to do these "simple"  
things:
* would like to display 256 color bitmaps from a resource.
* also would like to display 256 color 64x64 and 32x32 icons from a
  resource
* use 256 color bitmaps and icons in a dialog box (both "plain Windows"
  and "BorDLG")
* Implement drag and drop within a window- Like Excel or Word for Windows
  (All my documentation says how to do it with File Manager onto the icon)
* Background music- I have the source for WinPlay- but I can't compile it
  under BC++ 3.1.

Please e-mail any ideas to me.
Thanks for any help...

Jeff Stall
jstall@uiuc.edu
 
Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer,bit.listserv.win3-l
From: linz@cavebbs.welly.gen.nz (Lindsay Mathieson)
Subject: Re: Setting Up Dual Monitor Mode for BC++
Organization: The Cave MegaBBS, Public Access Usenet, Wellington, NZ
Keywords: mswindows
Date: Tue, 17 Nov 92 13:37:15 GMT

In article <BxtHrA.38J@news.iastate.edu> martin@iastate.edu (Martin R Calsyn) writes:
>In article <1992Nov15.211854.5971@cavebbs.welly.gen.nz> linz@cavebbs.welly.gen.nz (Lindsay Mathieson) writes:
>>In article <1992Nov13.014457.7671@msuinfo.cl.msu.edu> huangch@xenolith.cps.msu.edu (Cheng Chang Huang) writes:
>>>Can anyone give me some idea about how I can set up dual monitor mode for
>>>developing Windows Program with BC++?
>>
>
>>DOS just doesn't have decent dual monitor support like the mac (i
>> think). With windows their is the possibuility of better support though.
>
>Beg to differ.  Within the Borland development products, it works just
>as well in DOS or Windows.  I personally prefer running even BC under
>windows because of the better memory environment it seems to have there.
>
>-- 

I was thinking of generic monitor support, I've seem macks with two or more monitors, you just moved the mouse around and it flicked from one to the either like they were the same monitor, same happend for images. There is a similar product for windows, where you can hook upto 6 vga monitors, but it needs special hardware.
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: HELP with user draw buttons
Date: 17 Nov 92 22:46:57 GMT
Organization: PE-Nelson

In article <1992Nov17.025140.21367@riacs.edu>, ngorelic@speclab.cr.usgs.gov.cr.usgs.gov (Noel S. Gorelick) writes:
|> Talib K. Morgan (tmorgan@andromeda.rutgers.edu) wrote:
|> : I would like to create a user draw push button that would appear clear to the 
|> : user of the program until they click on that button.  Could someone tell if 
|> : this is possible.  The userbutton, to the user, would only appear to contain
|> : text.  It would be really nice if I could make the pushbutton any color that I
|> : chose.  Is this possible?
|> 
|> If its not in a dialog box, it is trivial...  Just put up a window where you
|> want it, with whatever you want in it, and no border...  It can be made
|> to appear transparent.  Then just process mouse messages.
|> 
|> If its in a dialog, you will need a custom control...  Outta my experence.
|> (If you are using borland, though, their custom controls allow this
|>  quite easily.)

In both cases I believe a BS_OWNERDRAW style button will do what you want
without having to handle mouse messages yourself in the first case or
having to build a complete custom control in the second (which, actually,
is really the same thing).

The owner of the button responds to the WM_MEASUREITEM message to tell Windows
how big the button is and responds to WM_DRAWITEM messages to paint the
button -- you can do anything you wish to display the button, make it clear,
any color, put text in it, etc.


----------------------------------------------------------------------------
Tom Brown               |  "'ow d'you know 'e's a king?
PE Nelson Systems       |            'cause 'e 'asn't got shit all over 'im!"
twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
----------------------------------------------------------------------------
Newsgroups: comp.os.ms-windows.programmer.misc
From: king@feline.uucp (KingLeon)
Subject: Suppressing WM_LBUTTONDOWN message when reactivating a window? 
Organization: Humber College Technology Dept.
Date: Sun, 22 Nov 1992 07:24:00 GMT

Language: Borland C++
Problem:  Suppressing a WM_LBUTTONDOWN message when reactivating a window.

I do have an inelegant solution to this problem involving two flags.
This is what I am doing:

   My main window has some buttons and list boxes.  When the window is
   activated by clicking on one of these then the selected items would
   change.  So I set a flag when the window is activated and the next
   LBUTTONDOWN is ignored.  Of course the window may be activated in
   other ways (selecting the nonclient area) or switching from the
   task manager, so I reset the flag so that the next LBUTTONDOWN is not
   ignored.  I have another flag which I set when creating the app so
   that the first LBUTTONDOWN will not be ignored.  The flags belong
   to a Window's extra memory words.

   What I'm trying to do is emulate proper Windows user interface behaviour.
   For example, clicking on a cell in an inactive spreadsheet will activate
   the spreadsheet, but not select the clicked on cell.  (Clicking again
   will do this.)  Ibid for a word processor, etc.  Clicking outside a
   menu to make it go away should probably not cause a selection (but it
   does do so in other apps that I investigated.)

   My approach is kinda kludgy, may be dependent on message order (and
   would therefore probably not translate well to NT or other systems.)
   I may also be missing cases.
  
   Is there a better way to handle this?

                                 
Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
From: andys@rruxc.uucp (25651-say)
Subject: TButton compiler errors... HELP!
Organization: Bellcore, Livingston, NJ
Date: Fri, 20 Nov 92 04:27:42 GMT
Followup-To: poster
Keywords: OWL TButton

Help!

   I have just recently started programming Windows using OWL with
Borland C++ 3.1.  I am trying to test out the TButton class for
use in a program of mine but keep running into a compiler error that
I am not sure of why I am getting it.
   Below is a header file that keeps giving me the error:
----------------------------------------------------------------------
#ifndef TCALCWIN_H
#define TCALCWIN_H
#include <owl.h>
#include <button.h>

#define ID_BUTTON1 102;

// Define the applications main window object TCalcWindow.
_CLASSDEF(TCalcWindow)
class TCalcWindow : public TWindow
{
private:
   TButton* PushButton;
public:
   TCalcWindow(PTWindowsObject AParent, LPSTR ATitle);
   LPSTR GetClassName(void);
   void GetWindowClass(WNDCLASS& AWndClass);
   virtual void HandleButtonPush(RTMessage Msg) = [ID_FIRST + ID_BUTTON1];
};

#endif

----------------------------------------------------------------------

I am getting the following two compiler errors on the HandleButtonPush
definition:

Error TCALCWIN.H 21: DDVT id missing ]
Error TCALCWIN.H 21: Declaration terminated incorrectly

Anyone know what is wrong??  I am going through the ObjectWindows Book and
on pages 76-79 shows the same type of thing I am attempting to do.  I have
looked at the source code for Step10 and have even cut and pasted the
class into my code with no luck.  So if anyone can inform me of what I
am doing wrong I would appreciate it.

Thanks,
 Andy

*******************************************************************************
*  Andy Say                        |  E-mail: andys@seas.bellcore.com         *
*  Bell Communications Research    |       I do not speak for Bellcore.       *
*******************************************************************************
Newsgroups: comp.os.ms-windows.programmer.misc
From: robertk@rkrajewski.lotus.com (Robert Krajewski)
Subject: Re: Printing using the new Windows 3.1 API
Organization: Lotus Development Corporation
Date: 18 Nov 92 16:17:18

In article <1992Nov18.012002.983@actrix.gen.nz> Peter.Hug@bbs.actrix.gen.nz writes:

   From: Peter.Hug@bbs.actrix.gen.nz
   Organization: Actrix Information Exchange
   Date: Wed, 18 Nov 1992 01:20:02 GMT
   Sender: Peter.Hug@actrix.gen.nz (Peter Hug)

   I have two problems with printing under Windows 3.1:

   1. Are there situations when an application must use "banding" for printing
      or is this something an application can descide if it wants to make use of
      this feature. If it is required with some printer drivers, how can this be 
      determined?

If you don't code for banding, Windows will do the banding itself.
This works, but might be a little slow or memory-hungry when imaging
large pages to "dumb" printers.

   2. When using "banding", the sequence of printer functions I invoke is:

      StartDoc(...);
      while( more pages )
	 {
	 StartPage(...);
	 Escape(..., NEXTBAND, paintRectangle, ....);
	 while(!IsEmptyRect(paintRectangle))
	    {
	    paintBand(..., paintRectangle );
	    Escape(..., NEXTBAND, paintRectangle, ....);
	    }
	 EndPage(...);
	 }
      EndDoc(...);

      Unfortunately, EndPage() always returns SB_ERROR! Is there a cure? If I
      dont use banding, everything works just fine!

I beleive that the EndPage is not needed. The 3.1 documentation for
NEXTBAND says you shouldn't use NEXTFRAME (now EndPage) after it.

Otherwise, your code looks fine. If the printer doesn't support
banding, then you'll just get one band, the entire page.

If you don't band yourself, Windows has to create a temporary page
image, and then send the whole thing down at once. This might cause
problems if you are low on memory. In fact, while the type of printer
affects whether you get more than one band, it's also possible to see
more bands in the loop you wrote above just by decreasing the amount
of available memory !
From: muffy@remarque.berkeley.edu (Muffy Barkocy)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: using global memory for controls
Date: 18 Nov 92 23:10:03 GMT
Organization: Natural Language Incorporated
NNTP-Posting-Host: remarque.berkeley.edu


This is posted for a co-worker.  Please send all replies to:

paul@nli.com

Creating control windows uses memory from the local heap.  Because the
local heap + stack + static variables is limited to 64k, the number of
windows you can create is limited.

Is there any way to cause Windows to allocate memory for a control
window from the global heap instead of the local heap?

Our specific situation: we use CreateWindow to create a (large) number
of edit controls in a dialog box. The controls are actually children of
a subwindow of a subwindow of the dialog box (i.e., they are two levels
down in the window hierarchy) Eventually, depending on local memory use
by other parts of our program, the CreateWindow fails when LocalAlloc
runs out of memory.

I do not believe that using the DS_LOCALEDIT style matters (we are not
using it). The problem seems to be with memory for the control, not
memory for the text buffer. I also do not think this problem is specific
to edit controls - I think it applies to all controls.

Our temporary solution is to make sure as much local heap is available
as is possible. A better solution would be to get Windows to use memory
from a data segment other than DGROUP. Is this possible???

--

Muffy Barkocy                               muffy@mica.berkeley.edu
~Weavers' fingers flying on the loom/patterns shift too fast to be
 discerned/all these years of thinking/ended up like this/in front
 of all this beauty/understanding nothing~ - Bruce Cockburn
Newsgroups: comp.os.ms-windows.programmer.misc
From: bower@hfsi.uucp (Michael Bower Comm. )
Subject: Visual Basic Desktop Question (version 1 and 2)
Reply-To: bower@hfsi.UUCP (Michael Bower Comm. )
Organization: HFSI, McLean VA.
Distribution: usa
Date: Fri, 20 Nov 1992 13:19:06 GMT

I have a VB question for the net:

I version 1.0 of vb there was a method or a setting where you could tell
vb to open with the desktop cleared or with all your other windows showing
behind the vb windows.  It was an obscure setting that we discussed on
this net some time back.

Well, I have installed vb 2.0 and can't find that setting.  Could someone
please refresh my memory as to how to make that setting?

Thanks in advance.

Michael Bower
bower@hfsi.com
From: aew@eosvcr.wimsey.bc.ca (Alan Walford)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: CommonView vs. C++/Views
Date: Thu, 19 Nov 92 08:26:24 -0800
Reply-To: aew@eosvcr.wimsey.bc.ca
Organization: Eos Systems Inc, Vancouver, B.C., Canada

In <1992Nov18.175123.25365@wes.on.ca> tomh@wes.on.ca (Tom Haapanen) writes:
>We're looking at both of these packages, and both look potentially quite
>attractive.  It's impossible to tell, though, whether they're bug-free,
>comprehensive and well-supported without actually using them for something
>non-trivial.

>If you've used either (or better yet, both) of these packages, could you
>describe your experiences?  Incomplete APIs, bugs, tech support, anything
>else that's important?

We use C++/Views extensively here. We like it quite a bit and would never consider
doing Windows programming without it (if using C++).

What I like most about C++/Views is the OO abstractions. It has a good design
(but might seem strange to an experienced Windows programmer).  It has a very
Smalltalk like design.  We have found a few bugs in the classes (mostly in older
versions). So far this new version has not given us much trouble.

Support of C++/Views by CNS (the orginator) was fantastic. That's what happens when
you deal with a small company. The new owners, Liant, are supporting it but they just
do not have the knowledge that the CNS people had.

If I can say anything negative about C++/Views that would have to be regarding its
documentation. The docs are a good try but just not complete enough.  There are
just a few too many assumptions made on the part of the authors. It is kind of like
reading the Windows API docs only and doing Windows programming from that.

All I know about CommonView is that I played with a very old version of it a while
back. It was buggy and it did not do what I thought was logical. I hear the new
version is much better. Do NOT use the Glockenspeil C++ compiler with it even though
the vendor suggests that is best. This is a poor compiler and very buggy. I think
the new CommonView can work with MSC.

Al

-- 
Alan Walford     Eos Systems Inc., Vancouver,B.C., Canada  Tel: 604-734-8655
aew@eosvcr.wimsey.bc.ca           OR        ...uunet!wimsey.bc.ca!eosvcr!aew  
Newsgroups: comp.os.ms-windows.programmer.misc
From: nelson_p@apollo.hp.com (Peter Nelson)
Subject: Re: subclassing dialog controls, Winsight problem
Date: Fri, 13 Nov 1992 15:11:12 GMT
Organization: Hewlett-Packard Corporation, Chelmsford, MA
Keywords: subclass subclassing winsight 

In article <1992Nov12.221113.11064@muug.mb.ca> gbrandt@muug.mb.ca (Gregor Brandt) writes:
>Help! :-)
> 
>  I am also having problems with winsight.   I have a program I wrote that
>appears to run perfectly.  Except that everytime I run winsight with 
>the programs window active (or if I activate while winsight is
>running)  I get a General Protection Fault at 0001:xxxx.  Any ideas would
>be greatly appreciated.


   I had this problem, too.   I don't recall the exact details since
   I'm posting this from work and all my Windows stuff is at home, 
   but the solution involved changing the prolog/epilog setting.
   When I sent my example program to Borland they tested it and
   acknowledged they had a bug but that was the last I ever heard
   from them (this was last summer).

---peter


Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: when my windows app croaks, should I re-boot DOS too?
Organization: Energy, Mines, and Resources, Ottawa
Date: Sat, 21 Nov 1992 00:04:52 GMT

While developing my Windows apps with Borland C++ 3.1, occasionally I get
UAEs (or whatever they're called now) and sometimes I just go into the weeds
(well perhaps, more than occasionally).  Once I fix the problem, I usually
restart Windows and carry on again.  I do this just to make sure in case I
have corrupted Windows.

The question is - should I also re-boot DOS when this happens?  Does Windows
have any sort of barriers between my app and DOS?  I'm using Windows 3.1 and
DOS 5.0.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
From: Jeff Dean <jeff@igc.apc.org>
Newsgroups: comp.os.ms-windows.programmer.misc
Date: 19 Nov 92 20:14 PST
Subject: Re: Memory Management question
Nf-ID: #R:1992Nov19.181616.15025@inmet.cam:1531151157:cdp:1668700013:000:106
Nf-From: cdp.UUCP!jeff    Nov 19 20:14:00 1992


Running in protected mode, there is no problem in storing pointers
to data.

	Jeff Dean
	jeff@igc.apc.org

Newsgroups: comp.os.ms-windows.programmer.misc
From: johnrp@well.sf.ca.us (John Panzer)
Subject: DLLs using cout,cin,cerr blow up
Organization: Whole Earth 'Lectronic Link
Distribution: na
Date: Fri, 20 Nov 1992 08:47:31 GMT


The title just about says it all.  When I put code that uses the
standard streams cout, cin, or cerr into Windows DLLs & compile
with Borland, the DLL generally crashes the system upon unloading
(under 3.0) or generates a mysterious fault (3.1).  It seems to
be due to stack overflow (looks like a very small system stack
is being used).

Why would these streams appear in a Windows program in the first
place?  Well, my problem appeared in a third-party library which
used cerr for critical error messages.  I didn't even know it
was there until I traced through the shutdown code & saw the
destructors...

The problem has been solved by getting rid of all references to cerr.
Bottom line, it seems that static objects with destructors in DLLs
are a Bad Idea.

John Panzer
johnrp@well.sf.ca.us