HDTenEightyP/NetNews huggingface dataset:
From: dj@ekcolor.ssd.kodak.com (Dave Jones)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Speeding up graphics Was: Most efficient way to waste time in Windows
Date: 9 Oct 92 14:37:47 GMT
Article-I.D.: pixel.1992Oct9.143747.14226
Organization: :noitazinagrO
X-Newsreader: TIN [version 1.1 PL6]

kevin brooks (kbrooks@ut-emx.uucp) wrote:
: In article <1992Sep25.190709.14423@ncsu.edu>, dspascha@eos.ncsu.edu (DAVID SCOTT PASCHAL) writes:
: 
: I find that when I attempt to animate several objects in a window, using  
: BitBlt(), that the program's performance decreases significantly (i.e. all the
: objects "run down").  I have seen some programs that are able to keep many
: objects active and also moving at fast speeds, for example, the public domain
: "Fish" program and the "PACMAN"-like program.  Using Borland's "WinSight" I   
: found that these programs have windows that "own their own DC."  Is this the 
: key to "fast" action graphics in Windows?  Are there problems with using this
: technique, besides the necessity to allocate extra memory for the DC?  Perhaps
: someone could provide me with an example.  
: 
The classic advantage of using an "own DC" window is that the DC state
is retained between calls to GetDC or BeginPaint. 
With generic DCs Windows has to (at least) initialize the DC each time
(and maybe allocate it too), then you have to select in graphic objects etc.

When you release the DC Windows throws all that away - more overhead.
With "own DC" windows you can set things up once and leave them that
way.  However, you have to be pretty confident that you can track the
state of the DC yourself if you do this (you can also use Windows
functions to retrieve info about a DC).

The reason you are taught to clean up a DC after use (e.g.
OldObject=SelectObject(hDC,.....)..more code...SelectObject(hDC,
OldObject,...)) is that the window can be converted from "generic DC"
style to "Own DC" style in the class definition without any of the 
code being affected in any way.  Proper cleanup ensures that the
program will work with both kinds of window style. When an application
is designed to use "Own DC" style from the beginning you can get away
with less cleanup.


--
||)) There is no truth to the rumor that:)))))))))))))))))))))))))))))))))))|
||)) Lotus are suing Apple for copying the look and feel of their lawsuits )|
||))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))|
||Dave Jones (dj@ekcolor.ssd.kodak.com) | Eastman Kodak Co. Rochester, NY   |
Xref: sparky comp.os.ms-windows.programmer.misc:2596 comp.os.ms-windows.programmer.tools:1120
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
Subject: Re: Change the font in a ListBox
Date: 12 Oct 92 23:54:00 GMT
Followup-To: comp.os.ms-windows.programmer.misc
Organization: PE-Nelson

In article <1992Oct12.151005.9140@infonode.ingr.com>, fisherm@infonode.ingr.com (Matthew Fisher) writes:
|> Hello all,
|> 
|> 
|>     I have a problem with Borland C++ and the OWL lib.  I want to change the
|> font in a list box.  This sound easy enough but it has been a real pain.
|> If I make the listbox ownerdraw then I can change the font but I also have
|> to draw the elements, highlight, etc.  I just want to change the font!!
|> OWL has a method called Paint which has a display context as a parameter.
|> I tried changing the the DC with the selectobject(dc,hfont) function but
|> didn't have any luck.
|>     I am certain to be missing something simple. Will a some kind soul set me 
|> straight?
|> 

You can send a WM_SETFONT message to the listbox window.  I'm not too terribly
conversant with OWL, but it should go something like this:

   HFONT my_font = CreateFont(...);   // get the desired font

   // Assuming we have a reference to the listbox OWL object (?)
   //
   SendMessage(listbox.HWindow, WM_SETFONT, (WPARAM) my_font, 0L);

or something like that.  You should do this in the initialization code before
the dialog box is displayed.  In order to clean up afterwards, you should give
the listbox the system font and then delete the font object; so...

   SendMessage(listbox.HWindow, WM_SETFONT, 
              (WPARAM) GetStockObject(SYSTEM_FONT), 0L);
   DeleteObject(my_font);

A valid question may be why isn't there a SetFont type of member function
for TControl since all controls accept this message for the purpose of
changing the font at run-time?


----------------------------------------------------------------------------
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
----------------------------------------------------------------------------
Newsgroups: comp.os.ms-windows.programmer.misc
From: mokler@desert.in-berlin.de (Claudius Mokler)
Subject: Displaying 256-Color BMP's with SetDIBitsToDevice ?
Organization: Private Site
Date: Mon, 12 Oct 1992 17:18:44 GMT

I have a problem similar to one previously discussed here, with a slight
shift in ways of doing ...
I am displaying full-screen bitmaps with calls to SetDIBitsToDevice().
Everything works fine with 16 color BMP's.
(on old VGA's with 16 color modes this is a bit slowly, I know, but that
doesn't matter)
If I try to load a 256 Color BMP, the BMP is loaded but not displayed
correctly. Some of the displayed colors are the ones intended, but others
are simply omitted.

Does anybody know a workaround ?

Thanks in advance, Claudius

e-mail to : mokler@desert.in-berlin.de
Newsgroups: comp.os.ms-windows.programmer.misc
From: jtaylor@dseg.ti.com (Jeff Taylor)
Subject: Re: BC++ and BWCC problems (ICON,TIMER with DialogBox)
Organization: Texas Instruments, Incorporated
Date: Thu, 8 Oct 1992 19:11:50 GMT

In article <jtaylor.3.718567504@dseg.ti.com> jtaylor@dseg.ti.com (Jeff Taylor) writes:
>From: jtaylor@dseg.ti.com (Jeff Taylor)
>Subject: BC++ and BWCC problems (ICON,TIMER with DialogBox)
>Date: Thu, 8 Oct 1992 18:05:04 GMT
>Well, I love the way the BWCCs look, but I must admit that I'm having some 
>problems getting them to do what I think they are supposed to...
>
>Has anyone implemented a "bordlg" class dialog box as the mainwindow of an 
>application? I can't seem to get the icon that i've loaded to show up when 
>the window is minimized. Borland gave some hints about deriving from the
>"bordlg" class in a doc file called "BWCCAPI.RW" but evidently there's 
>something I don't understand... H E L P ...!
>
>Also, I have a timer set up and running (verified with WinSight), but I
>can't seem to intercept the WM_TIMER message to kick off my response 
>function. Any ideas?
>
>If anyone has any suggestions, please send them to:
>
>		jtaylor@mk1501.dseg.ti.com
>
>Thanks!
>
>Also, since I'm not a member of CompuServe, I can't get to the latest docs
>that Borland has out there. Can someone send me anything they have on working
>with the BWCC stuff.
>
>Mucho Appreciatho.

If the above EMAIL address doesn't seem to work,

		jtaylor@lobby.ti.com          will.

Sorry... jt
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:49:17 GMT
	<KIM.92Oct9091629@kim.Software.Mitel.COM>
Organization: MITEL Public Switching, Kanata, Ontario, Canada
In-reply-to: kim@Software.Mitel.COM's message of 9 Oct 92 13:16:29 GMT

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

| 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.

Sheesh ... ten minutes after I post this I find out that we're asking
Microsoft for permission to do this and waiting for a response right
now. I guess that leaves the option open, but not a foregone
conclusion.

--
Kim Letkeman	kim@Software.Mitel.COM
Newsgroups: comp.os.ms-windows.programmer.misc
From: wongl@rs6006.ecs.rpi.edu (Lance)
Subject: Windows Ref. Manual
Reply-To: wongl@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.
Date: Mon, 12 Oct 1992 05:41:18 GMT

Im looking for a Windows reference manual for 3.1

Can anyone recommend a good version, or at least one that you like?\
thanks.


Keywords: 

From: galenr@hpgrla.gr.hp.com (Galen Raben)
Date: Wed, 14 Oct 1992 23:01:40 GMT
Subject: Re: Enter key in VB
Organization: Hewlett-Packard, Greeley, CO
Newsgroups: comp.os.ms-windows.programmer.misc


Jon, In comp.os.ms-windows.programmer.misc you write:

{stuff deleted...}
>If I create a form in a window, is it possible to prevent the ENTER key from 
>selecting the default control.  I realise I can prevent a control from being 
>the default but what I really need is a collection of text boxes for input 
>with the enter key changing focus between each one.  Outside this control 
>area, I need two control buttons which are selected using the mouse.  For 
>example, if the user presses enter in the last text box, I don't want the OK 
>or CANCEL control buttons to be triggered.  This is really simple, probably, 
>but I need to know before I purchase software.

Yes, this is really simple!  You can intercept keystrokes in the KeyPressed
event procedure, writing some simple code in the event will allow you to
process the Enter key such that it will change focus from one text box to
the next...

The code looks something like this: 

  If KeyAscii = 13 Then  ' check for Enter keypress
    KeyAscii = 0  ' this fixes an annoying beep when using Enter to change focus
    Text2.SetFocus ' set the focus to your next textbox
  End If
 
You can also change the tab order of the textboxes (though you are essentially
doing it directly in the event with the SetFocus method)...  If you modify the
tab order you could prevent someone from tabbing to the OK or CANCEL buttons,
the only way they could get there is by the mouse only.  I usually keep my
OK and CANCEL buttons in the tab order just in case I have the one in a 
million customers that refuse to use a mouse!  You have lots of control over
what happens during key presses, mouse clicks, mouse movements! 

I've used VB (for Windows) for over a year now and am very pleased!!  My only
complaints have been the current limitation to 16 color graphics (even if you
have a 256 color or 24bit driver) and lack of documentation on hooking to
Windows Help (which MS has since released in the VB Pro Toolkit).
One of the neatest things about it is that if you can't do something directly
with a VB statement (such as creating a "transparent" control), you can always
tell VB to hook the Windows API functions and create what you need yourself!!

Hope this Helps!!
- Galen -
galenr@hpgrla.gr.hp.com

Newsgroups: comp.os.ms-windows.programmer.misc
From: bobb@agora.rain.com (Bob Beauchemin)
Subject: Execute a program
Organization: Open Communications Forum
Distribution: usa
Date: Fri, 16 Oct 1992 16:52:56 GMT

  I'm new to Windows programming, but this seems like something that should
be easy to do. How does one invoke (execute) a second Windows program from
a Windows program (ie like execl() in Unix)?
  Thanks,

Bob Beauchemin
bobb@agora.rain.com
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Windows Programming
Date: 8 Oct 92 21:10:06 GMT
Organization: PE-Nelson

In article <JKF.92Oct7214454@frisky.Franz.COM>, jkf@Franz.COM (Sean Foderaro) writes:
|> 
|>  Yes I agree that it is strange that dll's get a crippled C library, 
|> (e.g. sscanf missing and wsprintf doesn't print floats).
|> 

Crippled in MSC maybe, but Borland's runtime sscanf and sprintf work just
fine in a DLL (and even are, themselves, available in a DLL).


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


Newsgroups: comp.os.ms-windows.programmer.misc
From: jkf@Franz.COM (Sean Foderaro)
Subject: Re: Windows Programming
Organization: Franz Inc., Berkeley, CA
Date: Thu, 8 Oct 1992 05:44:54 GMT


 Yes I agree that it is strange that dll's get a crippled C library, 
(e.g. sscanf missing and wsprintf doesn't print floats).

  One solution to printing floating point numbers is to use fcvt.  
It's a pain since you have to place the decimal point in the string yourself.  
Also keep in mind that the last two arguments are of type
	int *    
not   
	int FAR *  
so you'll have to declare two static int's in your dll (don't pass a pointer 
to a stack allocated int, this is a dll after all and ss != ds).  
[I'm assuming that you are compiling in the small or medium model, btw].

-sean

Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: how are IDCANCEL, WM_SYSCOMMAND/SC_CLOSE & WM_DESTROY related?
Organization: Dept. of Energy, Mines, and Resources, Ottawa
Date: Thu, 15 Oct 1992 23:30:10 GMT

I have about a dozen dialog boxes and I want to be able to double click the
handle in the upper left or use ALT-F4 to close them.  All of the dialog
box procs call EndDialog upon receiving WM_DESTROY (that is correct, isn't it?)
Not all dialog boxes have both CANCEL & OK buttons - some have only OK buttons.

I have found that if the box has both OK & CANCEL, the double click or ALT-F4
action sends a WM_DESTROY and all is ok.  However, if the box has no CANCEL
button, nothing happens - all of the following fail:
	(a) double click on system menu
	(b) click system menu & 'close window'
	(c) alt-F4
In these cases, I have to intercept WM_SYSCOMMAND, wparam==SC_CLOSE and then
send myself a WM_DESTROY message.

Why does this happen?  Obviously, it is translating the action to WM_DESTROY
but only if there is a CANCEL button.  Where is this being done.  Can anyone
point me to the documentation for this behaviour.  Is my solution of processing
WM_SYSCOMMAND/SC_CLOSE & sending WM_DESTROY correct?
From: dj@ekcolor.ssd.kodak.com (Dave Jones)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: How do you create Win3.0 help file with BC3.1?
Date: 9 Oct 92 14:45:26 GMT
Article-I.D.: pixel.1992Oct9.144526.14456
Organization: :noitazinagrO
X-Newsreader: TIN [version 1.1 PL6]

Russell Lang (rjl@fawlty10.eng.monash.edu.au) wrote:
: 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?
: 
Look more closely at the tools.  The BC++ 3.1 Resource Compiler has a
3.0 setting: there may be one with the help compiler too.

--
||)) There is no truth to the rumor that:)))))))))))))))))))))))))))))))))))|
||)) Lotus are suing Apple for copying the look and feel of their lawsuits )|
||))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))|
||Dave Jones (dj@ekcolor.ssd.kodak.com) | Eastman Kodak Co. Rochester, NY   |
From: cjr@cs.bham.ac.uk (Chris Ridd)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Wanted: Windows DLL to draw graphs
Date: 8 Oct 92 21:38:38 GMT
Organization: University of Birmingham

I'm doing a project in Authorware Professional for Windows, and need a section
which has some graphs in. Authorware can call DLLs, so...

I need to find something that'll draw reasonable graphs (maximum of 3 series to
plot, could be different styles - bar, area, line) in a DLL.

Please mail direct, our news expires too quickly for me to catch it.

Cheers,

--Chris
From: jpennell@axion.bt.co.uk (John Pennell)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Enter key in VB
Date: 12 Oct 92 09:59:05 GMT
Reply-To: jpennell@axion.bt.co.uk (John Pennell)
Organization: British Telecom Research Labs



I  apologise in advance if this is in FAQ but,

I haven't yet purchased VB, although I intend to.  I wnat ot write a database system that mimics one already in use as much as possible.  The users have never used windows, and I don't want to overwhelm them too much with detail.  I have considered many packages and, having used VB and Q+E database before, have decided to buy them.

The problem is this:

If I create a form in a window, is it possible to prevent the ENTER key from selecting the default control.  I realise I can prevent a control from being the default but what I really need is a collection of text boxes for input with the enter key changing focus between each one.  Outside this control area, I need two control buttons which are selected using the mouse.  For example, if the user presses enter in the last text box, I don't want the OK or CANCEL control buttons to be triggered.  This is reall



y simple, probably, but I need to know before I purchase software.  Replies via E-Mail or post, I'm not bothered, although E-Mail saves bandwidth.

Thanks in advance,

Jon
From: dan@stanton.UUCP (Dan Mahoney)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Communications under Windows
Summary: VT100 emulator wanted
Keywords: communications,dialog,tpw,timeout
Date: 4 Oct 92 23:18:00 GMT
Organization: Stanton Public Domain Systems, Stanton, Ca.


I am working on a VT100 emulator for Windows.  I would really like to
avoid reinventing the wheel.  Does anybody have any suggestions where I
might find source code for a VT100 or VT220 emulator?

Any suggestions would be greatly appreciated.

m
Dan Mahoney
dan@stanton.cts.com
Newsgroups: comp.os.ms-windows.programmer.misc
From: jgeniec@lilac.cis.ohio-state.edu (Joseph Geniec)
Subject: Playing MIDI files with Turbo C++ v3.0
Organization: The Ohio State University Dept. of Computer and Info. Science
Distribution: na
Date: Wed, 7 Oct 1992 14:23:34 GMT


	I have Borland's TC++ v3.0 for windows, which of course does not have
any multimedia support. I need to know where I can get code to play standard
MIDI files!

						Joe Geniec
From: cornelis_k@et.tudelft.nl
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: TFileWindow size problem
Date: 13 Oct 92 10:16:38 +0200
Organization: TU-Delft, dpt of Electrical Engineering

IWith Turbo Pascal for Windows, I found the problem that files read into a
TFileWindow object cannot be larger than ca.32kbytes. Is there anyone who can
tell me how I can manage larger files too? And if not, how can I at least 
inform the user that his/her file is cut off, because the standard TFileWindow
just cuts the file without any warnings.

Thanks in advance for any help

Rik
From: jteed@ucrengr.ucr.edu (jennifer a. teed)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Spreadsheets/Dynamic arrays (visually)
Date: 14 Oct 92 00:56:59 GMT
Article-I.D.: galaxy.22933
Organization: University of California, Riverside

Hello, everyone.  

I'm working on my first Windows project, and I have one major 
problem.  One of the things I need to implement is a two 
dimensional array that is dynamically sized (i.e. at run time) 
in both directions (similar to a spread sheet). I don't need to 
do anything fancy with the array once it's created (besides edit 
the values in cells).

I know the number of cells at run time (they are user specified). 
Once specified, this number is fixed.  Doing something like this 
statically is a piece of cake.  Just set up an array of edit boxes 
in the .rc file.   However, I can't seem to find anything that does 
this dynamically.  

Perhaps I'm missing a better way of doing this. (I've thought
about using a single edit box above a dynamically drawn array
in the rest of the client area, but then how do you detect which
cell you're in?  and how do you send the messages back?)  I would
gladly accept any help or pointers to information or sample code.
I've been thru the SDK manuals, the MFC manuals, the Petzold book,
and numerous others.  If I'm missing something somewhere in one 
of them about this, please point it out to me.  :)

I'm using the Microsoft Foundation Classes, but anything I could
find would help (I've got access to the Borland stuff, as well
as the regular MS C SDK.).

I have been unable to find even a simple spreadsheet in the sample
code.  Is the reason I have been unable to find anything like this 
because it's so difficult to do that no-one is willing to give 
it away?

Please respond directly to me through email. If interest warrants,
I'll post a summary.

Thanks in advance for all of your help!

--Jen
/***********************************************************************/
/*Jennifer Teed               * "But to risk we must, for the greatest */
/*United States Salinity      * hazard in life is to risk nothing. For */
/*Laboratory                  * the man or woman who risks nothing,    */
/*Riverside, CA 92507         * has nothing, does nothing, IS nothing."*/
/*jteed@ucrengr.ucr.edu       * (I dunno who it's by, but I like it :) */
/***********************************************************************/
Newsgroups: comp.os.ms-windows.programmer.misc
From: kro@fics.uucp
Subject: My own DialogBox call
Organization: Kvam data as
Date: Tue, 13 Oct 1992 14:36:00 GMT

I would like to create an ordinary window containing the exact same items 
that a dialogbox would, and then call some function which should return 
when a specified event occurrs.

I need to know what I should put into this function to make it appear as
a blocking operation (like the DialogBox call).

Knut
-- 
------------------------------------------------------------------------
Knut Rogde                      Phone : +47 4 623766
Software enginer                Fax   : +47 4 623985
Kvam data as                    Email : kr@fics.uucp
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: how do I do a floating (x,y) window?
Organization: Energy, Mines, and Resources, Ottawa
Date: Fri, 9 Oct 1992 04:06:30 GMT

I want to popup a floating window that will show the current (x,y) position
of the mouse.  I don't know whether this is a Dialog Box or a window?  I
looked at Petzold's modeless dialog box, but it doesn't apply to me because
my window wouldn't have or need any buttons in it.  I just want to write
the current (x,y) in the window.  So:
(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?
(b) do I use CreateWindow, CreateDialog or BeginDialog
(c) in response to WM_MOUSEMOVE, how do I write (x,y) on it
(d) how do I kill it from outside (EndDialog, DestroyWindow)

I want this to float like the 3 toolbars in Borland's Resource Workshopt,
i.e. enabled/disabled from a menu item.

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?