HDTenEightyP/NetNews huggingface dataset:
Newsgroups: comp.os.ms-windows.programmer.misc
From: I.T.Marsh@man0507.wins.icl.co.uk (I.T.Marsh)
X400-Received: by mta eros.uknet.ac.uk in /PRMD=UK.AC/ADMD=GOLD 400/C=GB/;
               Relayed; Tue, 1 Sep 1992 12:07:07 +0100
X400-Received: by /PRMD=icl/ADMD=gold 400/C=GB/; converted (ia5); Relayed;
               Tue, 1 Sep 1992 12:00:05 +0100
X400-Originator: I.T.Marsh@man0507.wins.icl.co.uk
X400-MTS-Identifier: [/PRMD=icl/ADMD=gold 400/C=GB/;man0507 0000006700000047]
Original-Encoded-Information-Types: undefined
X400-Content-Type: P2-1984 (2)
Content-Identifier: 47
Subject: re: PETZOLD's COLOR PROGRAM AFU??
Date: Tue, 1 Sep 1992 11:18:21 +0000







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 t
o

>>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.
>>
>>I have checked and double checked the code and cannott see any area from
>>typing in the code, and I can't see anything obvious wrong with the
>>masters code.
>
>>I am using BC++ 3.1 and would greatly appreciate any help.
>
>>Thanks.
>>David.
>
>I have solved the problem by Calling DeleteObject with the handle returned from

>the SetClassWord call. (Thus Calling DeleteObject after Setting the background
> brush to a new value-- Opposite of the way given in the book)

>I have two ideas why this fixed the problem and I wonder
>If some kind soul could tell me which one it is and why.

>1. DeleteObject cannot use the value returned from GetClassWord for some reason
.

>        (Even after various casts)

>2. The online help for DeleteObject says not to delete something that is
>selected into a device context.  Is the background brush in the register
> class call selected into a device context by windows?

>3. For some reason, the handle for the background brush in the window class
>data structure cannot be used to delete the object pointed to.

>Any insights would be greatly appreciated.
>Thanks.
>David.

Thanks David, for the info provided above. We have had trouble tracking a
memory leak and it turned out that the problem above was one of the main 
culprits. The solution worked for us too.

I have found, however, that I can't recreate this problem when I run my
program or the colors program from Petzold under Windows 3.0. The problem
happens every time under Windows 3.1. This would tend to suggest that our
friends Microsoft have made some sort of underlying change with the release
of Windows 3.1. (I am using Borland 3.0).

Thanks again, Tom.
Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
From: whedon@netcom.com (Bill Whedon)
Subject: Queries under CodeBase 4.5 for Windows
Date: Thu, 03 Sep 92 18:37:12 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Followup-To: poster
Keywords: CodeBase Windows Queries

I'm having a bit of fun with CodeBase 4.5 at the moment, trying to figure
out (in the absence of example code) how to do the following:
I have a database with customer records and sales info
I want to do the following selection:
   SALES_DOLLARS > 1000 AND CREDIT_AVA >= 10000
And build a new .DBF file from the result
Well, gee, it's not really obvious how to do something like this from the 
total lack of similar examples in the documentation and online.  To make
matters worse, my Telebit 1000 refuses entirely to talk to Sequiter's BBS,
and I don't have a CIS ID!  They don't seem to want to answer their CIS ID
when I send to them via Internet, and the support dude I spoke to, while
sympathetic, (he did solve one problem for me), only volunteered to goose
the CIS-watcher into action to maybe send me an example.  That was some
hours ago, and (NOTHING...)

So, tell me, has anyone out there accomplished anything like this with CB 4.5
and, if so, would you please share it?
Thanks,
Bill Whedon   whedon@netcom.com
Newsgroups: comp.os.ms-windows.programmer.misc
From: aa596@cleveland.Freenet.Edu (Peter Haller)
Subject: Re: invalid window
Reply-To: aa596@cleveland.Freenet.Edu (Peter Haller)
Organization: Case Western Reserve University, Cleveland, OH (USA)
Date: Sun, 23 Aug 92 19:26:38 GMT


In a previous article, ppc1@cec1.wustl.edu (Peter Pui Tak Chiu) says:

>dear programmers,
[stuff deleted]
>
>also, would anyone tell me how i can determine the size of the window (the
>height and width) at runtime?
>
>thanks a lot in advance!!!
>
>
>peter

Use the GetClientRect() and GetWindowRect() to determine the size of the
client area and the Windows respectively.

PCH

-- 
Peter C. Haller				|	'If you do what you
Lorain Products				|	have always done,
aa596@cleveland.Freenet.Edu 		|	expect what you have
"Are we having fun yet?"		|	always received.'
Newsgroups: comp.os.ms-windows.programmer.misc
From: blakeco@microsoft.com (Blake Coverett)
Subject: Re: Mixing Windows API code & MFC
Date: 27 Aug 92 22:32:40 GMT
Organization: Microsoft Canada Inc.
Distribution: na

In article <1992Aug26.044944.11302@csus.edu> vpcsc7@sfsuvax1.sfsu.edu (Dan Tauber) writes:
>{
>DLGPROC lpfnAbout = (DLGPROC) ::MakeProcInstance(
>				   (FARPROC) ::AboutBox, hInst);
>::DialogBox(hInst, "DT_ABOUT", m_hWnd, lpfnAbout);
>::FreeProcInstance((FARPROC)lpfnAbout);
>}
>
>hInst is a global handle that I initialize with the
>AfxGetInstanceHandle() function when the program starts.  m_hWnd
>is the CWnd member function that holds the handle to the window.
>I also export the AboutBox funtion in the def file.

By rights your second use of hInst (in ::DialogBox) should be 
AfxGetResourceHandle(), but in practice unless you are doing something
creative (like loading resources from a DLL) these values should be the
same so I doubt that is a problem.

The rest looks fine to me so I would guess the problem is in ::AboutBox; 
perhaps returning garbage instead of FALSE if you don't handle the message?  

The big question is, why not just use MFC:

{
	CModalDialog about("DT_ABOUT", this);
	about.DoModal();
}

will do nicely if you have a 'normal' About box.  No dialog proc needed.

-Blake
-- 
#include <std/disclaimer.h>                       blakeco@microsoft.com
Mail Flames, Post Apologies.                      ...!uunet!microsoft!blakeco
Newsgroups: comp.os.ms-windows.programmer.misc
From: heathh@cco.caltech.edu (Heath Ian Hunnicutt)
Subject: Re: NotifyRegister() question
Organization: California Institute of Technology, Pasadena
Date: Thu, 27 Aug 1992 23:31:03 GMT

sdj@franz.com (Steve D. Jacobson) writes:

>I would like to invoke WinExec() and then wait in a temporary GetMessage()/
>DispatchMessage() loop until the application invoked by WinExec() terminates.

>I am trying to use the toolhelp DLL NotifyRegister() function to do this.

>By looking for a NFY_EXITTASK notification, I can tell that some application
>has completed, but I can't tell that it's the one I'm interested in. The
>other things I've tried, like looking to see if the NFY_DELMODULE handle
>matches the return value I get from WinExec(), don't work.

	When you get the NFY_EXITTASK notification, one of the parameters
that is sent to your notification callback is the handle of the exiting
task.  You should check to see if this parameter matches the return
value from WinExec().

	One final note:  You will probably want to store the return value
from WinExec in some sort of global variable.  That is fine, but often
when your notification callback gets called, you will be on someone
else's stack and in someone else's DGROUP.  So, you will probably
want to cpmpile your program in large model, so that your
references to the global variable will be via FAR pointers.
As an alternative, you could use a DLL.


-- 
On Saturday, April 18, 1992, this .sig became self-aware.

Newsgroups: comp.os.ms-windows.programmer.misc
From: heathh@cco.caltech.edu (Heath Ian Hunnicutt)
Subject: How to use StackTraceCSIPFirst() ??
Organization: California Institute of Technology, Pasadena
Date: Thu, 27 Aug 1992 23:35:21 GMT

Hello,

	At one point in my program, I'd like one of my callback functions
to trace the stack, and thereby find out where it was called from.
My question is, how do I do this?

	I presume that StackTraceCSIPFirst() is the function I
want, but I have no idea what to use for the CS and IP values.
After all, they are by definition changing even as I store them.
Should I figure out what the CS,IP is on the stack (pushed there
by the preceding caller) and use that?

Thanks,
Heath

-- 
On Saturday, April 18, 1992, this .sig became self-aware.

Newsgroups: comp.os.ms-windows.programmer.misc
From: edd151s@nella1.cc.monash.edu.au (Mr I.P. Rayner)
Subject: How do I create .hlp files?
Organization: Monash University, Melb., Australia.
Date: Fri, 4 Sep 1992 01:59:51 GMT

Does anyone know of a program or a method to create a hypertext file 
compatable with winhelp?

(Obviously I'd like to be able to access winhelp from the program Im writing,
in visual basic)

Ivan Rayner
From: din@gradient.cis.upenn.edu (Clarence Din)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Showing files with no extensions?
Date: 1 Sep 92 20:25:25 GMT
Organization: University of Pennsylvania

Question: I can use a *.TXT file spec to show files with a .TXT
extension, but how do I show only those files that have NO extension?
---------------------------------------------------------------------------
Clarence K. Din
Programmer/Analyst II, Language Analysis Center, University of Pennsylvania
din@gradient.cis.upenn.edu
---------------------------------------------------------------------------
"I have my toys (D-50, SR-16, TG-16 with CD-ROM, SNES, Genesis, HP48SX)
 and you don't!  Nyah!!!"
From: mik@id.dth.dk (Michael Kishinevsky (921231#JST))
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Needs: True Type font format
Keywords: True Type Font
Date: 26 Aug 92 08:50:12 GMT
Organization: Department of Computer Science

Could anybody give an advice where to get
an information on formats of True Type font 
for MS Windows 3.1. The friend of mine from
St.Petersburg (Russia) needs to know the content
of font's bytes.

Thanks in advance.
From: herzogs@ucs.orst.edu (Stephen Herzog)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Novell IPX calls
Summary: How do you do it?
Date: 1 Sep 92 20:48:56 GMT
Article-I.D.: news.Btx35M.Crr
Organization: University Computing Services - OSU


Greetings,

I am currently working on a windows application that will run under
Novell.  I have a few calls in it to make use of IPX, and I am having a
bit of a problem.  I have written my own toolkit for pascal that
seems to work well under DOS, but only some of the functions work for
windows.  An example of this is the GetLocalTarget function that 
is supposed to return the network address of an intermediate network ect.

To do this I set up a register with 
     BX = 02h 
     ES:SI = pointer -->DestinationAddr
     ES:DI = pointer -->ImmediateAddr
	 
     Do interrupt 7A

     TransportTime = CX 
     result_code = AL 

under dos, this works fine.  Windows takes about a minute to return 
a result of 250, or network unreachable.  

I am guessing that there is something about windows that messes this up,
but I don't know what.  The Open and Close sockett functions seem to be 
ok, but this, and Send Packet seem to be crashing.

Could some kind soul tell me what I need to do to make this work, and/or
point me to information that will assist me.  I would rather FTP some
documentation, however I will buy a book if necessary.   All of the
above stuff for DOS I worked out of Charles G. Rose's book but I am 
beginning to see that this book is quickly becomming outdated.  

Any information would be greatly appreciated.

Stephen Herzog
Herzogs@ucs.orst.edu
From: jere@uta.fi (Jere K{pyaho)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Error Code -5
Date: 3 Sep 92 20:05:04 GMT
Organization: University of Tampere, Finland

In article <UedWMNq00UhWA2T31y@andrew.cmu.edu> dh4h+@andrew.cmu.edu (David A Hanekamp) writes:
>I'm getting a dialog box that pops up and says "Error code = -5 Ok to
>proceed", whenever I try to bring up one of my dialog boxes in BC++ 3.1.
> Does anyone know what causes this?
>
>   Dave

It seems that this is just about the first thing that anyone sees of OWL!
It is an OWL error code which means that a window's Create() call didn't
quite make it. With dialog boxes, you have most probably misspelled the 
name of your dialog in the TDialog constructor's 'AName' parameter.
Happens to everyone, and takes some time to figure out.

Check out the "OWL User's Guide", Chapter 18, under "EM_XXXX constants".

Hope this helps,

Jere
-- 
/* Jere K{pyaho -- jere@kielo.uta.fi -- University of Tampere, Finland */
/* Department of Translation Studies -- Department of Computer Science */
From: pwt@otter.hpl.hp.com (Peter Toft)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Using OWL DLL
Date: 27 Aug 92 12:11:45 GMT
Organization: Hewlett-Packard Laboratories, Bristol, UK.

Try changing the case sensitive link options in options|linker|settings.  This
fixed a similar problem for me.

Peter.
From: gordy@endor.uucp (Robert Gordy)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: OWL Edit Window
Date: 31 Aug 92 19:02:37 GMT
Article-I.D.: das.1992Aug31.190237.4844
Organization: Aiken Computation Lab, Harvard University

Does anyone know an easy way of creating an edit window
with > 64K of memory for the data.  I know that
Petzold describes a way to get an edit control to have
more than 64K, but I'm using OWL and would like to
have OWL do most of the dirty work.

I think I should use the TEditWindow class, but I'm
not sure how to get the extra big data area.  I've
also thought about creating a dialog box with a menu
and a single multiline edit control but I think that
this is basically the same as the TEditWindow.

Thanks in advance for the help.

Rob Gordy
Newsgroups: comp.os.ms-windows.programmer.misc
From: death@acca.nmsu.edu (The Grimm Reaper)
Subject: Re: ole
Organization: New Mexico State University
X-Newsreader: Tin 1.1 PL5
Date: Sun, 30 Aug 1992 02:25:37 GMT

I. Timmermans (timmer@dutiag.tudelft.nl) wrote:
: I'm looking for information on programming OLE applications for
: Windows. More specific; I'm looking for the source code of a
: sample OLE client application which is a bit less complicated
: than the CLIDEMO sample of the SDK. I would like to know what the 
: minimum is one should do to support a bit of OLE.

I would suggest checking out the latest OLE spec from cica.  That helped
me, even though (I don't think) it doesn't include examples.
--
"Only sheep need a leader." - Nomeansno

death@acca.nmsu.edu

Newsgroups: comp.os.ms-windows.programmer.misc
From: luckas@cs.tu-berlin.de (Ulrich Luckas)
Subject: Win 3.x / COM Bug?
Organization: Technical University of Berlin, Germany
Distribution: comp.os.ms-windows.programmer.misc
Date: Sun, 30 Aug 1992 05:44:13 GMT


Writeing a terminal program I ran into a problem. Everything works
just like it is supposed to up to 9600 baud! Baudrates higher than
that display correctly, but lock up the system while either processing
wm_Key(Up/Down) messages or while sending those scancodes to the
COM-port.

Is there a known COM port bug/bug fix or should I just review my code?

Pleas E-Mail replies as I don't read news too often.

Many thanks
 Uli
(luckas@cs.tu-berlin.de)
From: ken@cs.UAlberta.CA (Huisman Kenneth M)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: MSC++ 7.0 large model compiling
Keywords: Microsoft C/C++ 7.0 arrgh
Date: 4 Sep 92 02:34:30 GMT
Organization: University of Alberta, Edmonton, Canada

I am having trouble getting a windows program I am writing in C++ with the
microsoft foundation class library to compile properly with the large
model stuff.

If I compile it with /AS ( small model ) and link the libw, safxcwd, and
slibcew libraries to my code it compiles and runs perfectly.

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.

Anyone know what I am doing wrong?
( it must be right in front of my nose but i cant see it!  arrgh)

PS.  Im looking for a dos version of GNUpatch.  anyone know where i can
find one?  How about a grep utility that will recursively go through
directories looking for the requested string ( as opposed to being limited
to the current directory).

( yea, im one of those odd people who hates gui based development environments
like PWB...:-)

Ken
From: lincoln@think.com (Lincoln Marta)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Exchange Data between Excel and My Program ?
Date: 3 Sep 1992 16:14:53 -0400
Organization: Thinking Machines Corporation



Is it possible to interface my own Windows program with the
database utilities offered in Excel for Windows and to run
Excel in the background (i.e. not seen)?????

The application that I'm writing makes use of a great deal
of data that must be able to be updated without directly
interfacing with the actual program.  For example:

A doctor who owns a small practice keeps all his/her 
data on an Excel spreadheet.  Data may include:
Patient weight, height, illness, treatment, ...

The doctor utilizes the program to enter a search
criteria. For example he/she wants to know about
patients that weigh over 185lbs who suffer from
diabetes.  The program then puts this search
criteria into a variable/s and then executes
some macro-like function to execute the search in
Excel.  Then store the matching criteria into
variable/s and port them back to the main program which
the doctor uses.

I know that Excel itself can do this, but I need 
Excel to be invisible to the user, except for
database data entry.

In summary, I would like to be to:
1. Take search criteria variables from main program, and
2. Use these variables with functions inside Excel's database,
3. to return information from Excel back to the program.

	and then go outside and play.(Joke)

Thanks in advance,
Please send responses to:

lincoln@Think.Com
"I really don't make these questions up."
From: marcusj@apricot.co.uk (Marcus Jenkins)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: App./TSR needs to know that a DOS session has focus - How?
Date: 25 Aug 92 09:36:42 GMT
Organization: Apricot Computers Limited

I have an app./TSR/DLL (and VxD for Enhanced Mode) system supporting
some special hardware.  I want (at least) one of these components
to be notified or find out by polling (and the latter would have to
be a re-entrant service since I would be polling off a harware IRQ)
that a DOS session is becoming active/inactive or is active.  How?

Thanks in advance.

 _ _ _
' ) ) )                         Internet: marcusj@apricot.co.uk
 / / / __.  __  _. . . _        UUCP: marcusj@apricot.uucp
/ ' (_(_/|_/ (_(__(_/_/_)_      If all else fails from US, try:  
Marcus Jenkins                  apricot!marcusj@relay.EU.net
Tel: +44 21 472 3002  Fax: +44 21 471 2935
Disclaimer:  Anything I wrote above is, of course, my own view and
             does not in any way represent my employer.
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
Subject: Re: Question about Listbox 64K barrier
Date: 26 Aug 92 18:14:31 GMT
Followup-To: comp.windows.ms.programmer
Distribution: usa
Organization: PE-Nelson

In article <k+bn2wq.sam@netcom.com>, sam@netcom.com (Samuelson S. Rehman) writes:
|> 
|> I'm a M2 UNIX programmer and programming in MS Windows is pretty new to me.
|> 
|> I'm writing a program that can allow a user to select a record from
|> a listbox. Now this list of record can easily exceed the 64K barrier.
|> So my questions are:
|> 
|> 	1. How can I interrupt the user when he's trying to scroll down/up,
|> 	so I can load the next/prev 64K segment from the file ?
|> 
|> 	2. And even if that can be done, how do I maintain the scrollbar to
|> 	show the position of the bar within the whole database, but not
|> 	just within the 64K segment ??
|> 

Both of these concerns can be addressed by using an "OWNERDRAW" listbox.  Check
the documentation for CreateWindow with regard to the LBS_OWNERDRAWFIXED or
LBS_OWNERDRAWVARIABLE styles.

In a nutshell, these styles allow you to have a listbox where Windows does
not need to store strings for each item in the list, rather a message is
sent back to your application whenever a list item needs to be displayed (c.f.
WM_DRAWITEM) allowing you to perform whatever file/memory buffering you
desire.

|> 	3. If that is totally impossible, can anyone tell me where can
|> 	I find information (books maybe) about writing a widget ( or
|> 	whatever it's called in MS Windows ) ?

The definitive documentation is probably the SDK (Software Developer's Kit)
manual set from Microsoft Press, but there are plenty of books available that 
do a better job of "teaching" windows programming -- one of my favorites has
always been Charles Petzold's book.

Good luck,


----------------------------------------------------------------------------
Tom Brown               |  "Strange women, lying 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: JRBANGA@poppy.ucdavis.edu (JULIO RODRIGUEZ BANGA)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Sorry, test
Date: 23 Aug 92 21:16:28 GMT
Organization: University of California, Davis
X-News-Reader: VMS NEWS 1.20

Sorry, this is a test.
Newsgroups: comp.os.ms-windows.programmer.misc
From: tfj@apusapus.demon.co.uk (Trevor Jenkins)
Subject: Which to use WM_CHAR or WM_PAINT?
Distribution: world
Organization: Job hunters use Parachute
Date: Thu, 3 Sep 1992 22:30:47 +0000

[My apologies if this an FAQ but I haven't seen it discussed ANYWHERE.]

My application is supposed to accept keyboard input and then place the text
characters in the client area of the window at the same position as the
mouse cursor. [Basically I'm labelling a directed graph interactively.]

Nowhere in the SDK documents or in Conger's API bible have I seen any
discussion of where the characters should be processed. In the 3.1 SDK
there is a page and a half on how to handle keyboard input via the WM_CHAR
message but the example only demonstrates that there might be a reason to
filter out the TAB character. The examples for WM_PAINT all assume that
text is being output from a string.

If anyone can offer advice upon how to proceed with echoing characters
being typed onto the client area I'd appreciate some help.

-------------------------------------------------------------
Trevor Jenkins                                   Radio: G6AJG
134 Frankland Rd, Croxley Green, Rickmansworth, WD3 3AU
email: tfj@apusapus.demon.co.uk
phone: +44 (0)923 776436

Newsgroups: comp.os.ms-windows.programmer.misc
From: hardiman@csd4.csd.uwm.edu (Paul V Hardiman)
Subject: Actor 4.0 for sale
Originator: hardiman@csd4.csd.uwm.edu
Organization: Computing Services Division, University of Wisconsin - Milwaukee
Distribution: usa
Date: Sat, 29 Aug 1992 20:07:09 GMT


For Sale:

Actor 4.0 Professional.  Package has been opened and browsed, but never
installed and never registered.  Registration card included with disks.

Price: $125

Paul Hardiman
hardiman@csd4.csd.uwm.edu
work phone: (414) 229-6648
home phone: (414) 961-0112
Newsgroups: comp.os.ms-windows.programmer.misc