HDTenEightyP/NetNews huggingface dataset:
From: cwvernon@undergrad.math.waterloo.edu (Vern)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: how do I do a floating (x,y) window?
Date: 12 Oct 92 23:50:20 GMT
Organization: University of Waterloo

In article <1992Oct9.040630.10047@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
>Finally, I am confused by a statement on page 447 of Petzold 3.1  He says
>"you don't normally provide a caption bar & system menu with a modal dialog
>box, because the user can't do anything to the underlying window anyway"
>What does he mean here?  I though almost all normal dialog boxes were
>modal and they all have caption bars & system menus?  What has having a
>caption bar & system menu got to do with doing something to the underlying
>window.  Isn't the caption bar & system menu only really used to move the
>dialog box around?

Probably at one time, modal dialog boxes did not have a title bar and modal-
less dialo boxes did.  This is just a matter of style.  Modal dialog boxes
can have title bars (and most of them nowadays do) but they don't have to 
just like modaless dialiog boxes DON'T have to have a title bar (but they
do also).

-- 
-- "Time flies like an arrow, but fruit flies like a banana"
--                                      -- cwvernon@descartes.uwaterloo.ca
--
Newsgroups: comp.os.ms-windows.programmer.misc
From: focke@gmdzi.gmd.de (Stefan Focke)
Subject: Exec Program and wait until it ends
Organization: gmd
Date: Wed, 14 Oct 1992 12:09:45 GMT

Hello!

I want to start an external Program (EXCEL) from my own program. My program 
should not continue execution until EXECL has ended. How can I do this?

Stefan

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

Stefan Focke                  Tel. 02241-14-3154
GMD-I8                        e-mail: stefan.focke@gmd.de
Postfach 1316
D-W 5205 Sankt Augustin 1            
Newsgroups: comp.os.ms-windows.programmer.misc
From: alex@uranus.ibioc.serpukhov.su (Alexandr Galtchenko)
Subject: What is Petzold's E-mail address?
Organization: Institute of Cell Biophysics
X-Newsreader: TIN [version 1.1 PL6]
Date: Fri, 16 Oct 1992 14:48:36 GMT


Hi All,
help me, please.
What is Charles Petzold's E-mail address?
Thank All,
Alexander
-- 

-------------------------------------------------------------------------
Alexander A. Galtchenko, system manager	 | E-mail:
Institute of Cell Biophysics		 | alex@uranus.ibioc.serpukhov.su
Newsgroups: comp.os.ms-windows.programmer.misc
From: ldg@cbnewsh.cb.att.com (lawrence.d.goldsmith)
Subject: Re: Authoring Help Files
Organization: AT&T
Date: Wed, 7 Oct 1992 16:32:03 GMT

The way I have been authoring help files is relatively painless
and makes use of Word for Windows 2 and a product called
Doc-To-Help from WexTech Systems. You create a standard W4W
document using their template and their instructions and
all the details of the RTF format and help file compiling is
handled automatically. I recommend the product.

WexTech Systems can be reached at 212-949-9595.

Larry Goldsmith
AT&T Bell Laboratories
ldg@hoqaa.att.com
Xref: sparky comp.os.ms-windows.programmer.misc:2502 comp.os.ms-windows.programmer.tools:1097
From: Robert@cs.umass.edu (Robert C. Cook)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
Subject: Graphical User Interface Builders and C
Date: 8 Oct 92 20:21:43 GMT
Reply-To: Robert@cs.umass.edu
Followup-To: comp.os.ms-windows.programmer.misc
Organization: Computer and Information Science, University of Massachusetts, Amherst, MA

Can anyone suggest a good Graphical User Interface Builder that generates C code
that works over multiple platforms, i.e. Unix (DEC, SUN, MAC/AUX, SCO), MacOS,
Windows?

Bob Cook



Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
From: parkerw@lanai.cs.ucla.edu (Parker Waechter)
Subject: OLE initialization
Originator: parkerw@lanai.cs.ucla.edu
Keywords: OLE, initialization
Organization: UCLA Computer Science Department
Date: Tue, 13 Oct 92 16:32:42 GMT


I am attempting to write an application which is several OLE servers
integrated by a single OLE client (e.g. ms word for windows 2.0).

When I create a new OLE object, I would like the client to pass some 
data to the server to be used in the creation of the object (eg selecting
a table in word and creating a chart or whatever).

My understanding is that I can use the Get/SetData methods on the object
once it is created, but how do I send it as initialization?

Is it kosher to have it create a blank object, then fill data in from
the client, and have it redraw or something?

The examples from ms (SCHMOO etc) do not address this issue.

Thanks,
	Parker
-- 
Parker B. Waechter					UCLA Biocybernetics Lab
parkerw@cs.ucla.edu					4731 Boelter Hall
							Los Angeles, Ca.
							90024-1596
Newsgroups: comp.os.ms-windows.programmer.misc
From: smc@paradyne.com (Steve Clemmer)
Subject: Serial Comm at 38400
Organization: AT&T Paradyne, Largo, Florida
Date: Thu, 15 Oct 1992 14:24:22 GMT

I am developing a serial communications program and am having
trouble with changing the data rate to 38400.  When the program
calls BuildCommDCB with an argument of "COM2:38400,n,8,1", the
return value is -1.  The same code works quite well at other
rates.  Is anyone using comm ports at 38400?  If you are, what
method are you using to initialize the the DCB?  The SDK
Programmer's Reference, Vol. 3 indicates the values for the
BaudRate field.  Has anyone succeeded in storing the value
directly and operating at 38400bps.

Thanks in advance.

Steve Clemmer

Newsgroups: comp.os.ms-windows.programmer.misc
From: kevr@is.morgan.com (Kevin Reilly)
Subject: Re-possessing resources
Organization: Morgan Stanley & Company
Distribution: usa
Date: Tue, 13 Oct 1992 22:10:30 GMT


Does anyone have any suggestions on how best to reclaim
the resources allocated to an application that has
GPA'ed?

Every now and then a dll I use causes Excel to die
leaving a very low level of available resource space.
I would like to reclaim that space if possible!!

Thank you

Kevin M. Reilly
From: buxduac@dct.ac.uk
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: colour -> b/w bitmaps
Date: 16 Oct 92 13:07:28 GMT
Organization: Dundee Institute of Technology

If I have colour bitmap (not DIB) what would be the best method to turn 
into a black and white one.  I do not want to reorganise the
pallate but change any black part into 0 and any pixel with a 
colour into all 1's 

Andy C
acobley@uk.ac.dundee.mic
Newsgroups: comp.os.ms-windows.programmer.misc
From: bell@asdsun.larc.nasa.gov (John Bell)
Subject: DOS exit codes 
Keywords: winexec DOS
Organization: NASA Langley Research Center, Hampton, VA  USA
Date: Thu, 8 Oct 1992 18:18:56 GMT

   I would like to be able to figure out the exit code returned by a DOS application when it has been called from a PIF file using WinExec. Obviously, my program has to be able to determine when the DOS program has exited, and then somehow read the exit code. Is this possible? If so, could someone explain how? Thanks in advance.

-----
John Bell
bell@haloe.larc.nasa.gov
NASA Langley Research Center


Newsgroups: comp.os.ms-windows.programmer.misc
From: ddetws@Arco.COM (Tommy W Sager (915)334-4442)
Subject: Best 3.1 references for infrequent problems
Organization: ARCO Oil and Gas Company
Date: Mon, 12 Oct 1992 15:27:55 GMT

I know that a lot of questions are asked about which book(s) are the best
references for Windows programming, but here comes another. I am looking
for a book, or books, that cover topics like:

	1. Sound (And the sound recorder - Can .WAV files be "played"
		in a Windows app?)

	2. Animation 

	3. Screen Savers

I have read both Petzold's and Norton's books on programming Windows 3.0.
The books were good, but I am looking to move into the 3.1 arena, and 
I would also like to get into things that are not considered "everyday"
programming obsticles. 

Any suggestions would be greatly appreciated. Post or E-Mail replies are 
fine.

Thanks-in-advance,

Tommy Sager

/**************************************************************************\
|             Tommy Sager                       P. O. Box 1792             |
|             ddetws@Arco.com              Odessa, Texas 79760             |
|           "Let's just assume it's Friday afternoon." - Unknown           |
\**************************************************************************/
Newsgroups: comp.os.ms-windows.programmer.misc
From: jkf@Franz.COM (Sean Foderaro)
Subject: Re: how do I do a floating (x,y) window?
Organization: Franz Inc., Berkeley, CA
Date: Fri, 9 Oct 1992 14:38:57 GMT


>> (a) if a window, what do I register?  What do I specify as a WndProc for the
>>     window.  I don't really need one, do I have to have one?

 just create a normal window (WS_OVERLAPPED) owned by the main window
of your application so it stays in front of your main window.   As WS_CAPTION
to get a caption bar so users can move it out of the way.
Yes you need a WndProc but only a very small one.

>> (b) do I use CreateWindow, CreateDialog or BeginDialog

 CreateWindow

>> (c) in response to WM_MOUSEMOVE, how do I write (x,y) on it


 If hwnd is the handle of the little x,y window then you could store
 the x and y in global variables and
 
 InvalidateRect(hwnd,NULL,TRUE); 
 UpdateWindow(hwnd);

 and let the WM_PAINT handler of your window draw the new coordinates.


>> (d) how do I kill it from outside (EndDialog, DestroyWindow)

 DestroyWindow(hwnd)



>> Finally, I am confused by a statement on page 447 of Petzold 3.1  He says
>> "you don't normally provide a caption bar & system menu with a modal dialog
>> box, because the user can't do anything to the underlying window anyway"
>> What does he mean here?  

When a modal dialog box is displayed *all* the user can do is manipulate
the controls in the dialog box.  If there are controls on windows under the 
dialog box he can't manipulate them.  Therefore I think that what Petzold
is saying is "what use is there to permitting the dialog box to move
and uncover controls on an underlying window when the user can't use those 
controls anyway".     I half agree with him.  Sometimes the dialog box covers 
up some text that you need in order to respond to the dialog box so 
making a dialog box moveable is a nice thing if this is the case.


Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: refreshing client area with different hdc
Organization: Dept. of Energy, Mines, and Resources, Ottawa
Date: Fri, 16 Oct 1992 01:13:14 GMT

When I paint my client area in response to WM_PAINT, I scale my 'world'
co-ordinates (~1e6 metres) to logical units of 0.1 mm and then paint with
MM_LOMETRIC.  This is fine.  Up until now, I have ignored the clipping
rectangle in PAINTSTRUCT, just to get it working (slow).  Now I want to use the
rect to redraw only what is required.

Now I'm confused about how to use this clipping rectangle because it is
provided for the default hdc of MM_TEXT and I work in MM_LOMETRIC.
How do I convert those MM_TEXT co-ordinates to MM_LOMETRIC co-ordinates?
I thought of using screen co-ordinates as an intermediate, i.e.:

case WM_PAINT:
	hdc=BeginPaint(hwnd,&ps);
	LPtoDP(hdc,(LPPOINT)&ps.rcPaint,2);	//to pixels

	//now set up my co-ordinate system
	SetMapMode(hdc,MM_LOMETRIC);
	SetWindowExt...
	SetViewport...
	SetViewportOrg...

	//convert pixels back to 0.1 mm logical units
	DPtoLP(hdc,(LPPOINT)&ps.rcPaint,2);

	//convert again to get world co-ordinates
	...
	
	//paint my picture using world co-ordinates to clip
	...

	//finish up
	EndPaint(hwnd,&ps);

Is this the correct way to do this?  I was hoping there would be a more
transparent way.

Preferences...
  It appears that there are several cases where a redraw is required:
	(a) WM_SIZE/WM_PAINT
		Since the window has changed size, the only way to
		do this is to read the data all over again and redraw the
		whole client area from scratch.  True?
	
	(b) WM_MOVE/WM_PAINT (possibly not as common)
	(c) WM_PAINT after an occluding window is removed
		If I BitBlt a copy of the picture to memory after each
		WM_SIZE/WM_PAINT or initial WM_PAINT, then I could repaint
		a part of it by just BitBlting from memory to the client area?

Is it better to redraw the rectangle by reading the data and drawing it again
or attempt to BitBlt the picture to memory the first time, so that subsequent
times it can be redrawn with more BitBlts.  Is the BitBlt seamless?

Sorry for the rambling - I can't seem to keep it short for this one.
From: kim@Software.Mitel.COM (Kim Letkeman)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Ouch!  Turbo C++ for Windows and my SVGA card don't mix.
Date: 7 Oct 92 15:56:05 GMT
	<KIM.92Oct7115432@kim.Software.Mitel.COM>
Organization: MITEL Public Switching, Kanata, Ontario, Canada
In-reply-to: kim@Software.Mitel.COM's message of 7 Oct 92 15:54:32 GMT

In article <KIM.92Oct7115432@kim.Software.Mitel.COM> kim@Software.Mitel.COM (Kim Letkeman) writes:

| Anyway, I find that whenever I save preferences of any sort, the font
| gets default to a micro-font. To clear it up, I have to delete the
| tpw.cfg file and open a new instance of TPW. All is then well, until
| the next time I forget and save preferences again.

Woops, forgot to mention that this is with an ATI VGA Wonder.
--
Kim Letkeman	kim@Software.Mitel.COM
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: GlobalAlloc automatically freed?
From: stefan@olson.acme.gen.nz (Stefan Olson)
Date: Fri, 9 Oct 92 19:43:32 +1200

In <JKF.92Oct6083132@frisky.Franz.COM> jkf@Franz.COM (Sean Foderaro) writes:
> If I GlobalAlloc some space, is that space automatically freed when my 
>application ends?

No.  Use GlobalFree ()

...Stefan

-- 
------------------------------------------------------------------------
   Stefan Olson                     Mail: stefan@olson.acme.gen.nz
   Kindness in giving creates love.
------------------------------------------------------------------------
From: kim@Software.Mitel.COM (Kim Letkeman)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: How do you create Win3.0 help file with BC3.1?
Date: 9 Oct 92 13:16:29 GMT
Organization: MITEL Public Switching, Kanata, Ontario, Canada
In-reply-to: rjl@fawlty10.eng.monash.edu.au's message of 9 Oct 92 02:06:14 GMT

In article <rjl.718596374@fawlty10.eng.monash.edu.au> rjl@fawlty10.eng.monash.edu.au (Russell Lang) writes:

| I am compiling gnuplot for windows, and the help compiler
| in Borland C++ 3.1 produces Windows 3.1 help files,
| unreadable by Windows 3.0.
| How do I create help files for Windows 3.0?
| 
| The on-line manual doesn't seem to mention the help compiler,
| and the paper manual looks like a 3.0 manual with 3.1 printed
| on the front cover.

I believe that you'll find that the solution is to distribute the new
help engine with your application. It works under 3.0. People I trust
tell me that this is sanctioned by Microsoft.
--
Kim Letkeman	kim@Software.Mitel.COM
Newsgroups: comp.os.ms-windows.programmer.misc
From: jgeniec@lilac.cis.ohio-state.edu (Joseph Geniec)
Subject: Re: Bypassing the Windows title screen
Organization: The Ohio State University Dept. of Computer and Info. Science
Distribution: comp.os.ms-windows.programmer.misc
Date: Wed, 14 Oct 1992 19:17:24 GMT


To bypass the windows opening screen:

1) create a new screen in .bmp format in windows paintbrush, or just create
   a black one if you don't want to see any screen at all.
2) Get a program to convert it to RLE format with compression 4.
3) get out of windows.
4) go to the windows\system folder, make a backup copy of vgalogo.rle,
   and rename your picture to vgalogo.rle.
5) run windows setup from DOS.
6) Change a driver or something in setup. (You simply have to run setup
   because the picture is actually a part of WIN.COM. When setup is
   run, the new WIN.COM is created with your picture)
7) run windows.

Make sure that the picture you create is no bigger than a regular
EGA screen, and it has no more than 16 colors. Also, if you happen to
be changing a font driver, make sure that there is not another
vgalogo.rle on that disk/directory. And, if you screw it up, you
always have a backup of the picture.

Good Luck,
J.G.

Xref: sparky comp.os.ms-windows.programmer.misc:2497 comp.os.ms-windows.apps:3573
From: alistair@mits.com.au
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.apps
Subject: DDE item names for MS Word & Excel
Date: 8 Oct 92 14:14:23 GMT
Nntp-Posting-User: alistair

Does anyone have (or know where I can obtain) a list of all the data
item names which MS Word and MS Excel accept (e.g. "\StartOfDoc" for MS
Word) from a DDEClient.

Thanks in advance,

Alistair Grant

Internet:     alistair@mits.com.au
Alternate:    alistair%mits.com.au@ucsvc.ucs.unimelb.edu.au
Newsgroups: comp.os.ms-windows.programmer.misc
From: scott@ods.com (Scott Harper)
Subject: 2 Non-MDI Windows w/ Same Msg Loop?
Organization: Optical Data Systems, Inc.
X-Newsreader: TIN [version 1.1 PL6]
Date: Thu, 15 Oct 1992 19:44:51 GMT

In my application there is an option to open a second window.
The second window is of the same window class as the main
window, and uses the same window procedure.  It also uses
the same accelerator table.  The second window is not
a true child window of the main window (the hwndParent parameter
in the CreateWindow call is NULL), but it is owned by the
same application instance.  The message loop in my WinMain
dispatches messages for both windows.  I can tell which window
to operate on in the window procedure by the hwnd parameter
passed to it.  Both windows are style WS_OVERLAPPEDWINDOW.

The client area of each window is completely filled with an
owner drawn listbox.  Thus, the WM_SETFOCUS message case performs
a SetFocus to that window's listbox handle.  The listbox handle
for each window (among other things) is stored in that window's
extra bytes.

I am able to successfully create the second window, get focus
back and forth, and close it.  But I am having the following
problems:

1. After I open the 2nd window (with CreateWindow) and then
   close it (with DestroyWindow) once, I cannot open it again.
   CreateWindow returns NULL.  What are some of the reasons
   why CreateWindow will fail?  In the WM_DESTROY case for the
   2nd window I don't do anything much... I just set the (global)
   window handle for the 2nd window to NULL, so next time I
   go to open it I know there's not already one there.  Does
   DestroyWindow do something internally that's fouling me up
   (like maybe unregistering the window class)?

2. In the message loop I need to translate the same accelerator
   keys, but I want to translate the message to the active
   window.  I tried using msg.hwnd in the TranslateAccelerators
   call, but it doesn't seem to work.

   I also tried something like this:

   while (GetMessage(&msg, NULL, NULL, NULL))
      {
      if (!TranslateAccelerator(GetActiveWindow(), hAccTable, &msg))
         {
         TranslateMessage(&msg);
         DispatchMessage(&msg);
         }
      }

   This still doesn't seem to work *exactly* right, but might be OK...
   I am a little concerned about the efficiency of calling GetActiveWindow
   once every time through the loop, however.

   Has anyone been able to do this (translate accelerator events to
   two different windows from withing the same message loop)?


Any insight or suggestions will be greatly appreciated!
-- 
Scott Harper                       Optical Data Systems, Inc.
scott@ods.com                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081
Newsgroups: comp.os.ms-windows.programmer.misc
From: skrause@informatik.hu-berlin.de (Steffen Krause)
Subject: TDW and S3-based graphic boards - how ?
Organization: Humboldt University Berlin, Department of Computer Science
Date: Wed, 14 Oct 1992 10:12:41 GMT

Hi everybody !
Is there a way to make TDW work with an S3-based graphic board ?
Thanks for any hints !
Steffen
skrause@informatik.hu-berlin.de

-- 
---------------- Steffen Krause --------------------------------------------
Zu Risiken oder Nebenwirkungen lesen Sie die Packungsbeilage und informieren
Sie Ihren Arzt oder Apotheker.
----------------------------------------------------------------------------
From: slo@otter.hpl.hp.com (Steve Loughran)
Date: Fri, 16 Oct 1992 09:02:50 GMT
Subject: Re: Set window topmost during runtime - how ?
Organization: Hewlett-Packard Laboratories, Bristol, UK.
Newsgroups: comp.os.ms-windows.programmer.misc

In comp.os.ms-windows.programmer.misc, rkms@edscom.demon.co.uk (Richard Spence) writes:

> [ something about .. bringing a window to the top ]

> To bring a window to the top of the heap you should call:

>     BringWindowToTop(hwnd)

That brings it to the top of the current Z order...in windows 3.1 there are
some "extras" to support a topmost window which seemed to be what the
original poster was looking for.
Use 
	SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);

Putting your window topmost can be both useful and antisocial: always give 
your users an option of disabling it. I have been having problems with system 
modal dialog boxes being hidden by such windows and it is very inconvenient.

	-Steve
From: paul@argus.CAM.ORG (Paul Mainville)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: MS-Word, RTF, and help files
Date: 11 Oct 92 14:31:18 GMT

tjonz@caliban.Corp.Sun.COM (Todd Jonz) writes:

> Any software capable of generating an RTF file may be used to build help
> files.  Microsoft recommends that you use MS-Word for one reason and one
> reason alone: to sell copies of MS-Word.  (RTF stands for "rich text format",
> and I've heard speculation that it was given this name in hopes that it would
> help make Microsoft rich.)  Why do I find this so thoroughly offensive?

About a year ago, I downloaded CI$ a shareware program called Quick and Dirty 
Help (QDHELP??) that converted ascii files to RTF files.  It also supported
keywords for the different help options.  I finally used MS Word to do the
help files, but I think it is a good alternative for most of those who write
help files.

I don't remember the exact name of the file or in what area it was.  There
is a good chance it could be on other archive sites.

============================================================================
Paul Mainville                         email: paul@argus.cam.org 
Boisbriand, Quebec, Canada
============================================================================
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: printing text at an angle without learning all about fonts
Organization: Dept. of Energy, Mines, and Resources, Ottawa
Date: Tue, 13 Oct 1992 23:27:36 GMT

I am quite satisfied with the default font (whatever it is, I don't care), but
I want to label a few things with text at various angles.  I started to read
Petzold 3.1 chapter 14 and said "this is nuts - I shouldn't have to learn all
of this - I'm not writing a word processor!".  In other graphics systems, I
can use something like:
	PlotText(float x,float y,float angle,char *text);
so why can't I do the same in Windows?

So the question is "What is the simplest way to print text at an angle,
without learning too much about fonts?"

I saw the .lfEscapement field in LOGFONT and I suppose that is the only way
to change the angle.  I also know how to get the handle of the default font:
	hfont=GetStockObject(SYSTEM_FONT);
Now, how can I get a LOGFONT for the SYSTEM_FONT, so I can go in and modify
.lfEscapement?