HDTenEightyP/NetNews huggingface dataset:
From: stevey@steve_sun.cs.adfa.oz.au (Steve Yang)
Subject:  "Printer selection from  VB (Visual Basic)"
Keywords: VB
Organization: Australian Defence Force Academy
Date: Thu, 28 Jan 1993 07:13:33 GMT




==============================================================================
Help on  "Printer selection from  VB (Visual Basic) for MS Windows 3.0"
-----------------------------------------------------------------------

Hi,

How can I tell VB (Visual Basic, V 1.0)  to print out something on a different printer 

if there are two printers (LPT1 and LPT2) available on Miscrosoft Windows 3.0 

under Novel Netware Lite?


If you can help me, please mail me an example of VB code to me or whatever. 

Thank you very much..


Best Regards,

Steve Yang

-------------------------------------------------------
This is my E-mail address:      stevey@cs.adfa.oz.au

================================================================================
From: br.pct@RLG.Stanford.EDU (P. C. T.)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: keyboard LEDs & extra keyboard functions
Date: 27 Jan 93 22:12:19 GMT
Organization: Research Libraries Group, Inc.

Hi,
  (1) How to control (turn on/off) LEDs (eg. ScrollLock) in a Windows
  application?

  (2) Does keyboard.drv provide the above function thru DLL exported entries?

  (3) How about addtional status & control functions that needed to be 
sent thru keyboard registers (because it is a special keyboard)? How can 
one do it in a Windows application or thru calling keyboard.drv exported
entries?   
  Or does one have to write a special keyboard.drv to do the above?

  THANKS FOR ANY INFORMATION......
Newsgroups: comp.os.ms-windows.programmer.misc
From: jagrant@emr1.emr.ca (John Grant)
Subject: Re: Does anybody know this bug?
Organization: Energy, Mines, and Resources, Ottawa
Date: Wed, 27 Jan 1993 02:28:15 GMT

In article <C1Gp35.9Ez@sunlab1.bath.ac.uk> mssshb@sunlab1.bath.ac.uk (S H Bowman) writes:
>artoinas@phoenix.oulu.fi (Arto Oinas) writes:
>
[...stuff about some bug deleted...]

>This is a pretty general problem so try this general answer:
>
>Check your hdc and hwnd parameters in functions like EndPaint.
>
>I have mixed these up on numerous occasions and it has given exactly
>the type of fault you describe, sometimes taking hours to sort out!
>I can't understand why the STRICT compilation doesn't spot this.

	This is obvious, but it's worth a check - does your
	#define STRICT appear *before* #include <windows.h>???

	Well EndPaint doesn't have an HDC, but ReleaseDC has both
	HWND & HDC.  I just stuck the following in my code somewhere:
		{HWND hwnd;
		HDC hdc;
		ReleaseDC(hdc,hwnd);	//this is WRONG
		}

	and BC++ 3.1 gives me two "suspicious pointer conversion"
	errors (also the obvious warning that hdc & hwnd are used
	before being defined).  If I switch it around:
		ReleaseDC(hwnd,hdc);	//this is RIGHT
	then I don't get those 2 pointer warnings.

	It looks like STRICT is working for me, but then again I
	have *every* single warning message turned on and I don't
	go any further until they have all been fixed.  I can't
	stress this enough for all of you programmers out there.
	My app is 22k lines of code and I don't get a single warning
	message when I do a full build (with all warnings turned on).

	I only used #pragma argsused in a couple of places where I
	have some unused function parameters in place (for future
	expansion).  Everything is fully prototyped and as bugtight
	as I could make it, and I *still* get the odd bug or two
	(as expected).

John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
-- 
John A. Grant						jagrant@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa
Newsgroups: comp.os.ms-windows.programmer.misc
From: bardak@tau.ac.il (Barak Cohen)
Subject: Debuging with CV of MFC program qust.
Organization: Tel-Aviv University Computation Center
X-Newsreader: TIN [version 1.1 PL8]
Date: Thu, 21 Jan 1993 13:29:29 GMT

I am writing windows program with MFC (Microsoft found. class) libraries.
The trouble is that these programs have no WinMain entry point . The entry
point is through TheApp class. How do I tell CV the entry point in order to
debug on the source file (*.cpp + *.h)..


God bless you all

bardak

Newsgroups: comp.os.ms-windows.programmer.misc,comp.windows.ms.programmer
From: greco@cs.uiuc.edu (Steven Greco)
Subject: Drawing Text on its side in BC++?
Organization: University of Illinois at Urbana-Champaign
Date: Thu, 21 Jan 1993 19:14:26 GMT

I need to draw text on its side and was wondering if it is possible to
do this with Borland C++ and owl.  Right now I am using DrawText to draw
my text, but it just produces normal text, not text on its side.  Is this
possible?  Is there any way to rotate a bitmap possibly?

Thanks in advance.
-- 
^ Steven Greco ^           "I've got a real indication of a laugh coming on..."
greco@cs.uiuc.edu                  -Thought Gang
s-greco@uiuc.edu
Subject: Re: RGB <--> HSL ??? 
Distribution: world
Organization: None
Reply-To: chris@chrism.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Tue, 26 Jan 1993 21:12:05 +0000

In article <1993Jan25.173722.5205@hplabsz.hpl.hp.com> yefchak@hplabsz.hpl.hp.com writes:

>Where can I find routines to convert between the various
>color-mapping schemes, such as RGB, HSL, CMYK, etc.?
>Thanks!
>
>***********************************************************************
>* George Yefchak                          Hewlett-Packard Laboratories*
>* Internet: yefchak@hpl.hp.com            P.O.Box 10350               *
>* CompuServe: 73607,1625                  Palo Alto, CA 94303-0867    *
>* AmericaOnline gyefchak@aol.com              415-857-4793            *
>*   NOT SPEAKING FOR HP                   FAX 415-852-8502            *
>***********************************************************************
>

The best book I know of for this is "Computer Graphics: Principles and
Practice, 2nd edition" by Foley, van Dam, Feiner and Hughes.  It has
pages and pages of algorithms for RGB<->HLS, RGB<->CYMK, etc.  It's not
a cheap book, but it's worth it in my opinion.

Best wishes,

Chris
-- 
--------------------------------------------------------------------------
| Chris Marriott                           | chris@chrism.demon.co.uk    |
| Warrington, UK                           | BIX: cmarriott              |
|                                          | CIX: cmarriott              |
| Save the whales.  Collect the whole set. | CompuServe: 100113,1140     |
--------------------------------------------------------------------------
 
Newsgroups: comp.os.ms-windows.programmer.misc
From: roberth@microsoft.com (Robert Hess)
Subject: Re: Viewer for postscript doc files on NT sdk.
Date: 27 Jan 93 23:22:52 GMT
Organization: Microsoft Corp.
Distribution: usa

Henry Manaster (manaster@yu1.yu.edu) on the lack of a PostScript
viewer on the Windows NT SDK:
 ----
| Why on Earth did microsoft put this out in this fashion without a
| viewer. It almost seems like this is part of some mad plan to
| force people to BUY the docs.
 ----

I suppose we can all see Machiavelian plots in almost every aspect
of society if we look hard enough.

In this situation however, the answer is really quite simple. We don't
have a PostScript viewer that we could put on the SDK.

I suppose we 'could' take a hit in our development scheduled for NT in
order to right one... but that would most likely delay the release of
NT (and add a testing burden), which would not be a popular solution.

I suppose we 'could' buy an existing one from somebody and ship it on
the disk... but that would force us to increase the cost of the SDK,
as well as add an extra testing burder to make sure the viewer kept in
sync with the changes in the system. Again, not popular decisions.

Or we could attempt to satisfy as many people as humanly possible without
affecting any schedules by simply tossing the PS files onto the disk
with the warning 'caveat emptor' so that those individuals who can make
use of these files are allowed that opportunity, and give those people
who can't use PS files something to complain about. :->


If anybody does happen to know of a public domain PostScript viewer, that
has been ported to Windows NT, and can read the PostScript files that
have been included on the SDK, I'd be more then happy to pass it on to
the SDK team for inclusion in a future rev of the disk.

-Robert
From: pge90@ecs.soton.ac.uk (Edwards PG)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Spreadsheet dialog box?
Date: 28 Jan 93 15:46:38 GMT


I want to produce a spreadsheet style dialog box; the 
dialog will begin by only containing a row of edit
fields under different headings, but how do I dynamically
produce further edit fields and position them correctly 
within the dialog window when the next row is required.

I am using borland C++, so if anyone can give me some
pointers of how to do this or if there is a book
covering the programming of spreadsheet applications
for windows then I will be able to get on and code
something that at the moment looks a little tricky.


Please E-mail me direct!

  pge90@ecs.soton.ac.uk


Newsgroups: comp.os.ms-windows.programmer.misc
From: fbruno@ysw526 (F. Bruno)
Subject: Re: VISUAL BASIC
Organization: Lockheed Sanders
X-Newsreader: Tin 1.1 PL4
Date: Thu, 28 Jan 93 13:41:02 GMT

Just a word on speed. Visual Basic 2.0 runs extremely fast on my 486. The only
program which I have ever complained about running was a toolbook app. Now
that was slow. 1+ second to select an item and have it change screens. Thats
on a 486-50. I know VB is slower than C++, but it is also a hell of a lot
easier. I am seriously considering using VB as a front end into windows and
writing code in C++. (uh oh, more DLL's. Objectwindows, VB, etc... :))
Well anyways, a good install program should make sure that its not installing
DLL's which already exist (if possible) and deleting its own copy of
redundant ones.
					-Frank

Newsgroups: comp.os.ms-windows.programmer.misc
From: jtc@beta.lanl.gov (Jason T. Cavender)
Subject: Please Help with DDE and Lost Resources...
Followup-To: jtc@lanl.gov
Organization: Los Alamos National Laboratory
Date: Fri, 22 Jan 1993 23:31:30 GMT


I am writing one of my first windows programs (in C) and I am having some 
trouble.  I am using DDE to write a front end to a commerical product.  Most 
things are going well, but I am curious how to use the XTYP_EXECUTE message.  
I don't understand what you put in the command string.  Does this give access 
to functions in menus but not supported thru DDE?  If not then what do they do?
What is the format?  I have been thru the documentation but haven't seen an 
explanation, but with 5000+ pages it is quite possible I just missed it.

I have another question about some disappearing resources according to 
sysmeter.  Every couple of times you run my program the GDI or MEM goes down 
a percent or two.

I have been looking at Heap Walker (from SDK 3.1) and there are some bitmaps
of mine in there even though my program is no longer running.  Are these my
lost resources, or is it normal for there to be old resources there.  There
are quite a few bitmaps from the server (a beta version of a commercial 
package) is why I ask.  It seems if this is due to improper clean up they 
should know better.  I have looked thru the Programming Tools book about 
Heap Walker but it doesn't really help (me) much.

Is there a better way to find lost resources? 

Oh, one more thing.  The server supports a DDE close message to quit the 
application.  How do you close an app with DDE and then disconnect?  I have
taken out the call (so the DDE connection is properly closed) and I still
lose resources though, so that doesn't appear to be the cause of my lost 
resources.


Thanks for any suggestions.  E-mail or posting is fine.
 

Jason Cavender

jtc@lanl.gov


Newsgroups: comp.os.ms-windows.programmer.misc
From: baruch@genius.tau.ac.il (Baruch Nissenbaum )
Subject: Re: ToolBar under MDI application
Organization: Tel Aviv University ISRAEL
Date: Sat, 23 Jan 1993 20:31:57 GMT

In article <727643543snz@chrism.demon.co.uk> chris@chrism.demon.co.uk writes:
>In article <dtam.727607040@sfu.ca> dtam@fraser.sfu.ca writes:
>
>>I have a toolbar implemented in my MDI application. However, my child windows
>>will ovelap the toolbar. Can anyone tell me how to resize the MDI client
>>windows so that it will not ovelapped with the toolbar. The MDI frame window is
>>the parent of both the toolbar window and the MDI client window!!
>>
>
>The answer is to have the Toolbar window as a child of the FRAME window,
>not of the MDI client.  All you have to do then is process the WM_SIZE
>message in the frame window proc, and resize/move the MDI client window
>yourself, rather than passing WM_SIZE on to DefFrameProc, which resizes
>the MDI client to fill the client area of the frame window.
>

1. Making a window be a son of the MDI frame is not trivial in OWL..
   I found two ways to do this:
    a. Create the child window with a null parent, then call SetParent
       to set the parent be the MDI window. (not touching the child).
    b. In the constructor of toolbar call SetFlags( WB_MDICHILD, 0).

2. All child windows that process WM_SIZE must also call the default WM_SIZE
   method to make the MDI work correctly.

Good luck !    (you'll need much if your working in MSwindows..)
  Baruch
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Style wars with NULL (was Re: How to remove kbd message from system queue?)
Date: 21 Jan 93 18:37:34 GMT
Organization: PE-Nelson

In article <1993Jan20.211104.8721@emr1.emr.ca>, jagrant@emr1.emr.ca (John Grant) writes:
|> 	Technically speaking, NULL is used for a pointer, whereas
|> 	0 or 0L are int values.  The CALLBACK function requires an
|> 	LRESULT (long int), which is a 0 or 0L, but not a NULL.

Well, technically speaking NULL is defined as 0 (or should be) so there is
nothing wrong with using it (no matter whether the function returns an int,
a long, or a pointer).

However stylistically I agree with John.  I use NULL for pointers and
handles and an explicit zero for explicit numeric types.  Likewise I try
to use TRUE and FALSE only for BOOL return types.

Let the style war begin! :-0


----------------------------------------------------------------------------
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: 2fvoaryan@kuhub.cc.ukans.edu
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Need help with Help compiler...
Date: 25 Jan 93 20:28:01 GMT
Article-I.D.: kuhub.1993Jan25.142802.46746
Organization: University of Kansas Academic Computing Services

Hello all,

I am having a problem compiling Help topic files in Turbo Pascal for 
Windows 1.0.  I need to make footnotes with the following characters
being the superscript footnote mark:  #,$,K,+.  This is what the Help
compiler requires for coding titles, hypertext jumps, etc.  Unfortunately,
my wordprocessor (Ami Pro 2.0) automatically puts a number in for 
the footnote mark and won't let me use # or $, etc.  What can I do?

Thanks,

C.A.T.
Newsgroups: comp.os.ms-windows.programmer.misc
From: U0XH <U0XH@UNB.CA>
Subject: Visual Basic 1.0 for sale
Organization: The University of New Brunswick
Date: Mon, 25 Jan 1993 06:43:28 GMT

 I've got MS-Visual Basic 1.0 for Windows for sale for $75.

 Bought it new few months ago, excellent condition, manuals never used.

 Email if interested.

Newsgroups: comp.os.ms-windows.programmer.misc
From: andrewer@unix1 (Andre Werner Asbjornsen)
Subject: Database Module/ Subroutine library WANTED!
Organization: MRIH, More og Romsdal Ingeniorhogskole
X-Newsreader: TIN [version 1.1 PL6]
Date: Thu, 21 Jan 93 13:46:53 GMT

Here at MRIH, AAlesund , Norway, we have a project and thus a problem.

We are about to develop an application involving communication and registering what happened under this communication. (What were said etc..).

This will be a Windows-application, and be programmed in C. As this will be rather heavy on the database side we need some sort of subroutine-library or database module. We would prefer this to store the database-files in a format compatible with the big database-application (as Dbase etc...).

So the Question is: Which are there to choose from? Where can we get them? 
Have anyone else made anything with these libraries before, and what do you think about it?

All input on this appreciated.. Please reply!

and if possible email to: andrewer@unix1.mrih.no or aa@mrih.no

HELP!

Andre' W. Asbjornsen
Senior student at MRIH
Department of computer science
From: twbrown@PE-Nelson.COM (Tom W. Brown)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Changing horses in midstream.
Date: 26 Jan 93 02:25:17 GMT
Organization: PE-Nelson

In article <1k1886INNbek@iguana.cis.ohio-state.edu>, guzman@cis.ohio-state.edu (jonatan guzman) writes:
|> ...well, just about!
|> 
|> I have a program that needs to print a number of documents, and needs to change
|> the mode (landscape/portrait) depending on the document. Anybody out there 
|> know how to do this?

There are two basic approaches:

   1) Always plot in what is essentially portrait mode and tell the printer
      driver to flip into Portrait or Landscape mode via a call to
      ExtDeviceMode().  See documentation for that call for more info.

   2) Always assume that the printer is in Portrait mode and setup your
      mapping mode to give the effect of portrait or landscape.

I've done it both ways.  (1) may be easier if you've already got the graphics
code written and it makes hard to change assumptions about the mapping mode.
(2) can be pretty powerful since you can do fancy (albeit mostly useless :-)
things like printing upside-down and backwards by altering your window and
viewport mapping.

I'm pretty sure that a printer driver can only be flipped between Portrait
and Landscape mode between printer jobs.  So if you have a single print
job where different pages need different orientations then you have to use
the second approach.


|> 
|> As long as we're on the printing subject, who knows how to determine how many
|> lines of x point size, z facename print will fit on a given page size? the
|> page size is determined via the GetDeviceCaps(hDC, HORZRES/VERTRES) function.

Select the desired font in the DC and use GetTextMetrics() to get the
LOGFONT data for the text.  The combination of lfHeight + lfExternalLeading
is commonly used for the line height.  Note that this value will be in
logical units (the same as device units if you've left the DC in MM_TEXT
mapping mode).



----------------------------------------------------------------------------
Tom Brown               |  "She turned me into a newt...
PE Nelson Systems       |                                  ... I got better"
twbrown@pe-nelson.com   |                    Monty Python and the Holy Grail
----------------------------------------------------------------------------
Newsgroups: comp.os.ms-windows.programmer.misc
From: dtam@fraser.sfu.ca (Dominic Pok Man Tam)
Subject: ToolBar under MDI application
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Thu, 21 Jan 1993 09:04:00 GMT

I have a toolbar implemented in my MDI application. However, my child windows
will ovelap the toolbar. Can anyone tell me how to resize the MDI client
windows so that it will not ovelapped with the toolbar. The MDI frame window is
the parent of both the toolbar window and the MDI client window!!
 
e-mail or post to newsgroup is welcome!!
From: paulchen@sol.cs.uni-sb.de (Markus Bolz)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Borland Debugger and windows for workgroups won't work hand in hand...
Date: 21 Jan 93 13:30:48 GMT
Distribution: comp
Organization: /WW/usr/bolz/.organization



Hello
We just installed W4W. Everything runs fine but the borland windebugger.
Any suggestions for getting W4W and Borlands debugger running?

If you got an answer to our problem, please reply NOT to my address. I'm 
on vacancy for the next two weeks and I'm posting for a friend..

reply to the following address:
	nt@multimedia.hq.de
or
	jf@multimedia.hq.de

thanx for your patience:
--
		-wsp-

.......................................................................
     \ LIVE FAST     |  Markus Bolz   
 @%%%%============-  |  		Tel. +49 681 302 4134
     / DIE YOUNG     |  		Email: paulchen@cs.uni-sb.de
........................................................................
Newsgroups: comp.os.ms-windows.programmer.misc
From: tima@sequent.com (Timothy Alan Anderson)
Subject: Strange BitBlt problem
Organization: Sequent Computer Systems Inc.
Date: Thu, 28 Jan 93 02:08:01 GMT

My goal is to take two bitmaps, one 'mask' and one 'picture' and
stuff it onto the screen so that you can leave the original screen
colors alone (ala icons). In the process of trying to do that, I have been 
unable to get a rather simple code section (a portion of what I was
trying to work on) to work correctly. If anyone can give me a hint,
I would be much appreciative...

Lets say that global_hdc is the 'global HDC' and hmono_bitmap is
the handle to a monochrome bitmap. Assume these are set up correctly.
Example code section follows:

HDC global_hdc;
HBITMAP global_hmono_bitmap;

WindowsIsStupid(void)
{
   BITMAP bm;
   HDC hdc_temp;
   HDC hdc_mask;

   /* coupla compatible dc's */
   hdc_temp = CreateCompatibleDC(global_hdc);
   hdc_mask = CreateCompatibleDC(global_hdc);

   /* So that the mono bitmap comes in as */
   /* WHITE background and BLACK forground*/
   SetTextColor(hdc_mask, RGB(0,0,0));
   SetBkColor(hdc_mask, RGB(255,255,255));

   /* standard windows garbage */
   GetObject(global_hmono_bitmap, sizeof(BITMAP), &bm);
   SelectObject(hdc_temp, global_hmono_bitmap);

#if 1

   /* this section doesn't work */

   BitBlt(hdc_mask,
      0,
      0,
      bm.bmWidth,
      bm.bmHeight,
      hdc_temp,
      0,
      0,
      SRCCOPY);

   /* hdc_mask should have a color converted copy of the afore */
   /* mentioned monochrome bitmap. */

   BitBlt(global_hdc,
      0,
      0,
      bm.bmWidth,
      bm.bmHeight,
      hdc_mask,
      0,
      0,
      SRCCOPY);

   /* global_hdc should have an exact copy of the above */
   /* but it doesn't display anything at all.... */

#else

   /* this does work, so hdc_temp is OK after SelectObject */

   /* So that the mono bitmap comes in as */
   /* WHITE background and BLACK forground*/
   SetTextColor(global_hdc, RGB(0,0,0));
   SetBkColor(global_hdc, RGB(255,255,255));

   BitBlt(global_hdc,
      0,
      0,
      bm.bmWidth,
      bm.bmHeight,
      hdc_temp,
      0,
      0,
      SRCCOPY);

#endif

   DeleteDC(hdc_temp);
   DeleteDC(hdc_mask);

}

What is going on?

tima@sequent.com

Newsgroups: comp.os.ms-windows.programmer.misc
From: Alan_York@mindlink.bc.ca (Alan York)
Subject: EXCEL/NOVELL Question.
Organization: MIND LINK! - British Columbia, Canada
Date: Mon, 25 Jan 1993 03:45:51 GMT

Here is an EXCEL/NOVELL problem hopefully someone knows the answer to.

Whenever the current EXCEL spread sheet is saved a backup copy is made.  The
data files are on a Novell file server.  The problem is that the back-up file
is given a unique alphanumeric name like 36cf8e.  This means
that the backup files accumulate and fill up the disk.

Microsoft say's that EXCEL backup files are always called xxxxx.BAK and
wasn't much help.  Something appears to be turned on somewhere to cause
this backup file creation with the encryted name.

Does anyone know what is turned on and how to turn it off. Thanks.
--
==============================================================================

 From:  Alan B. York              |  Dynamic Datacorp People
        alan_york@mindlink.bc.ca  |  Vancouver, B.C., Canada    604/294-9193
------------------------------------------------------------------------------