HDTenEightyP/NetNews huggingface dataset:
From: f_tawb@va.nkw.ac.uk
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: VB DDE & the SYSTEM topic...
Date: 19 Nov 92 11:07:46 GMT
Organization: Natural Environment Research Council

I'm having a strabge problem using DDE in Visual Basic, to wit, I can't
seem to open the SYSTEM topic in a DDE-aware application (Excel, Ami Pro, 
KEATerm).
I don't have any problem if, in Excel for example, I specify a worksheet
name - this is annoying as I don't want to be tied to any specific worksheet
or file.

Does anyone know what's wrong here ? Is it a bug ?

Thanks in advance,

Tam.
From: mats@mats.rni.sub.org (Matthias Czwikla)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Books on OLE?
Date: 18 Nov 92 23:34:13 GMT
Organization: Editions of Desaster

In <1992Nov11.160009.21656@decuac.dec.com> baker@westsd.dco.dec.com (Art Baker) writes:

> Yes, Microsoft Press recently published a Programmer's Guide to OLE
>(that may not be the exact title).  It does a good job of covering all

Is it possible to ftp this guide or similar ones from somewhere ?

-- 
/-----------------------------------------------+----------------------------/
| mats@mats.rni.sub.org          (sweetest home)|  Tel.   : GER-6221-802031  |
| czwikla@mansw1.enet.dec.com     (hardest work)|  Address: In der Aue 30 a  |
| matthias.czwikla@fra.mts.dec.com (even harder)|           6900 Heidelberg  |
/-----------------------------------------------+----------------------------/
Newsgroups: comp.os.ms-windows.programmer.misc
From: bumbles@leland.Stanford.EDU (Steven Alexander)
Subject: Need error handling ideas
Organization: DSG, Stanford University, CA 94305, USA
Date: Mon, 16 Nov 92 21:35:52 GMT


Please reply to email address:
sun!kla!anil OR kla!anil@sun.com

I am curious what kind of mechanisms other people have
devised to handle errors and aid debugging of their
applications in C++ and Windows. I am NOT talking about
full blown exception handling.

Just simple things like failure of 'new' or file open.
What I am using now is nested conditional constructs.

e.g.
In a constructor for a dialog box with 3 buttons and 1
static text,

{
  button1 = new TButton( ... );

  if (button1) {
    button2 = new TButton( ... );

    if (button2) {
      button3 = new TButton( ... );

      if (button3) {
        label = new TStatic( ... );

        if (label) {
           // SUCCESS
        } else {
           // label failed
              MessageBox( ... );
        }
      else {
         // Button3 failed
            MessageBox( ... );
      }  
    else {
       // Button2 failed
          MessageBox( ... );
    }
  else {
     // Button1 failed
        MessageBox( ... );
  }
}

As you see, this gets messy as the number of components increase.

Also, this does not provide the user, retry, cancel or ignore
options.

Are there any class libraries out there to facilitate this kind
of error handling? Are there mechanisms inherent in C++ or Windows?
Overloading of new in the above case looks like a probable solution?
Send me your replies and should there be sufficient interest I will
summarize and post.

Thanks.
Anil            sun!kla!anil OR kla!anil@sun.com
From: cuawj@dcatla.uucp (Andy Jacobs)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Can Visual BASIC respond to Windows Messages not intended by MS?
Date: 18 Nov 92 17:39:39 GMT
Organization: Digital Communications Associates, Alpharetta, GA


Is there a way in Visual BASIC to get misc. messages, such as when a file has
been dropped on the window from File Manager (in Windows 3.1).  Is it possible
without writing a custom control?  Can it be done with a custom control?
Thanks for any help.
-- 
 - Andy Jacobs
                        This Signature file under construction...   
Newsgroups: comp.os.ms-windows.programmer.misc
From: nuspljj@mentor.cc.purdue.edu (Joseph J. Nuspl Jr.)
Subject: Is there a flag for Sounds Enabled?
Organization: Purdue University
Date: Sun, 15 Nov 1992 21:01:46 GMT

I am writing a program in Borland C++ and I would like to be able to
test to see if sounds are enabled.

	if( _sound_enabled )
		make_noise();
	else
		flash_screen();

Can this be done?


Thanks.



------------------------------------------------------------------------
Joseph J. Nuspl Jr.					 306 Shreve Hall
nuspljj@mentor.cc.purdue.edu			West Lafayette, IN 47906
"I'm a space cowboy!"				 	(317) 495 - 5308
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: how do I do subscripts & superscripts?
Organization: Energy, Mines, and Resources, Ottawa
Date: Sun, 22 Nov 1992 02:29:18 GMT

Can anyone supply me with some sample code that will allow me to draw a
text string which may or may not contain subscripts and/or superscripts?
It is driving me nuts.

I thought that the best way would be to recognize special characters
in the text string which would mean the next character was a subscript
or superscript:
		 238
		U		"U^2^3^8"

		H SO		"H~2SO~4"
		 2  4
To draw these sub/superscripts, I need a font 1/2 the height of the
current font.  Then I have to loop through the text string, switching
fonts as the subscripts & superscripts are encountered.  The Y 
co-ordinate also has to be adjusted for superscript or subscript:

void DrawSubSuperText(HDC hdc,POINT *p,char *text)
{
BOOL sub;
	for(i=0;i<strlen(text);i++){
	  if(text[i]=='^' || text[i]=='~'){
		switch to smaller font
		if(text[i]=='^'){
		  p->y+=fontheight*0.5;
		}else{
		  p->y-=fontheight*0.5;
		}
		i++;
		sub=TRUE;
	  }else{
		sub=FALSE;
	  }
	  TextOut(hdc,p->x,p->y,&text[i],1);
	  if(sub) switch back to main font
	}

Creating a second font with the same characteristics (but smaller)
as the current font is relatively easy.  The problem is how to
track the (x,y) positions.  I know the initial (x,y) of the string,
so I plot the first character at (x,y).  However I don't know the (x,y)
of each of the subsequent characters, so after I plot the first character,
I do:
	SetTextAlign(hdc,GetTextAlign(hdc) | TA_UPDATECP);
so that Windows will keep track of the (x,y) after it draws each character
and I won't have to know about it.  However, I need to know about it,
because I have to adjust the y value up or down for superscript/subscript.

What if the text is plotted at an arbitrary angle?  I have to rotate the
(x,y) values, I guess.

What if the alignment is TA_RIGHT or TA_CENTER?  Then the original (x,y)
of the text string does not refer to the beginning of the text string.

I can't believe how disgustingly messy this is!  It really should be done
internally in the GDI text functions.  I will need a week and 10
pages of code to do this.  Is there an easier way to do this?  There must
be something simpler because superscripts would be quite common in
scientific literature (or even footnote references).
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
From: Jeff Dean <jeff@igc.apc.org>
Newsgroups: comp.os.ms-windows.programmer.misc
Date: 16 Nov 92 16:44 PST
Subject: Re: question on resource limitations
Nf-ID: #R:1992Nov12.220638.9895@searchtech:-872378195:cdp:1668700012:000:168
Nf-From: cdp.UUCP!jeff    Nov 16 16:44:00 1992


In Windows 3.1, you can use the GetFreeSystemResources() function
to determine the percentage of free space for various system
resources.

	Jeff Dean
	jeff@igc.apc.org

Newsgroups: comp.os.ms-windows.programmer.misc
From: mitch@giesy.mitch.b17a.ingr.com (Mitch Giesy)
Subject: Multiline edittext controls
Organization: Mapping & Energy, Intergraph Corp., Huntsville, AL
Distribution: comp
Date: Wed, 18 Nov 1992 14:14:46 GMT

Greetings,

        I have a group of 5 multiline edit controls which I am using to
enter database records where one "row" across the 5 controls
corresponds to a record. After one row is filled in, I need to set the
focus to the "second row" of the first control, so the next record can
be entered. Any hints on the best way to do this? (As an aside, the
control doesn't respond as I expect when I hit <ENTER>) Also, when I do a
GetDlgItemText() call for a multiline edit control, will it return a
CR-delimited string composed of all "rows" keyed in?

Thanks in advance for any help.
Mitch
--
Mitch Giesy	 | WK: (205) 730-1773		|  DISCLAIMER:
Intergraph Corp. | EMAIL:			|  When all is said and done,
1 Madison I.Pk   | mitch@giesy.b17a.ingr.com    |  its your fault if you done
Huntsville, AL	 | uunet!ingr!b17a!giesy!mitch 	|  what I said. :-)
Newsgroups: comp.os.ms-windows.programmer.misc
From: martin@iastate.edu (Martin R Calsyn)
Subject: Re: Setting Up Dual Monitor Mode for BC++
Keywords: mswindows
Organization: Iowa State University, Ames, IA
Date: Mon, 16 Nov 1992 16:28:19 GMT

In article <1992Nov15.211854.5971@cavebbs.welly.gen.nz> linz@cavebbs.welly.gen.nz (Lindsay Mathieson) writes:
>In article <1992Nov13.014457.7671@msuinfo.cl.msu.edu> huangch@xenolith.cps.msu.edu (Cheng Chang Huang) writes:
>>Can anyone give me some idea about how I can set up dual monitor mode for
>>developing Windows Program with BC++?
>
> [...]
>
>To startup the debugger & BCC++ in dual mon mode, I think you just specify "/d" in their comand line options. No changes are need to win.ini etc.
>

Under Windows (BCW), specify `-do' under Run|Debugger Arguments...

Under DOS (bc command), specify -do on the command line.

Running the DOS bc under windows, use the Program Manager's
File|Properties... dialog box or the pif editor to add `-do'.

For the debuggers td, td286, td386, add -do to the command line.

-do stands for `display other' meaning that the debugger interactions
will go to the secondary display subsystem while the program output will
appear on the primary display.

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

>DOS just doesn't have decent dual monitor support like the mac (i
> think). With windows their is the possibuility of better support though.

Beg to differ.  Within the Borland development products, it works just
as well in DOS or Windows.  I personally prefer running even BC under
windows because of the better memory environment it seems to have there.

-- 
Martin R. Calsyn                                   martin@iastate.edu
Project Vincent Systems Support                    PP ASEL, AOPA, EAA	
Iowa State University Computation Center           voice: (515) 294-9889 
Ames, Iowa 50011                                   fax:   (515) 294-1717
Newsgroups: comp.os.ms-windows.programmer.misc
From: andys@picard.NoSubdomain.NoDomain (Andy Say)
Subject: MS Programmers FAQ
Organization: Bellcore, Livingston, NJ
Date: Mon, 23 Nov 92 16:57:15 GMT

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

-- 
*****************************************************************************
* Andy Say                          *  Place witty comment here.            *
* Bell Communications Research      *                                       *
*    andys@seas.bellcore.com        *                                       *
*****************************************************************************
* Bellcore doesn't pay me enough to speak for them.                         *
*****************************************************************************
From: SASTPH@vm.sas.com
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: HELP with owner-draw buttons
Date: 23 Nov 92 13:38:00 GMT
Organization: SAS Institute Inc.

In article <4771.921121@nasobem.stgt.sub.org>, jan@nasobem.stgt.sub.org (Jan
Schiefer) says:
>
>While we're on topic, how can I create a bitmap for an owner-draw button,
>which looks like an normal Windows button, but is empty? The problem here
>is to get the 3D effect right. I suspect this is driver dependant.
>
>Well, I might create an empty normal button of the same size and BitBlt its
>bitmap to a memory DC, but there must be an easier way.

Why create an owerdraw button?  It seems like a normal pushbutton with
no text in it would do the trick.  However, if you can't use one,
I think all pushbuttons can be drawn the same, regardless of the driver.
The border is always two pixels wide.  You can get the colors from
GetSysColor: COLOR_BTNFACE, COLOR_BTNSHADOW, and I believe the hightlight
color is COLOR_WINDOW.
Newsgroups: comp.os.ms-windows.programmer.misc
From: rmccown@world.std.com (Bob McCown)
Subject: Icon/Text selection
Organization: The World Public Access UNIX, Brookline, MA
Distribution: usa
Date: Thu, 19 Nov 1992 18:20:07 GMT

I'm developing an application with many separate parts that may or may not
be valid for certain levels of users.  What I would like to do is
something akin to the Control Panel in Windows, where Icons appear (or
not, i.e. Network), and the window can be sized, etc.  Also I would like
the status line like the CP has.  What I need is help with A) selecting
and highlighting the icons once I DrawIcon(...) them on the screen, and
sizing the window that will re-sort the Icons a-la the program manager.
-- 
+--------------------------------------------------------------------------+
|  Bob McCown - Mundane Life               |                               |
|     Woburn, MA                           | "'ow d'you know 'e's a king?" |
|  Robur of Roestoc - SCA   .. ..    .. .. |                               |
Newsgroups: comp.os.ms-windows.programmer.misc
From: "steve willer" <steve.willer@canrem.com>
Subject: borland tutorial wont
Reply-To: "steve willer" <steve.willer@canrem.com>
Organization: Canada Remote Systems
Distribution: comp
Date: 17 Nov 92 08:27:46 EST


SA>Error directive: OWL applications must be built with either WIN30 or
  >        WIN31 defined.

SA>Can anyone tell me what is going on?  How do I define WIN31?  Why don't
  >Borland's own tutorials work?  Any help would be greatly appreciated!

How about #DEFINE WIN31???
Or, perhaps, go to the setup under "compiler" (I think). You can set up
"permanent" defines in there, somewhere. Just look for an edit box.
---
  SLMR 2.1a  OS/2 V2.0  What's this?  A GUI for Yuppies!?
--
Canada Remote Systems  - Toronto, Ontario
World's Largest PCBOARD System - 416-629-7000/629-7044
From: pshuang@zurich.ai.mit.edu (Ping Huang)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: when my windows app croaks, should I re-boot DOS too?
Date: 22 Nov 92 08:14:53
Organization: M.I.T. Artificial Intelligence Lab.
NNTP-Posting-Host: freeside.ai.mit.edu
In-reply-to: jagrant@emr1.emr.ca's message of Sat, 21 Nov 1992 00:04:52 GMT

In article <1992Nov21.000452.14364@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:

 > While developing my Windows apps with Borland C++ 3.1, occasionally I
 > get UAEs (or whatever they're called now) [...] The question is - should
 > I also re-boot DOS when this happens?  Does Windows have any sort of
 > barriers between my app and DOS?  I'm using Windows 3.1 and DOS 5.0.

Windows 3.x makes it possible for your Windows program to corrupt the
internals of DOS, but whether you really need to reboot the machine
probably depends on what kind of bugs are causing your UAE's. I usually
have to exit and re-enter Windows when my application goes haywire
because then it doesn't deallocate unique system resources (VDMA
memory), but usually my application won't actually clobber DOS. However,
it would not be a bad idea, IMO, to warm boot at least once a day and
maybe more often than that, for your sanity's sake. :(

--
| Ping Huang (INTERNET: pshuang@martigny.ai.mit.edu) speaking for himself.
| "One Thing to name them all, One Thing to define them,
|  One Thing to place them in environments and bind them..."

Newsgroups: comp.os.ms-windows.programmer.misc
From: dj@ekcolor.ssd.kodak.com (Dave Jones)
Subject: Re: HELP: BC++ program won't leave mommy
Organization: Vonnegut Tent Rentals, Inc.
X-Newsreader: TIN [version 1.1 PL6]
Date: Thu, 19 Nov 92 15:51:22 GMT

sam4628@zeus.tamu.edu wrote:
> Hello,
>    I have a program written in BC++ which is behaving strangely (in the
> following discussion, please bear in mind that I am a novice Windows
> programmer: I'm not doing anything fancy, but I could very well be doing
> something _stupid_!).
> 
> This program will only run if the BC++ IDE is running.  This is true
> regardless of where I'm running the program (i.e. I'm trying to run it from
> the file manager, so it shouldn't have any ties to the IDE).  It doesn't
> give any errors, it just doesn't run.
> 
> The program is a simple data conversion program which basically displays
> a single dialog box to obtain file names, does its conversion, and exits.
> 
I'll guess: your dialog box uses controls that are in a Borland DLL and it
isn't on your PATH.  Therefore it cannot be automagically loaded by your
application, but if the IDE is loaded already then so is the DLL.

This still doesn't sound right: you should get a system modal dialog
complaining that it "can't find a file, or one of its components".  However
take it as a working hypothesis that the IDE is loading *some* resource that
your program needs, then try to make the IDE's resources available to your
program, perhaps one by one (copying them to the program's directory?) until
you hit something.

Or go back to basics: remove components from your program until it runs, or
remove all extra stuff and add bits back one by one till you hit the
problem.  Get the search area narrowed down enough and the bug will usually 
be obvious.

--
||------------------------------------------------------------------------
||Dave Jones (dj@ekcolor.ssd.kodak.com)|Eastman Kodak Co. Rochester, NY  |
From: linz@cavebbs.welly.gen.nz (Lindsay Mathieson)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Setting Up Dual Monitor Mode for BC++
Keywords: mswindows
Date: 15 Nov 92 21:18:54 GMT
Article-I.D.: cavebbs.1992Nov15.211854.5971
Organization: The Cave MegaBBS, Public Access Usenet, Wellington, NZ

In article <1992Nov13.014457.7671@msuinfo.cl.msu.edu> huangch@xenolith.cps.msu.edu (Cheng Chang Huang) writes:
>Can anyone give me some idea about how I can set up dual monitor mode for
>developing Windows Program with BC++?
>
>I have two monitors at hand. One is NEC 3D and the other is CompuAdd Mono
>VGA.  I have a VGA card on my machine. What kind of adapter  should I  
>use/add in order to use them both and, for MS Windows, what kind of change  
>should I make to sys.ini?
>
>

Dual monitor mode works by haveing a Color card and a Monochrome card - NOTE, this means _not_ vga mon, but IBM monochrome. This way the cards occupy different
ram addresses. For your setup I would recommend:

Nec Mutilsync connected to a generic Hercules Monochrome Card
CompuAdd VGA connect to your VGA Card.

To startup the debugger & BCC++ in dual mon mode, I think you just specify "/d" in their comand line options. No changes are need to win.ini etc.

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.

DOS just doesn't have decent dual monitor support like the mac (i think). With windows their is the possibuility of better support though.
Newsgroups: comp.os.ms-windows.programmer.misc
From: sam4628@zeus.tamu.edu
Subject: HELP: BC++ program won't leave mommy
News-Software: VAX/VMS VNEWS 1.41    
Organization: Texas A&M University, Academic Computing Services
Date: Thu, 19 Nov 1992 13:26:00 GMT

Hello,
   I have a program written in BC++ which is behaving strangely (in the
following discussion, please bear in mind that I am a novice Windows
programmer: I'm not doing anything fancy, but I could very well be doing
something _stupid_!).

This program will only run if the BC++ IDE is running.  This is true
regardless of where I'm running the program (i.e. I'm trying to run it from
the file manager, so it shouldn't have any ties to the IDE).  It doesn't
give any errors, it just doesn't run.

The program is a simple data conversion program which basically displays
a single dialog box to obtain file names, does its conversion, and exits.

Any suggestions?

Thanks in advance!

------------------------------------------------------------------------
| Steven A. McCluney                 |"Strange women lying in ponds    |
| sam4628@zeus.tamu.edu              | distributing swords is no basis |
| I'm a grad student, so my opinions | for a system of government!"    |
|    are worthless anyway            |          Dennis, to King Arthur |
------------------------------------------------------------------------
Organization: University of Illinois at Chicago
Date: Tue, 17 Nov 1992 20:40:02 CST
From: <U43893@uicvm.uic.edu>
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: ???(Cust.Ctrls DLL using MFC)

Hello! I am writing a C++ large memory model DLL using MFC for custom
controls. The problem I'm encountering looks very weird to me.
Here is how the problem occurs:
1. In SDK dialog editor I double click my control. That invokes a callback
function BOOL ClassStyle(bla-bla-bla) which I provide. This function does all
necessary routines concerning the style dialog editing and then returns
to the dialog editor TRUE (if CTLSTYLE structure is changed), or FALSE
otherwise. So far, everything is perfectly fine.
2. Then dialog editor is trying to recreate the control (WM_NCCREATE, etc.)
I catch WM_NCCREATE, create the object for the window control and do the proper
subclassing. After subclassing messages go to the message map of the control
object instance. Fine, so far. It can take several more messages. And then,
all of a sudden, the CWnd object associated with the control
 is some how lost. I can  tell that because the application ASSERTs
at line 229 in window.cpp which is:  ASSERT(pWnd != NULL);
The message it was trying to process during several times I codeviewed
the execution was WM_GETMINMAXINFO. However, I am not sure that it is
always the case.

Important things to add:
1. This problem once started to occur, then it went away. Recently I came
back and then disappeared again. Now, it's there, as you can guess. Doesn't
it sound mysterious? In fact, i has been adding stuff to my DLL during
all that time. But, as far as I can understand things, I has not been
touching any parts directly related to the problem.
2. Any normal application can create a dialog box with my control with
no problem. Everything works just fine.
3. Moreover, it works with Windows Maker Professional Dialog Editor. Although,
this editor does not send create messages to the control after its style is
edited.

Maybe, there's something about filling the CTLSTYLE structure which the SDK
dialog editor does not like!? But why then does it work from time to time?

I would really appreciate any opinion and suggestions.
I'll be checking my e-mail for those.
Please send me messages to: shatsky@parsys.eecs.uic.edu

Thanks a lot.

-- Vitaly Shatsky
Newsgroups: comp.os.ms-windows.programmer.misc
From: zap@navaho.eel.ufl.edu (Tom Grein)
Subject: Windows 3.1 Programming Books 
Keywords: Books, programming, windows
 
Organization: University of Florida
Date: Tue, 17 Nov 92 15:05:26 GMT

I work for a company that is preparing to port a DOS product out to Win 3.1.  We are going to get the SDK docs.  However, are these docs good enough to get started with Win 3.1 programming.
 
I would like some other suggestions for Win 3.1 programming.  I have heard that Petzold's book is good.  
 
Any other suggestions for documentation and how to get started with the Win 3.1 programming would be GREATLY apprectiated.
 
Thomas Grein
zap@sioux.eel.ufl.edu