HDTenEightyP/NetNews huggingface dataset:
From: pshepher@elli.une.edu.au (Philip Shepherd)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Dialog Box Background Colour
Date: 17 Nov 92 00:18:49 GMT
Organization: University of New England - Northern Rivers (Lismore)


In "comp.os.ms-windows.programmer.misc", sean@sun-3 wrote:-
>Hi
>
>I'm having trouble trying to change the background colour of my 
>dialog boxes. I'm using Borland's Object Windows. The following
>fragment of code is what I'm using at the moment, but it has NO
>effect!! However if I use the exact same code fragment for a class
>derived from TWindow it works fine! I've designed my dialog boxes 
>in the Resource Workshop if that makes any difference.
>
>Has anybody else done this??
>


The answer is you need to process the WM_CTLCOLOR as follows:-

------------------- Start of .h ---------------------------------------
class TMyDialog : public TDialog {
  ...
    virtual void WMCtlColor(RTMessage Msg) = [WM_FIRST + WM_CTLCOLOR];
  ...
};

-------------------- Start of .cpp ------------------------------------
void TMyDialog::WMCtlColor(RTMessage Msg)
{
    SetBkMode(Msg.WParam, TRANSPARENT);

    switch (Msg.LP.Hi) {
    case CTLCOLOR_EDIT:
	Msg.Result = EditBrush;
	break;
    case CTLCOLOR_DLG:
    case CTLCOLOR_STATIC:
	Msg.Result = DialogBrush;
	break;
    case CTLCOLOR_LISTBOX:
    case CTLCOLOR_BTN:
    case CTLCOLOR_MSGBOX:
    case CTLCOLOR_SCROLLBAR:
    default:
	Msg.Result = ButtonBrush;
    }
}
-------------------------- End of .cpp --------------------------------

the important part is setting Msg.Result to a suitable brush handle when
Msg.LP.Hi = CTLCOLOR_DLG.

Good luck

Phil
-- 
Philip 	Shepherd                      Internet: pshepher@loki.une.oz.au
University of NewEngland
Northern Rivers
Lismore NSW Australia
From: bruce@ais.com (Bruce C. Wright)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: MS Programmers FAQ
Date: 23 Nov 92 19:59:53 GMT
Organization: Applied Information Systems, Chapel Hill, NC

In article <1992Nov23.165715.13836@porthos.cc.bellcore.com>, andys@picard.NoSubdomain.NoDomain (Andy Say) writes:
>   Did anyone else have a problem with the FAQ??  It is listed at being only
> two parts acording to the header, yet the second part has no matching
> uuencoded end statement...  Anyone know where I can pick this up from an
> FTP site??

I also had problems with the FAQ.  No, I don't know of an FTP site.

I tried to send mail to the poster (Tom Haapanen), but the return
address does not seem to work from here -- I suspect a problem in
one of the name servers between here and there.  Does anyone know
a different path to him?  I was trying to send him some corrections
to the Windows User FAQ that he posted ...

Bruce C. Wright
From: jan@nasobem.stgt.sub.org (Jan Schiefer)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How does Windows draw the "ghost frame"?
Date: Mon, 16 Nov 92 0:57:26 GMT
Distribution: world

Hi,

I am trying to draw a frame similar to the "ghost frame" Windows draws
when you move a window by dragging the caption bar. I am having problems,
however.

Even on a 24-bit display this frame appears to be dithered. I cannot find
a pen style and color to draw the same pattern. I suppose the width and
height of the frame is SM_CXFRAME and SM_CYFRAME, respectively.

Or do I have to draw two rectangles and fill the gap in between with a
specific pattern?

Thanks in advance,

        Jan

--
             Jan Schiefer, DL5UE, jan@nasobem.stgt.sub.org
                 "Oracle et laboracle!"   - Fritz Hohl
Newsgroups: comp.os.ms-windows.programmer.misc
From: makuchba@ucunix.san.uc.edu (Brian Alan Makuch)
Subject: Help printing 3x5 cards
Summary: Printing irregular page sizes 
Organization: University of Cincinnati
Date: Thu, 19 Nov 1992 21:04:22 GMT

 I am working on an application which needs to print 3x5 cards
using TrueType fonts. My problem is-- How should I go about doing
this. Is there a way to tell print manager I'm printing to 3x5 cards,
or do I have to treat the group of cards to be printed out as one
large page [I'm printing to a continuous feed DM printer]. 

Any hints or suggestion would be appreciated.
From: dpn2@po.CWRU.Edu (Damien P. Neil)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: How do you scroll (part of a) window??
Date: Wed, 18 Nov 1992 23:42:16 GMT
Organization: Case Western Reserve University
NNTP-Posting-Host: b63519.student.cwru.edu

In article <1992Nov18.204742.9936@leland.Stanford.EDU> rlswent@leland.Stanford.EDU (Richard Swent) writes:
>I can't figure out how to implement scrolling in a sensible
>manner. I want to have a window that has some header information
>and some buttons at the top, then a long list below that can
>be scrolled via a scroll bar. The part of the window that scrolls
>can be a child window if that is easier. 
>
>I've looked at the scrolling functions (ScrollWindow, ScrollDC) and
>can't make them work right. If I use ScrollWindow it scrolls the
>bitmap but as soon as my Paint procedure is called, it paints stuff
>just the way it had been. I tried ScrollDC and it didn't do anything
>at all. The problem is really my Paint procedure which doesn't know
>anything about the scrolling. What is the "right" way to do this?

OK, you have the right idea here. ScrollWindow will work just fine for 
scrolling the window -- what you have to do is make your Paint procedure 
scroll aware. In other words, if you scroll the window 10 pixels left, you 
must have your Paint procedure draw everything offset by 10 pixels.

This is a pain to do, but not really that difficult once you get it going. 
Just keep a "xoffset" and "yoffset" pair of variables, and use them in all 
your GDI calls.

Alternatively, buy/write a good class library and get it to do it for 
you... :-)
+-------------+------------------+---------------------------------+
| Damien Neil | dpn2@po.cwru.edu | Case Western Reserve University |
+-------------+------------------+---------------------------------+
Newsgroups: comp.os.ms-windows.programmer.misc
From: plaut@sc2a.unige.ch (Olivier PLAUT)
Subject: *** Need -HELP- with EXCEL3: cells formatting ***
Organization: University of Geneva, Switzerland
Date: Sun, 15 Nov 1992 15:24:37 GMT

Hello.

I need some help with EXCEL. I'm running EXCEL3.0 under WINDOWS3.1.

I have differences between what I see on the worksheet and what appears
on the PrintPreview (the printed size corresponds to the preview).

Let's say I write in a cell:

 |         |         |
 |This is a long text|
 |         |         |

This text is 2 cells wide. It fills exactly 2 cells onthe worksheet.

What I have on the preview is:

 |           |           |
 |This is a long text    |
 |           |           |

The cells are actually wider. This is very uncomfortable when I use
Format Border Outline around the two cells.

I'm using True Type Fonts. 

Using another PC, I didn't had this problem. I copied the file to my
PC and I have the problem again.

I was using the same EXCEL under WINODWS3.0 with Adobe ATM 2.0 and I
hadn't this problem.

Has someone an idea which could save me out of this nightdream ?

Thanks.
Olivier.

-- 

-------------------------------------------------------------------
 Olivier Plaut                   |  
 Institute of Forensic Medicine  |   Phone:    +41 (22) 702.56.12  
 Toxicology Unit                 |   Fax:      +41 (22) 789.24.17  
 University of Geneva            |
 Av. de Champel 9                |   E-mail:  plaut@sc2a.unige.ch  
 CH-1211 Geneve 4                |            plaut@cgeuge52.bitnet
 Switzerland                     |   
-------------------------------------------------------------------
Newsgroups: comp.os.ms-windows.programmer.misc
From: "steve willer" <steve.willer@canrem.com>
Subject: truetype hidden bitm
Reply-To: "steve willer" <steve.willer@canrem.com>
Organization: Canada Remote Systems
Distribution: comp
Date: 17 Nov 92 08:27:45 EST


  >Judging on the fact that the origianal font (when displayed
  >on screen) is perfect, it is my guess that Microsoft has
  >hidden some bitmaps in their font that are used automatically
  >by Windows for on screen display.  Dows anybody know anything
  >about this?  Is there some way to bundle bitmaps back into
  >a TrueType font?  Is there more to this than meets the eye?

That's a phenomenon called "hinting." It gives extra information for low
point sizes. Given the fact that you can also stretch, skew and rotate
TrueType fonts, I doubt they use bitmaps.
---
  SLMR 2.1a  God heals & the doctor takes the fee-Poor Richard
--
Canada Remote Systems  - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
Newsgroups: comp.os.ms-windows.programmer.misc
From: tsc@cbnewsh.cb.att.com (tong.s.chen)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools
Subject: Help, How to increase memory size of a process
Keywords: memory size, data segment
Date: 23 Nov 92 18:39:54 GMT
Followup-To: comp.os.ms-windows.programmer.misc
Distribution: usa
Organization: AT&T


Help!
I've developed an MS window application using MS C/C++ 7.00 and Window Maker.
The application works fine with a small set of test data, however, it failed
with "Malloc Failed" message when I tried with a larger set of data (it is
still less then 700K).

How can I increase the size of data segment? or allocate more data segments
to a process?
Is there a concept of swap space like UNIX?
If so, how can I activate that?

Please e-mail me any suggestions or helps to "tsc@mtnet1.att.com".

Thank you for your help.

Tong Chen
ATT-BL
Middletown, NJ
Newsgroups: comp.os.ms-windows.programmer.misc,comp.lang.c++
From: gthkoh@ntuix.ntu.ac.sg (Koh Thong Hwee)
Subject: Re: Help with Child Window
Organization: Nanyang Technological University - Singapore
X-Newsreader: TIN [version 1.1 PL6]
Date: Thu, 19 Nov 1992 01:19:37 GMT

Dave Ritacco (890751r@dragon.acadiau.ca) wrote:
: Hi. I am working on my thesis involving numerical simulation of chaos
: and I wish to write some points to a child window of my main window.
: I am not sure exactly how to do this: for a parent window, I just
: found the display context(DC) and away I went. I can't seem to find
: anything equivalent for the Child Window. I am sure this is simple, but
: I can't seem to find any reference on how to do this. Any help appreciated.
: 
: please e-mail any responses to 890751r@dragon.acadiau.ca
: 
: 
: 
: -- 
: ************************************************************************
: *        Dave Ritacco                Product of Acadia University      *
: *           "Why don't you pull the trigger and find out?"             *
: *        ritacco@otter.phys.uvic.ca                W.H.Bonney          *

Hi Dave,

If you are using BC++ OWL, you can look at the sample program that comes
with it.  It's called STEP3.cpp under the directory .../OWL/EXAMPLES/STEPS.
It shows how to use a display context, how to use a point array to display
pictures on a window (which can also apply to a child window).  A more
complete and more usable program is the STEP6.cpp which evolved from 
STEP3.cpp with more graphics functions added.

OWL comes with the BC++ & AF package...

TH Koh
gthkoh@ntuix.ntu.ac.sg
From: wongl@rs6323.ecs.rpi.edu (Lance)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Combo box help needed
Date: 18 Nov 92 22:23:53 GMT
Article-I.D.: rpi.vay1yvk
Reply-To: wongl@rpi.edu
Organization: Rensselaer Polytechnic Institute, Troy, NY.

Hello, im trying to list files in a drop down combobox.  But im having trouble
specifying the directory to read.  The current directory is say, "c:\borlandc\bin"
and i want to list the files in the "c:\lance" directory.  In the CB_DIR
windows message, the lparam (or one of them) specifies a directory to list.
This doesnt seem to work for me. I can only go further down the directory 
structure, I can't go up a directory.

thanks for any help...
:)

(please repsond to my account, i dont check the groups too often..thanks)
Keywords:
From: helpdesk@otago.ac.nz
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: changing wallpaper on the fly?
Date: 20 Nov 92 11:16:38 +1300
Organization: University of Otago, Dunedin, New Zealand

From my program I want to change the wallpaper.

I write the profile string
I send WM_INICHANGE

The wallpaper changes next time I start windows.
I want it to change now.

How do I do it? (Using Borland C++ 3.0)

advTHANKXance

KLox
User Support
University of Otago
klox@otago.ac.nz
From: cjfuente@vandi.ars.cl (Carlos Javier Fuentealba Millar)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How do I get the inverse color?
Distribution: world
Organization: Ars Innovandi (El arte de innovar)
Date: Mon, 23 Nov 1992 19:44:08 CST

How do I get te inverse color of a given RGB color.

Thanks in advance.
--
     _                 * Name   : Carlos Fuentealba Millar * Ars Innovandi
   /  )        /       * e-mail : cjfuente@vandi.ars.cl    * Av. Italia 1669
 /  __.  __  /  _   _  * Voice  : +56-2-225-5072           * ~Nu~noa - Santiago
(__(_/|_/ (_(__(_)_/_) * FAX    : +56-2-274-9737           * Chile
--
``La probabilidad de un evento es proporcional
al da~no que causa'' -- Gumperson
Newsgroups: comp.os.ms-windows.programmer.misc
From: Jim_Sollows@mindlink.bc.ca (Jim Sollows)
Subject: ObjectVision vs Visual Basic??
Organization: MIND LINK! - British Columbia, Canada
Date: Mon, 23 Nov 1992 01:00:30 GMT

I am interrested in delving into the world of windows programming. I am
inexperienced with windows programming, however I am an experienced
dBase programmer so I do have some general programming experience. I would
appreciate any comments suggestions or recommendations relating to
Objectvision for Windows or Microsoft Visual Basic. I know NOTHING about
either package as to pro's or con's. Your advice would be much appreciated.

 J.L.Sollows

Please E-mail your response to JIM_SOLLOWS@MINDLINK.BC.CA
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Help Needed - Excel DDE Problem
From: hef@vitro.com
Date: 13 Nov 92 16:35:21 -0500
Organization: Vitro Corporation
Nntp-Posting-User: mbwatch

Help!

    I've written a macro in Excel 4.0 to communicate through a DDE
link with the DDE server included in the Borland C++ 3.1 examples.
I've modified the DDE server to simplify the messages going across the
interface.

    I can't get the data I request from or see the data I poke to the
DDE server.  I know I'm communicating properly with the server.  There
just seems to be something wrong with extracting the data.  I've written
an equivalent macro in Word 2.0 and everything works just peachy.

    Any ideas?  Thanks in advance!

            ////////////////////////////////////////////////////////////
           //
          //   Mike Heffner               Internet: hef@vitro.com
\\\\\    //  Vitro Corporation
    \\  // 14000 Georgia Avenue          "To understand recursion,
     \\// Silver Spring, MD 20906  you must first understand recursion."
      \/                                        -- Unknown
Newsgroups: comp.os.ms-windows.programmer.misc
From: mehran@monet.uwaterloo.ca (Mehran Farimani)
Subject: Re: Faking re-entrancy with second copy of DLL?
Keywords: DLL REENTRANT
Organization: University of Waterloo
Date: Mon, 16 Nov 1992 12:11:55 GMT

In article <1992Nov15.021203.12280@netcom.com> steven@netcom.com (Steven Nelson) writes:
>In article <1992Nov14.093916.1050@netcom.com> mbk@netcom.com (Miles Kehoe) writes:
>>
>>If you rename X.DLL to Y.DLL, and tell your program to
>>access Y.DLL instead of X.DLL, is anything else going
>>to bite you? It *looks* like 'x' is stored in X.DLL
>>and simply renaming the DLL file does NOT do the
>>complete trick. 
>>
>>Suppose now that you had a copy of the DLL source; can
>>you simply rename and relink it?
>>
>>I know it's wierd.... just trying to fake it!
>>
>>Miles
>>
>
>You will need to change the LIBRARY statement in the  .DEF file
>and relink the application that uses the DLL with this new library. 
>This is the name used by Windows to load the appropriate DLL.
>
>Steven Nelson
>steven@netcom.com 

I'm not sure if that's quite right. My experience has been that Windows
looks for a DLL based on its file name. There is no need for recompiling
the library to rename it ...

Regards,

--Mehran

Newsgroups: comp.os.ms-windows.programmer.misc
From: rmccown@world.std.com (Bob McCown)
Subject: Re: Help printing 3x5 cards
Organization: The World Public Access UNIX, Brookline, MA
Date: Fri, 20 Nov 1992 03:53:01 GMT

I'm trying the same thing myself, and having no luck, so, please, post here!

-- 
+--------------------------------------------------------------------------+
|  Bob McCown - Mundane Life               |                               |
|     Woburn, MA                           | "'ow d'you know 'e's a king?" |
|  Robur of Roestoc - SCA   .. ..    .. .. |                               |
From: kim@Software.Mitel.COM (Kim Letkeman)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Setting Up Dual Monitor Mode for BC++
Date: 17 Nov 92 13:08:29 GMT
	<1992Nov15.211854.5971@cavebbs.welly.gen.nz>
	<BxtHrA.38J@news.iastate.edu>
Organization: MITEL Public Switching, Kanata, Ontario, Canada
In-reply-to: martin@iastate.edu's message of 16 Nov 92 16:28:19 GMT

In article <BxtHrA.38J@news.iastate.edu> martin@iastate.edu (Martin R Calsyn) writes:

| >NOTE: If your VGA card is 16 bit, the mon card will force it into
| >8bit mode and possible affect its ram access speed. This could efect
| >your video display speed rather drastically.
| 
| Definately! (sic)

I just thought I'd mention this again, as the ATI Graphics Ultra
card's price is falling like a rock with the advent of the plus and
pro models (21+ million Winmarks for those who haven't seen the
reviews yet).

I've used dual monitor mode extensively with the ATI Graphics Ultra
and the ATI Graphics Solution in Hercules mode and can say that there
was no difference with the GS in or out. I was getting 8 million
Winmarks (which is the card's normal speed) either way in a 486/33.
Note that, contrary to the documentation, I stuck the GU in a 16 bit
slot even though I had the mono card in an 8 bit slot.

With the new DLL video handlers, I now use screen swapping as I find
50 lines and colour to be addictive when debugging. Much more pleasant
for me than the 25 lines in mono. Both worked very well though.
--
Kim Letkeman	kim@Software.Mitel.COM
Newsgroups: comp.os.ms-windows.programmer.misc
From: d88-jwa@byse.nada.kth.se (Jon Wtte)
Subject: __aseg{hi|lo} not defined; using model L MFC
Organization: Royal Institute of Technology, Stockholm, Sweden
Distribution: comp
Date: Tue, 17 Nov 1992 21:11:46 GMT

Yo,

I'm using the Microsoft Foundation Classes that came with
version 7.00 of the compiler. However, after creating a
Large version of the library AFX, each one of my class
modules give errors that __aseghi and __aseglo are undefined.

Making the "phone book" demo in large model works though.
What am I doing wrong?

Cheers,

						/ h+

PS: Is it just me, or are the visual parts of the MFC too
primitive to mention? Isn't there any class that handles a
scrollable pane without having the drawing commands adjust
for the scroll bar positions?

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Suedoise (not french speaking) --

   There's no problem that can't be solved using brute-force algorithms
   and a sufficiently fast computer. Ergo, buy more hardware.
Newsgroups: comp.os.ms-windows.programmer.misc
From: vpcsc7@sfsuvax1.sfsu.edu (Dan Tauber)
Subject: Word for Windows file format
Keywords: word for windows
Organization: San Francisco State University
Distribution: na
Date: Thu, 19 Nov 1992 04:13:51 GMT

Can anyone point me to a definition of the Word for Windows 2.0 file
format?  I am most interested in knowing which style is assigned 
to which parts of the document.

Thanks

Dan Tauber
From: kim@Software.Mitel.COM (Kim Letkeman)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Inaccuracy in windows timer?
Date: 18 Nov 92 17:20:28 GMT
Organization: MITEL Public Switching, Kanata, Ontario, Canada
In-reply-to: jav@dstos3.dsto.gov.au's message of 18 Nov 92 17:31:54 GMT

In article <1992Nov18.113155.165165@dstos3.dsto.gov.au> jav@dstos3.dsto.gov.au writes:

| I realise that the windows timer is only accurate to 18.2 ms, but
| surely the settimer function is able to correct for non-multiple of
| 18.2 ms intervals (obviously not!).  If not, then does any Guru out
| there know how I can correct the time to accurately be able to
| sample every sixty seconds?

Page 175 of Petzold, 2nd Edition:

        - The time interval you specify in the SetTimer call is always
	  rounded down to an integral multiple of clock ticks. For
	  instance, a 1000-msec interval divided by 54.925 msec is
	  18.207 clock ticks, which is rounded down to 18 clock ticks,
	  which is really a 989-msec interval.

Your other choice is to code your own message loop to delay until the
next interval is over. You can do a peek message and the usual
processing, including translate and dispatch and in between you can
check the time. When you reach your time, go for it.

Note that no matter what you do, Windows still does cooperative
multi-tasking, so that any one of your samples could be off by more
than a second if some other app held the CPU at the critical moment.
This would not affect the timer interval of course.
--
Kim Letkeman	kim@Software.Mitel.COM
From: CCMS@MUSICM.MCGILL.CA (Marc St-Louis)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Serial Communications and Windows ?
Date: 20 Nov 92 21:25:45 GMT
Organization: McGill University Systems Inc (MUSIC/SP)

Hi There Windows Gurus,

I'm about to write my first windows program. Actually, I want to
port a DOS communication program I wrote, to Windows. I'm an experienced
DOS programmer, now learning about Windows (God knows it ain't easy).

Here are some facts on the communication program I wish to port to
Windows. It doesn't use BIOS or DOS services, but directly talks to the
UART. It takes over the proper INT vector, and the Interrupt Service
Routine simply places incoming bytes in a buffer.

Question 1) I beleive I can build the Windows program using the 4
            following segments; Could this work ??

CODE segment #1. Interrupt routine saving incoming bytes to a buffer.
DATA segment #1  The program's data.
DATA segment #2. Buffer to save incoming Bytes.
CODE segment #2. Process the bytes saved in buffer.

Question 2) What is the best way to implement an Interrupt Service
            Routine for a serial communication port under Windows ?

Question 3) Which segments would be Fixed | Movable | Discardable ?

Thanks for helping me set my ideas straight.

Marc St-Louis
Montreal,Canada.
CCMS@MUSICM.MCGILL.CA
Newsgroups: comp.os.ms-windows.programmer.misc
From: mboucher@cortex.prospect.com (Mike Boucher)
Subject: Listbox help needed
Organization: Cortex Corporation, Waltham, MA, USA
Date: Mon, 16 Nov 1992 22:42:41 GMT
X-Posted-From: cortex.prospect.com
NNTP-Posting-Host: sol.ctr.columbia.edu

Hey there,

I've got a few listbox questions...

1) I have defined a listbox in a dialog resource file, using courier 9 as the
  font.  When I GetTextMetrics, I get the information for the system font.
  Any ideas why? What do I have to do to get the right font info?
2) Any ideas on how to get the maximum number of items which would be VISIBLE
  in the list box?

any help would be appreciated.  Thanx.
Mike
-- 
Mike Boucher			mboucher@cortex.prospect.com
Cortex Corp			"Don't take life too seriously, you'll never
Waltham, MA, USA		 get out of it alive!"
Newsgroups: comp.os.ms-windows.programmer.misc