HDTenEightyP/NetNews huggingface dataset:
Subject: Re: moving the input focus 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Fri, 8 Jan 1993 19:15:38 +0000

In article <1851@bdrc.bdrc.bd.com> jcl@bdrc.bd.com writes:

>Hi there!
>
>I just finished rewriting Petzold's COLORS2 program in Programming Windows
>3.1 in the style of his HEXCALC example in the same book.  Basically,
>my main window is a dialog box with three scrollbar controls and a
>static area upon which I paint the current color as defined by the
>scrollbar positions.  Now in his book, Petzold states that by including
>the WS_TABSTOP windows style for your dialog controls, Windows automatically
>will handle switching the input focus upon receiving a tab or shift-tab
>from the keyboard.  Well, it doesn't work.  Tab and shift-tab are ignored
>in my program.  If I take out the WS_TABSTOP style, then the keyboard
>interface for the scrollbars disappears (e.g. PgUp and PgDown don't work),
>so the WS_TABSTOP is doing something.
>
>How do I fix this problem?  In HEXCALC, Petzold takes about keeping the
>buttons from getting the input focus. My scrollbars can get the focus
>when clicked upon, they just can't give it up without a mouse click on
>another scrollbar.
>
>Any help would be appreciated.
>
>john
>-- 
>John C. Lusth, Becton Dickinson Research Center, RTP, NC, USA  jcl@bdrc.bd.com
>

Have you got an "IsDlgMessage" line in your main message loop?  This is the
function which gives you the tab-moving-between-controls behaviour.

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
| (Still awaiting inspiration              | CIX: cmarriott              |
|  for a witty .sig .... )                 | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
 
Newsgroups: comp.os.ms-windows.programmer.misc
From: chris@chrism.demon.co.uk (Chris Marriott)
Subject: Re: BC++ "BorDlg" problem 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Tue, 12 Jan 1993 19:40:03 +0000

In article <1idetiINNssf@uwm.edu> ajgd@miller.cs.uwm.edu writes:

>     I'm using Borland C++ 3.1 and have the following problem
>utilizing the Resource Workshops BWCC "Borland Window Custom
>Controls.
>     When I create a dialog box using the BWCC class "BorDlg"
>and link it with "brc <filename>".  Then when I run the program
>and execute the dialog box, it is not displayed unless I have 
>Borland C++ or Resource Workshop running or have LOADBWCC.EXE 
>loaded.  If any of these three are running the dialog box is
>displayed, but if none of them are running the box is not 
>displayed.
>
>     Am I missing some basic #include or what?  
>     Any Ideas or suggestions would be greatly appreciated.
>
>     Andrew J.G. Delzer
>     AJGD@Miller.CS.UWM.EDU
>
>
>

You're probably forgetting to link your program with BWCC.LIB.

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
| (Still awaiting inspiration              | CIX: cmarriott              |
|  for a witty .sig .... )                 | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
From: deitsch@sol.crd.ge.com (Andy Deitsch)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Borland "BorDlg" button problem
Date: 11 Jan 93 14:14:10 GMT
Reply-To: deitsch@sol.crd.ge.com
Distribution: comp.os.ms-windows.programmer.misc
Organization: GE Research & Development


>	I am using Borland C++ 3.1 with the Dialog class BorDlg, which is 
>the Borland Window Custom Controls.  I know how to create those Ok, Cancel
>nice looking Custom Control buttons.  My problem is that I also
>want to create the same bitmmaped buttons (New, Change, Delte) as in the
>Resource Workshop.  Is there a way to create those buttons as creating
>those OK, Cancel buttons ?

If you load the executable for workshop into workshop then it will 
decompile the resources for you and you can look through the bitmaps
(there are several) needed to create these buttons.  Once you have found
the bitmaps you want, copy them to your own .rc file by bringing up 
another instance of workshop and perform a "copy / paste" operation 
between the two apps.

Now, select the borland button from the tools.  After placing it in your
dialog box, double click to get the info on it.  Select bitmap and 
use the bitmap you want.

Hope this helps.
-- 
_________________________________________________________________________
Andy Deitsch                             email    : deitsch@crd.ge.com  
GE Corporate Research & Development      phone    : (518) 387-7207   
Schenectday, NY 12301                    dial comm: 833-7207
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: When to take a snapshot?
From: dueck@brandonu.ca
Date: 7 Jan 93 14:17:29 CST
Organization: Brandon University, Brandon, Manitoba, Canada

I have an application that draws graphics in a window. I want to save the
contents of the window across task switches so they can be restored when my
application is reactivated. At what point should I take a snapshot of the
screen? 

Some obvious answers present themselves. Upon receiving WM_ACTIVATE with
wParam=WA_INACTIVE seems a good place. The problem is that if WM_ACTIVATE was
generated as a result of ALT-TAB, there is a rectangular ALT-TAB window sitting
on top of my window when the WM_ACTIVATE message is received. The snapshot then
includes the ALT-TAB window. 

The same problem holds for WM_KILLFOCUS. 

Since some of the graphics drawn in the window manifest animation, it is not
useful to consider a metafile approach to redrawing the window. 

I also do not wish to draw on a memory context and a device context at each
grapics call. While this would maintain the necessary snapshot, I believe
the performance hit would be unacceptable. 

I am still looking for a good answer to this problem.
From: J.Cowan@cs.ucl.ac.uk
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Dynamic GUI libraries
Date: 4 Jan 93 16:21:34 GMT


Hi,

I have been looking for a GUI tool (eg a C++ class library) which
allows you to build the UI dynamically (ie at runtime). Most
of the other class libraries (eg OWL) and tools like Visual Basic
seem to adopt a very static model - ie you use a resource compiler
to design a form etc. I know for example that you can for example 
create dialog boxes dynamically through the SDK via a CreateDialogIndirect,
but I would like to use a much higher level tool than the SDK.

Can anyone make any recommendations?

James Cowan     Dept of Computer Science, University College London

Newsgroups: comp.os.ms-windows.programmer.misc
From: kevr@is.morgan.com (Kevin Reilly)
Subject: Excel Add-In
Organization: Morgan Stanley & Company
Distribution: usa
Date: Sat, 9 Jan 1993 17:50:16 GMT


At startup of Excel I have a number of add-ins being loaded. I would
like to be able to unload an add-in if a certain condition is found.
How can I do this?

Thank you in advance!!

Kevin M. Reilly
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: Creating custom messages in Windows 3.1
Organization: Energy, Mines, and Resources, Ottawa
Distribution: na world
Date: Thu, 7 Jan 1993 18:41:42 GMT

In article <1993Jan7.040719.11710@mailer.cc.fsu.edu> rekle@loligo.cc.fsu.edu (Rick Ekle (CompSci)) writes:
>I was thinking the other day:
>
>Is this possible?  I would like to create a custom message and call it
>from within my program.  i.e.
>
>#define WM_MYNEWMESSAGE <integer value>

	Yes, they have provided for it, by reserving a block for your
	use.  Look up WM_USER (start of block you can use).
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Newsgroups: comp.os.ms-windows.programmer.misc
From: hill@netcom.com (Tom Hill)
Subject: Re: trapping interrupts under windows
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Wed, 13 Jan 1993 02:20:30 GMT

In article <93012.101937KDW103@psuvm.psu.edu> <KDW103@psuvm.psu.edu> writes:
>  Hello,
>    I'm having trouble trapping IRQ11 or IRQ12 under windows.  I am trying to
> write a device driver.  The problem isn't really with trapping the interrupt.
> I found some sample code that helped me do that.  The problem is that anytime
> that the IRQ line is enabled and I switch focus to anything other than the
> program that uses the driver.  Windows crashes.  I've seen it crash 6 totaly
> different ways, and I'm getting tired of it.  Does anyone have any idea what
> is going on?  


If you could clarify a little more, making suggestions would be easier.
How are you trapping the interrupt? Are you writing a VxD or grabbing
the interrupt from a DLL? 

Are you having the problem if you change focus after an interrupt
or only if you get an interrupt after changing focus? Are you changing
focus to aDOS app (Which will change the current VM?) 


> Is windows changing the interrupt vector table w/o telling me?

The interrupt vector table always points to the VPICD, even if you
get ownership of the IRQ in a VxD, so this should not be a problem.

>
>  Thanks,
>     Keith (kdw103@psuvm.psu.edu)

Tom Hill
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Passing information from dialogs ?
Date: 7 Jan 93 20:03:09 GMT
Distribution: inet
Organization: PE-Nelson

In article <1ihdmfINNnnt@sauna.cs.hut.fi>, s34090e@kaira.hut.fi (Petri Taavila) writes:
|> What is the "best" way to pass information from modal
|> dialogbox to its parent window if there are many
|> different controls in the dialogbox?

1. If the parent window only needs to know which button (e.g. OK or Cancel)
   was pressed then you can do this with the return value from the call
   to DialogBox() -- this return value is the second parameter supplied to
   the EndDialog() call.

   The assumption here is that the other controls in the dialog box are
   used to adjust global variables that both the dialog box procedure and
   the parent window code have access to.

2. You can pass a pointer to a block of memory as the last parameter in
   the call to DialogBoxParam().  The dialog box procedure should store this
   in a static variable during WM_INITDIALOG processing so that it can
   access it during subsequent messages.

   This block of memory then contains the flags and other assorted data
   that map onto the dialog box controls.  The dialog box adjusts the data
   as necessary and when control is returned to the parent window it can
   read the data to see what happened.

I find myself doing it either way -- it depends on how much you dislike
using global variables.  If I stretch my imagination I'm sure that I could
come up with some more esoteric ways of doing this, but these two are going
to be the most common.


----------------------------------------------------------------------------
Tom Brown               |  "She turned me into a newt...
PE Nelson Systems       |                                  ... I got better"
twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
----------------------------------------------------------------------------
From: defaria@hpcuhe.cup.hp.com (Andy DeFaria)
Date: Fri, 8 Jan 1993 21:20:53 GMT
Subject: Help needed with BC++ 3.0 Windows Programming without OWL
Organization: Hewlett Packard, Cupertino
Newsgroups: comp.os.ms-windows.programmer.misc

OK I give up.  I have been trying to learn how to program MS Windows using
Borland C++ 3.0 *without* Application Frameworks.  Coming from X/Motif
programming, it appears to me that programming without some sort of class
library such as Borlands Object Windows Library (OWL or <owl.h>.  This is part
of Application Frameworks right?) is akin to programming raw Xlib.  Using OWL
is sorta like using Xt/Motif.  Well I'm working on getting Borland C++ 3.1
*with* Application Frameworks but until then I gotta use just straight MS
Window calls.

I've made a lot of progress doing so.  I have my application up and *looking*
pretty good but it isn't *doing* anything really useful yet.  I have learned
how to create windows, child windows, dialog boxes, buttons, how to get the
icon image right, etc.  But the questions about how to do this or that are
coming fast and furious.  I try to resolve them myself but sometimes I just
get stuck.  Perhaps these are FAQ and if I could be pointed to the right place
it would be helpful.  I bought a book (cost me ~$43 too!) that was
specifically oriented toward Borland C++ 3.1 and had some stuff about raw MS
Window calls.  Indeed it has a complete function reference.  But after giving
some trivial examples of raw MS Window calls it goes on to describe OWL.

Anyways, here are the problems that I haven't been able to resolve and really
need answered inorder to get my program doing anything useful.

        How do I write get or set text into a child window?  My application
        presents a form-like window that has child windows that are TEXT
        input boxes.  I cannot figure out how to put/get text into or out of
        these child windows.

        How does one put text into a dialog box?  I want to do a familiar "Are
        you sure you want to delete 'thing being deleted'" type of dialog.  I
        need to construct the message string for the dialog box but I don't
        know how to do that.

        How can one get an icon image or a bmp into a button?

        I tried making what would be called a staticTextWidget in X but it's
        color is wrong.  I want the color for a staticTextWiget to be the
        application's background color, not a TEXT boxes' input color.

        How would I change the input editing semantics of these text input
        areas to be as I specify.  I like emacs type editing.  I get this
        easily in X via translation table and like to implement this in my
        program.

And a non window related one:

        How does one talk to a modem and dial a number like CARDFILE or
        TERMINAL does?

                                Thanks much
Newsgroups: comp.os.ms-windows.programmer.misc
From: wkk@cbnewsl.cb.att.com (wesley.k.kaplow)
Subject: DDE and PowerPoint
Organization: AT&T Bell Laboratories
Date: Fri, 8 Jan 1993 14:56:03 GMT
Keywords: DDE PowerPoint ACCESS

We were intending to use ACCESS and DDE to be able to get information
about PowerPoint 3.0 presentations into database tables.  However,
Microsoft has told us that PP 3.0 does not support DDE and that they
have no plans to incorporate DDE in the next few releases.  They did
however state that there is some DDE facilities in PP to support OLE
but that they this was for internal use only.  

Is there any way, other than lots of mouse clicking, to automate at least
the recovery of slide titles, outlines, and slide contents so that the
information can be incorporated into ACCESS or some other database.  I know
that NDW 2.0 will launch and print a PP file if it is dragged over the 
desktop printer icon.  Does this use DDE, or just command line arguments?

It seems strange that the newest release of PP does not support DDE,
a major element if you need to put together a system that is any more
sophisticated that the program's standard interface.  What about the
multi-media angle? Shouldn't every non-trivial program at least support
DDE to control menu operation?

Thanks for any information or hints,

Sincerely,

Wesley Kaplow
Bill Hery
AT&T Bell Laboratories
Whippany, NJ 07981


kaplow@att.com
hery@att.com
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How to read PrtScr key
From: dueck@brandonu.ca
Date: 7 Jan 93 14:03:23 CST
Organization: Brandon University, Brandon, Manitoba, Canada

How can I read the PrtScr key from my application?
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: When to take a snapshot?
Organization: Energy, Mines, and Resources, Ottawa
Date: Mon, 11 Jan 1993 22:07:17 GMT

In article <1993Jan7.141729.2931@brandonu.ca> dueck@brandonu.ca writes:
>I have an application that draws graphics in a window. I want to save the
>contents of the window across task switches so they can be restored when my
>application is reactivated. At what point should I take a snapshot of the
>screen? 
	When you receive WM_PAINT and draw your screen, also save
	the whole thing as a bitmap.  If you get WM_SIZE, then kill
	the bitmap, it is now invalid.  You may also kill it when
	you change the picture yourself.

	Subsequently, when you get WM_PAINT messages, if the bitmap
	still exists, then BitBlt it to the screen, to redraw:

	static HBITMAP hbitmap=NULL;
	...
		case WM_PAINT:	if(hbitmap){
				  BitBlt using hbitmap
				}else{
				  hdc=BeginPaint(...)
				  DrawMyPicture();
				  hbitmap=SaveMyPictureAsBitmap();
				  EndPaint(...);
				}
				break;

	If you need more details, e-mail me and I'll send you some code.
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Newsgroups: comp.os.ms-windows.programmer.misc
From: HEAGYWS@ctrvax.Vanderbilt.Edu ()
Subject: Beginner Visual Basic Question
Organization: Vanderbilt University
Date: Sun, 10 Jan 1993 17:17:31 GMT
X-News-Reader: VMS NEWS 1.24

A friend of mine using VB 2.0 has a question.  I'll post his
question below, if any replies could be sent to my e-mail
address, I will pass them along to him.

===================
Subj: SAVING IN VIS BASIC I HAVE VISUAL BASIC 2.0 FOR WINDOWS.  EACH TIME I
SAVE A PROJECT, I LOOSE ALL THE FORMS AND CODE THAT GO WITH IT.  I CAN RUN THE
PROGRAM BUT I CAN'T ADD OR CHANGE ANYTHING ON IT BECAUSE THE  PROJECT WINDOW
DOES --NOT-- APPEAR AFTER OPENING.  EVEN SOME OF MY OLDER PROJECTS WILL NOT
COME UP.  WHAT DID I DO WRONG? I'VE CHECKED THE MANUALS AND SAVED PROJECTS
EXACTLY AS THEY SAY, BUT... 
===================

Thanks for your help...Win

heagyws@ctrvax.vanderbilt.edu
=--------------------------------------------------------------=
From: cs92njc@brunel.ac.uk (Nicholas J Clayton)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Drawing on a dialog
Date: 11 Jan 93 12:28:19 GMT
Organization: Brunel University, West London, UK


Hi,

Does anyone know how to blit a bitmap onto a dialog box? Sounds like a simple
procedure, so I am sure I am missing something elementary...

Given a bitmap referenced in the RC file, I load this bitmap during program
initialisation, and store the handle in a global variable.

During processing of the WM_INITDLG message, I get a DC for the dialog, select
the bitmap into a memory DC and try and blit the bitmap to the dialog. No joy.

I try creating a child window on the dialog (type STATIC, with a WHITEFRAME)
and try and get a DC to this before blitting the bitmap. No joy.

I try turning the bitmap into a brush, and drawing a rectangle on the dialog
using this brush. Again, no joy.

I must be missing something fairly obvious, but I'm not sure what it is 
(obviously). For those who have seen it, the effect I am trying to duplicate
is the "Help about" box for WinWord 2, with an oversized icon in the top left
corner.

Any takers?

-- 
_/     _/ _/_/_/ _/  _/  For those who are wondering why,
_/_/   _/   _/   _/ _/   What we call SF ain't Sci-Fi,    
_/  _/ _/   _/   _/_/         It's just there a fine line 
_/   _/_/   _/   _/ _/        Between Robert Heinlein,      
_/     _/ _/_/_/ _/  _/  And "Son of the Two Headed Fly"
From: iah@dmu.ac.uk (Andy Humberston)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Various example files required
Keywords: Visual Basic - CA-Realizer - C - BMP
Date: 11 Jan 93 13:30:04 GMT
Organization: De Montfort University, Leicester, UK.

I have a number of questions:

We need some programming examples of Visual Basic, CA-Realizer and C for
Windows.  We also need the programming description of the BMP graphics format.

Thanks



-- 
 ------------------------------------------------------------------
|     Andy Humberston, IT Services, De Montfort University, UK     |
|  Tel: +44 533 577159  Fax: +44 533 577170  EMail: iah@dmu.ac.uk  |
 ------------------------------------------------------------------
From: ee_d270@ceres.kingston.ac.uk (Richard D Knight)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Setting up windows on creation
Date: 12 Jan 1993 12:07:57 -0000
Organization: Kingston University, Kingston-upon-Thames
Distribution: world
NNTP-Posting-Host: ceres.kingston.ac.uk

I am using OWL and want to have text displayed on the main window as soon
as it is created, but I cant seem to get it to work. 

Can anyone help?

thanks

ee_d270@king.ac.uk
From: christb@infmuc (Christian Barmala)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Interrupt/DPMI
Date: 8 Jan 93 08:47:36 GMT
Organization: Informix Software, Inc.
X-Newsreader: Tin 1.1 PL3

In an assembler listing of a Windows program I saw two different methods
to call an BIOS/DOS interrupt. The first was, to set up the registers
and issue INT 13H as I would do under real mode DOS even if Windows runs
in protected mode. The other was to use a DPMI service, that "simulates a
real mode interrupt".

When do I have to use which method?
Newsgroups: comp.os.ms-windows.programmer.misc
From: turre@pcuf.fi (Jarkko Turunen)
Subject: Re: Enabling the first and only window in MFC
Organization: The PC-users of Finland
Date: Sat, 9 Jan 1993 20:22:54 GMT

Sorry I am not able to quote your message with ProComm Plus for Windows
 
The problem was to bring the Window of the first application instance to 
top when user tries to start second instance.
 
You gave me code which was like in the Win 3.1 SDK which uses the 
FindWindow with the WindowClass. The reason why I can't use that method 
is that MFC will register my Windows classes and I can't obtain the
name of them anywhere! And because the names are generated by MFC I
can't be sure if the Windows found is from my app or somebody else's
app using MFC. 
 
Is there anyway to register window classes in MFC with a classname of
my own?
Newsgroups: comp.os.ms-windows.programmer.misc
From: dan@delfin.com (Dan Stickel)
Subject: LB_ADDSTRING Redrawing
Organization: Delfin Systems
X-Newsreader: Tin 1.1 PL4
Date: Sat, 9 Jan 1993 01:18:37 GMT

I have created an owner draw listbox.  Is there any way to prevent
the listbox from redrawing all visible items when it scrolls one line 
after receiving an LB_ADDSTRING message?  Without the LB_ADDSTRING,
scrolling only redraws the newly visible item, doing a quick bitmap
shift of the other items.

I have tried everything I could think of.  At this point, it seems
to me that there is no way to avoid it.