HDTenEightyP/NetNews huggingface dataset:
From: baldwin@csservera.scs.usna.navy.mil (J.D. Baldwin)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How many children does this window have?
Date: 31 Jul 92 01:37:05 GMT
Organization: Comp. Sci. Dep't., U.S. Naval Academy, Annapolis, MD


This is something that ought to be REAL simple, but I just can't figure it
out.  I am using ObjectWindows with Borland C++ 3.0 to develop a Windows
3.1 application.  To summarize:    I want a simple way to tell how
many children a window has, or, better, simply whether or not that
number is zero.

In function CanClose() of my application's main window, I wish to check
whether the window has any children before asking whether the user is sure
he wants to close the window.  That is, the window will close immediately
if there are NO children; but a MessageBox will ask "Are you sure?" if there
are any children.

I thought I'd just do the following (in CanClose()):

   PTWindowsObject kid;

   kid = GetFirstChild();

   if (kid != NULL)
   {
      /*  DO MESSAGEBOX HERE */
   }
   else
      return TRUE;

This works fine if there are children, but causes a general protection
fault if there are no children.  Why?  Well it seems that GetFirstChild()
is an inline function that returns, simply:

     ChildList -> SiblingList

If there are no children, ChildList is NULL.  (Is this brain-dead,
or what?  A call to GetFirstChild() when there are no children will
always cause a general protection fault since it dereferences NULL.)

"So," I hear you saying to yourselves, "if ChildList is NULL when
there are no children, then why not just test (ChildList != NULL)?"  An
excellent idea, but thanks to the data-hiding instincts of the same
software designers who gave us the bug described above, ChildList is a
private data member of TWindowsObject.

The only thing I can think of is to use ForEach() on a pointer to a function
whose only purpose is to increment a counter; this will return a count
of the child windows.  However, this is a gross kludge and, for all I know,
ForEach() suffers from the same idiotic bug as GetFirstChild().

So, does anyone out there have the simple answer?  If you do, please post
*and* e-mail me at baldwin@spectrum.lanl.gov, as my access to my normal
mail machine and news-reading machine is unreliable at best (it requires
a 3000-mile telnet connection).
Newsgroups: comp.os.ms-windows.programmer.misc
From: evansj@crs.cl.msu.edu ()
Subject: Faq: IS THERE A FAQ NEWS LETTER FOR WIN. PROG.
Organization: Michigan State University
Date: Wed, 29 Jul 92 19:12:19 GMT

Hi,
    I'm new to programming in windows and need all the help I can get.  If 
there is a FAQ newsletter for this group, could someone post an ftp site 
where it can be found??

    My main concern is the ability to run my program before the normal 
application that the user pointed and clicked at is run.  I also need to 
run another application after the main app is run.  All of this should
be done without the user knowing it.


thanks
-
--
Jeff Evans - evansj@crs.cl.msu.edu - Windoze and MS-DOG, what a combination!
Newsgroups: comp.os.ms-windows.programmer.misc
From: nelson_p@apollo.hp.com (Peter Nelson)
Subject: Is it really this bad or is it just me II
Date: Tue, 28 Jul 1992 12:48:44 GMT
Organization: Hewlett-Packard Corporation, Chelmsford, MA

                                   

  I recently posted a long article about trouble debugging 
  scrolling messages in Borland's (3.1) TDW.   ( To recap: I seem
  to get multiple scrolling messages for a single click on the
  scrollbar when I'm in TDW but no strange behavior when I'm 
  not in TDW.)


  So I thought I'd study the problem with Winsight (Borland's
  "passive" message and other event viewer).   But if I try to
  run my program when Winsight is running my program does a 
  GPF with Exception 13 (address violation)!!   It's fine when 
  Winsight is not running.   According to TDW the exception is
  happening in a call to TextOut.

  So I tried running Petzold's "Hello Windows" program, which
  is about as simple and safe a Windows program as there is, 
  while Winsight was on.   It didn't crap out totally, but
  instead of displaying "hello windows"  it displayed gobbledygook
  ( probably Martian for "you're screwed, pal!" ) 
  

  So what's the deal here?   If tiny, simple beginner's programs 
  crap out with Borland's debugger and Winsight, then how the HELL
  does anyone develop and debug any nontrivial apps with these things??!!
                                         
  Are the Microsoft tools any more reliable than this?

  Thanks for any comments and advice.
                                                      

---peter      
        

PS --    Gateway 2000, 486/33, 8M RAM, DOS 5.0,  Windows 3.1, 
         Borland C/C++ 3.1, Microsoft serial mouse using the 
         driver supplied with Windows 3.1, TDW is running in
         dual monitor mode.
From: pam@vandi.ars.cl (Pablo Ahumada M.)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: "Exec"ing DOS programs from Windows 
Distribution: world
Organization: Ars Innovandi (El arte de innovar)
Date: Tue, 28 Jul 1992 14:21:00 CST


  > I need to be able to run a DOS program from my Windows program,
  > without the DOS program taking over the screen.  In Borland C++ neither
  > "system" nor any of the standard Unix "exec" functions are defined under
  > Windows and I can't find any other functions documented in the standard
  > lib docs or ObjectWindows documentation.
  > What's the best way to run a program, at the very least duplicating
  > the functionality of the "Run" menu option under the Program Manager?

   WinExec( "c:\myprogram.exe a b c", SW_HIDE );

   Pablo.

_______________________________________________________________

   Pablo Ahumada Mardones	   uucp : pam@vandi.ars.cl
				   FAX	: (56-2) 231 9756
   &8-)*			   Santiago, Chile
_______________________________________________________________
Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
From: popkin@viatka.cs.odu.edu (Brian N. Popkin)
Subject: Known Compiler Bug In BC++ v3.1....
Organization: Old Dominion University Dept. of CS, Norfolk VA
Date: Wed, 22 Jul 1992 13:03:58 GMT

Dear Netters:

I am having alot of problems with bc++v3.1 and have heard that
it is a compiler bug.. I cannot get any of my functions to 
export.. I have used the smartcallbacks too and cannot get them
to export.  I am also used the -We option and _export option..

Does anybody have any suggestions??  My windows program has
only a dialog procedure and WndProc..

thank you,

Brian

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Brian Popkin  - popkin@cs.odu.edu               |  Dedicated To The UMLS
Medical Expert Systems Researcher               |  Project....
Computer Science Department                     |------------------------------
Old Dominion University - Norfolk, Virginia USA |  Looking For Field Testers..
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: jeff@igc.org (Jeff Dean)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Detecting when a WinExec'd prg term
Date: 23 Jul 92 06:23:00 GMT
Nf-ID: #R:18014.2a62f9a7@levels.unisa.edu.:-2126098115:cdp:1668700007:000:147
Nf-From: cdp.UUCP!jeff    Jul 22 23:23:00 1992


The 3.1 SDK comes with sample programs, including one that uses
NotifyRegister.  Look in the samples\toolhelp directory.

	Jeff Dean
	jeff@igc.org
From: pam@vandi.ars.cl (Pablo Ahumada M.)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: hiding scrollbars when not needed 
Distribution: world
Organization: Ars Innovandi (El arte de innovar)
Date: Tue, 28 Jul 1992 14:20:55 CST


  > I would like to know if it's possible to hide the scrollbars in a window,
  > created with the style attributes WS_VSCROLL and WS_HSCROLL, when the
  > entire document fits in the window so that scrolling is not needed.
  > I know that I could create the scrollbar controls explicitly, but this
  > requires also positioning and controlling them, so I would prefer to use
  > the standard window scrollbars if possible.


   Use ShowScrollBar, the last parameter allow shows or hides
   the scroll bar from a window.

  Hope this helps.

  Pablo.


_______________________________________________________________

   Pablo Ahumada Mardones	   uucp : pam@vandi.ars.cl
				   FAX	: (56-2) 231 9756
   &8-)*			   Santiago, Chile
_______________________________________________________________
From: lance@lancea.actrix.gen.nz (Lance Andrewes)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: DLL to decompress zip/zoo?
Distribution: world
Date: Mon, 27 Jul 92 19:00:43 GMT
Organization: none

I'm seeking the following: a Windows 3.1 DLL that can decompress
an archived file.  The archive would most likely be zip or zoo.
Source code prefered, but if it is well supported just the DLL
might be okay.

Note that I'm definitely not seeking a stand-alone application.
Nor do I need to view the archive contents.  It just has to be
able to decompress files under the control of a program.

Any replies will be acknowledged.  Thank you.
__
 _______  Email: lance@lancea.actrix.gen.nz
////      ZL2AJH    Wellington, New Zealand
From: radel@bach.udel.edu (Todd Radel)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Help using DPMI "Allocate DOS Memory Block"
Date: 24 Jul 92 19:30:05 GMT
Organization: University of Delaware

Well, it's time for another installment of "Help Todd get his stuff
to work under Windows."  :-)  :-)

I'm trying to use the DPMI services in Windows 3.1 to communicate with
a DOS program running in a window.  The DOS program is a server which
communicates with a couple of transputer boards installed in the system.
The transputers support DMA transfers, but only as long as the server
is running.  Thus, if I want to bring data into my Windows program,
I have to start the server, allocate some memory, tell the server
where to find it, and wait for data to come in.

Of course, giving the server the value of a pointer won't work
because of the way Windows handles virtual memory in VDM's.  The
DPMI function "Allocate DOS Memory Block" (AX= 0100h) seems to be
what I need.  But what is a "selector", and how do I use it? I
know I can pass the transputer server the real-mode segment of the
allocated block (or can I?), but how do I access the allocated
memory from within my program?

Oh yeah, this is 386Enh mode, of course.

Thanks in advance for any help...

-- Todd

-- 
Todd Radel                   | "I obscenity in the milk of all," Agustin said,
CIS/English undergrad        | "if it does not seem like a lunatic asylum in
University of Delaware       | here." -- Hemingway, _For Whom the Bell Tolls_
A.I. duPont Institute, 1600 Rockland Road, Wilmington, DE  19899
Newsgroups: comp.os.ms-windows.programmer.misc
From: whedon@netcom.com (Bill Whedon)
Subject: Titlebar buttons and color listboxes
Date: Wed, 29 Jul 92 07:28:36 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Keywords: titlebar button color listbox

I asked the following on another group and got zero response.  Maybe the
folks who read this one are smarter...

1. How does one go about placing a button on the titlebar of a child window
   without resorting to bitmaps?

2. How does one create a listbox or dropdown combo containing colored text
   in the strings?

I've seen both of these things before, and saw some code for the first one,
but can't recall where.  Any help would be appreciated.  Please post here
or send direct to me.  

Thanks for being smarter than I am!
Bill Whedon
 


Newsgroups: comp.os.ms-windows.programmer.misc
From: sxl2259@ritvax.isc.rit.edu
Subject: MetaWare 32-bit Windows Application
Reply-To: sxl2259@ritvax.isc.rit.edu
Organization: Rochester Institute of Technology
Date: Fri, 24 Jul 1992 21:42:05 GMT


Does anyone have the experience to port windows programs to MetaWare 32-bit
compiler? I got a problem. When I used GlobalLock or LocalLock, I got compiler
warning......"far pointer address truncate to near pointer address".

That's because the new windows.h for MetaWare declares FAR as "". How can I do
without pain?


Any suggestion will be VERy appreciated!


Shen-wei
.
Xref: sparky comp.os.ms-windows.programmer.misc:1120 comp.windows.ms.programmer:7459
From: muffy@remarque.berkeley.edu (Muffy Barkocy)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
Subject: creating initially invisible MDI child?
Date: 31 Jul 92 13:06:29
Organization: Natural Language Incorporated
Distribution: world
NNTP-Posting-Host: remarque.berkeley.edu


The subject line says it - I want to create certain of my MDI child
windows invisibly, to be later shown when the user asks for them.  Any
ideas on how to do this?

Thanks...

Muffy
--

Muffy Barkocy | muffy@mica.berkeley.edu | wi.4636@wizvax.methuen.ma.us
~Little round planet/in a big universe/sometimes it looks blessed/
 sometimes it looks cursed/Depends on what you look at, obviously/
 But even more it depends on the way that you see~ - Bruce Cockburn
Newsgroups: comp.os.ms-windows.programmer.misc
From: rjrichar@watserv1.uwaterloo.ca (Bob Richards)
Subject: FLAME: BORLAND TECHNICAL SUPPORT                
Organization: University of Waterloo
Date: Wed, 29 Jul 1992 03:43:38 GMT

Personally, I have been VERY flustrated with Borland's "free" support. 
The lines have been impossible to get through plus once you do get through
you end up waiting roughly 20-30 minutes in long distance waiting to talk to 
somebody.   Once you do get to talk to somebody you are given all of the
obvious suggestions/answers.

It's pretty said that when you are paying near $900 for a product that
you have to pay for "GOOD" support.     BORLAND LETS GET YOUR ACT TOGETHER!!
Newsgroups: comp.os.ms-windows.programmer.misc
From: joero@microsoft.com (Joe Robison)
Subject: Re: Visual Basic Prof. Ext. Radio & Option Buttons
Date: 30 Jul 92 06:10:15 GMT
Organization: Microsoft Corp.

In article <13791@mindlink.bc.ca> Steve_Goyette@mindlink.bc.ca wrote:
> Hi,
> 
>    For a little while now, I have had a problem with the option and
> radio buttons in the Visual Basic Proffesional Extensions.  When a
> form containing any of these controls was over-written with another form or
> dialog, the controls wouldn't get re-drawn.  After wrestling
> with this problem (and tearing most of my remaining hair out) I came up with
> the following solution.  I hope that this helps other people
> experiencing the same problem.

[Solution involving calling Windows routines omitted]

If you need to force a repaint (WM_Paint) the Refresh method
should do the trick.

Hope this helps.

Joe Robison
joero@microsoft.com
NAMS (Not A Microsoft Spokeshuman)
From: nelson_p@apollo.hp.com (Peter Nelson)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Is it really this bad, or is it just me
Date: 31 Jul 92 14:54:50 GMT
Organization: Hewlett-Packard Corporation, Chelmsford, MA

In article <1992Jul30.173531.14978@progress.com> briggs@progress.COM (Scott Briggs) writes:
>nelson_p@apollo.hp.com (Peter Nelson) writes:
>
>>In article <1992Jul29.155112.7877@microsoft.com> gregde@microsoft.com (Greg Demichillie) writes:
>>>In article <1992Jul28.134522.11108@usenet.ins.cwru.edu> turnbull@ces.cwru.edu (John Turnbull) writes:
>>>>In article <1992Jul28.090409.1@cortex> mboucher@cortex.prospect.com (Mike Boucher) writes:
>>>>>
>
>[stuff deleted]
>
>>  OK, so what CAN you debug with a Windows debugger?   For instance, 
>>  it is clear that I can't set a breakpoint in the message handler
>>  for the scrolling messages.   But my WM_VSCROLL handler eventually
>
>Your probably not going to like this suggestion but;  get yourself
>a secondary monochrome monitor and video card (total cost <$100).
>and then use CVW /2.  When you hit a break point your focus 
>shifts to the secondary monitor so you don't get spurious (sp?)
>messages sent to your WNDProc.

  I *DO* use dual monitor debugging.   The problem isn't with the displays,
  it's with the mouse event handling.    And I've received plenty of
  email from CodeView users who confirm that the problem I'm describing 
  occurs just as frequently with the Microsoft environment.

  So you're saying that with your setup you can have a Windows program
  that has scroll bars (using the Windows API) with a WndProc that has
  a handler for WM_VSCROLL with a case statement for SB_LINEDOWN and 
  if you set a breakpoint in the SB_LINEDOWN code and click on the 
  "down" button of the scrollbar (at which point control is transferred
  to the debugger to handle the breakpoint) and only get one message
  for that click?   

  I've got the Microsoft C/C++ 7.0 product installed on my machine,
  although I have never used it, because I was already using the
  Borland product and I didn't want to climb the learning curve of 
  another environment, especially when more people seemed to prefer
  the Borland environment (And besides I have no more room for the
  manuals so I keep them in a box under my desk!).    But if the 
  Microsoft debugging environment is more problem-free than the 
  Borland one I might consider switching  --  I don't want to use
  both regularly all this mental gear-changing: Microsoft | Borland
  at home, Apollo Domain | HP HP-UX at work, gives me headaches! 

  BTW, does the Microsoft environment have an equivalent to Winsight?

  
---peter

  
 
Newsgroups: comp.os.ms-windows.programmer.misc
From: cms2839@ultb.isc.rit.edu (a.stranger)
Subject: Re: MDI Child window re-sizing Question
Originator: cms2839@ultb
Keywords: MDI 
Organization: Minimalist Music for Hyperactive Children (MMHC)
Date: Tue, 28 Jul 1992 23:03:06 GMT

In article <1992Jul28.130842.14585@dragon.acadiau.ca> 890025d@dragon.acadiau.ca (Andy DeWolfe) writes:
>Hi all,
>	Can anyone tell me how I can limit the size of
>an MDI child window when the user grabs one of it's borders?
>The problen is the window has to can the same width/height ratio
>at all times.  

				the " preferred " way of doing this is
to respond to the wm_GetMinMaxInfo message , which allows you to set a
minimum and maximum size for a window . i don't know of any way of
controlling aspect ratio , though , except " tweaking " the size after
the user has adjusted it .

                                using wm_GetMinMaxInfo seems to induce
some strange behaviour when used on an MDI child , though . i am having
a problem with maximizing an MDI child whose size has been limited with
this message . depending ( i think ) on the maximum size of the child as
compared to the size of the MDI client window , i will sometimes end up
with two system menus and restore boxes -- one on the MDI frame's menu
line , where it should be , and one on a title bar on the MDI child ,
which shouldn't be there at all ( in its maximized state ) . this seems
to happen when the MDI client window is around the same size or smaller
than the maximum size of the child window . when it's larger ,
everything seems to work fine ...

                                anyone know what's going on here ?

-- 
       @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       @     "Imagination keeps the shadows away  -  Xymox      @
       @~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@
       @       a.stranger  -  CMS2839@ritvax.isc.rit.edu        @
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
From: andreas@awstar.rus.uni-stuttgart.de (Andreas Wierse)
Subject: easy callable Dialog on OWL?
Organization: Visualization Group Comp.Center (RUS) U of Stuttgart, FRG
Date: Wed, 29 Jul 1992 14:03:04 GMT

Hi,

I'm quite a novice to Borlands OWL and have a question that I cannot
answer by myself although I read the OWL manual back and forth (maybe
I'm not smart enough or the manual is not that good (german
translation)).

Here is what I want to do:

I have defined a dialog resource in the resource manager that I want to
call from a main menu in the main window or from somewhere in the
program. It's a dialog that is used to browse through a database and
allows changes in it.
What is the proper way to implement this kind of dialog? I would think
it ok if I created the whole dialog once and then call it as needed. But
I'm not sure how to do this: must I use ExecDialog or MakeWindow? or
something else?

I'm sorry if this sounds confused but so am I :-)

Maybe a hint to a publication that is more explicit about modal and
non-modal dialogs would be a way to help me too.

please answer by e-mail if possible, since I don't read this newsgroup
often.

Thanks in Advance

Andreas

--
 Andreas Wierse              | Institute for Computerapplications II
                             | Dep. Computersimulation and Visualization
 wierse@rus.uni-stuttgart.de | Computer Center University of Stuttgart
 Tel.: ++49-711-685-5796     | Allmandring 30
 Fax:  ++49-711-682357       | D-7000 Stuttgart 80     Germany

Newsgroups: comp.os.ms-windows.programmer.misc
From: jjacob@nyx.cs.du.edu (Jude Jacob)
Subject: Re: Clarification on WinExec question
Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
Date: Sat, 25 Jul 92 03:25:07 GMT

In article ak10+@andrew.cmu.edu (Andrew Joseph Kompanek) writes:
>
>Here's a restatement of my problem: I need to run a DOS program from
>a Windows application in the background so that it doesn't take over the
>screen and it runs without any user interaction.  Specifically, I merely
>want to run Paradox 3.5 on a PAL script so that it can generate a report
>for me (very simple).

Andrew,

I haven't seen the other postings.. But here is one way it might work.. 
Create a PIF file for the application, with the BackGround Execution 
option set. Then WinExec() this PIF file  using the SW_HIDE flag on 
the WinExec(). 

If this works at all, :-), it should work only in 386 enhanced.


Let me know if this does not work

Jude


Xref: sparky comp.os.ms-windows.programmer.misc:1095 comp.windows.ms.programmer:7427
From: frankp@ctron.com (Frank Perreault)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
Subject: Re: Known Compiler Bug In BC++ v3.1....
Date: 30 Jul 92 13:34:43 GMT
Reply-To: frankp@olympus.ctron.com (Frank Perreault)
Followup-To: comp.os.ms-windows.programmer.misc
Organization: Cabletron Systems INc.

In article <1992Jul22.130358.9250@cs.odu.edu> popkin@viatka.cs.odu.edu (Brian N. Popkin) writes:
>Dear Netters:
>
>I am having alot of problems with bc++v3.1 and have heard that
>it is a compiler bug.. I cannot get any of my functions to 
>export.. I have used the smartcallbacks too and cannot get them
>to export.  I am also used the -We option and _export option..
>
>Does anybody have any suggestions??  My windows program has
>only a dialog procedure and WndProc..
>

Brian,

I have found that with the Borland Compiler their are only two ways to insure
that your functions are getting exported. One, set up things so that all
functions are exportable (a big memory pig for large apps) or two, put the 
keyword _export in the functions/function declarations for the ones that you
want to export.

It seems that you can have a .DEF file with a list of functions to export and
without the _export keyword they still will not get exported, so you may want
to give this a try. You can run a TDUMP of the DLL after you link to check to
see if the function was in fact exported.

--- Frank ---
From: ggp08@seq1.kl.ac.uk (Y. Lan)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Smart callback vs. EXPORT
Date: 31 Jul 92 11:43:41 GMT
Reply-To: ggp08@seq1.kl.ac.uk (Y. Lan)
Organization: University of Keele, England

Hi!

Could anybody tell me how "Smart callback" in Borland C++ compiler
works?

What's the difference between using smart callback and using export
explicitly in .def file. My project use samrt callback and I did not use
export in my .def file. It works well until I compilered a subroutine in
Petzold's book (a dialog box), it crashed. Exception 13 Error code 532.
Why? I used many dialog box, why this one failed ? Please help! Thanks
in advance.

Lan
Newsgroups: comp.os.ms-windows.programmer.misc