HDTenEightyP/NetNews huggingface dataset:
From: tonplooi@microsoft.com (Ton Plooy)
Subject: Re: Global memory question
Date: 22 Jan 93 11:51:22 GMT
Organization: Microsoft Corporation

In article <1993Jan21.043651.22090@empire.cce.cornell.edu> avinogra@empire.cce.cornell.edu (Alex Vinogradov) writes:
>Hello,
>I have to allocate large number of small memory blocks (for simlicity, let's
>say that it is a huge linked list each node of which is quite small).  The
>problem is in following -- I cannot use local memory for it since it gets
>overflowed pretty fast; the problem with global memory is that I do not
>want to spend 20 bytes for overhead for each of my 20-30 bytes memory blocks
>because I will be using nearly twice as much memory as I really need.  Does
>anyone has any ideas on how should I design my memory management scheme?
>I don't think I am the first one who came up with this question, but none
>of the books in local library mentions that.
>
>The other related to this question I have: what is GetSelectorBas() / 
>SetSelectorBase()?  I did look it up in Microsoft manuals but they ain't
>too informative on this issue.
>

If you have the MS C7 windows libraries, the _fmalloc function implements
it's own subsegment allocation scheme under windows. It's in my opinion much
better to use this function than the GlobalAlloc/GlobalLock functions. If 
you want to implement your own memory allocation functions, you could try 
out the following. Use GlobalAlloc to allocate a block of data, switch DS 
to the DS of this block, call LocalInit(DS, 0, size) and restore DS. On 
subsequent allocations use LocalAlloc on this block (swapping DS). I remember 
reading an article by Andrew Schulman who implemented this, but I'm not sure 
I have al the details right.
The Get/SetSelectorBase functions are used for accessing specific memory 
addresses, GetSelectorBase retrieves a linear address (divide this by 16 
to get a segment address).

Bye,

    Ton
From: manaster@yu1.yu.edu (Chaim Manaster)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Re: Viewer for postscript doc files on NT sdk.
Date: 24 Jan 93 22:40:46 GMT
Organization: School of Engineering and Applied Sciences, UCLA

I have no problem with the inclusion of the postscript doc files,
my problem is with the exclusion of a postscript viewer for those
of us who do not wish to print so many pages of docs.

-- 
***************************************************************************
	Henry Manaster          *     EMail: manaster@yu1.yu.edu
	Brooklyn, NY            *
                                *
	Disclaimer: The above is not necessarily MY opinion nor that 
				of anyone else :-)  ????!
****************************************************************************
 
Newsgroups: comp.os.ms-windows.programmer.misc
From:  smcl@speed.kiev.ua (Scott McLoughlin)
Subject: Re: HELP: String in Edit Cntl
Reply-To: smcl@speed.kiev.ua
Organization: Private Scott McLoughlin
Date: Thu, 28 Jan 93 03:25:56 +0200

To display line breaks in a multiline edit control, you have to
use the old #13#10 DOS combination. \n alone will not work
(as you have just discovered).  Welcome to windows.

Scott McLoughlin
[ This cutesy message intentionally left blank. ]


Xref: sparky comp.os.ms-windows.programmer.misc:5217 comp.os.ms-windows.programmer.tools:2177 comp.os.ms-windows.programmer.win32:2995 comp.os.ms-windows.setup:2811
From: tad@wrq.com (Tad Marshall)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools,comp.os.ms-windows.programmer.win32,comp.os.ms-windows.setup
Subject: Re: *BIG* problems with *2nd* video card
Date: 21 Jan 1993 09:11:17 GMT
Organization: Walker Richer & Quinn, Inc., Seattle, WA
Distribution: world
NNTP-Posting-Host: elmer.wrq.com

RE: video slowdown when adding monochrome card

In article <1jj6fs$hfk@agate.berkeley.edu> ereiss@ocf.berkeley.edu (Edward Reiss) writes:
>Lo and Behold - whenever the second monochrome video card
>is plugged into its slot, my main monitor slows down by at least 40%. Whenever
>it is removed, the system behaves normally.  Can someone tell me how to get
>around this problem.  My system does have one unused serial port. Can I plug
>the monochrome monitor into this port and route the output of the debugger
>to it?  Was it the type of monochrome card (cheap Hecules compatible with
>graphics capabilities) that slowed it down? Would a different card remedy
>the situation?  All suggestions will be appreciated.

Due to the way the ISA/EISA bus works, each 128 KB region of I/O buss memory
must be accessed as either all 16-bit or all 8-bit.  Your VGA card was happily
chugging away in 16-bit mode until you added an 8-bit mono card, at which
point it too had to be accessed in 8-bit mode.  I don't use a mono card unless
I really need it, for this reason.

Your mono monitor is not going to work plugged into the serial port!

The only mono card that would not slow you down would be a 16-bit one, but
I'm not sure that there is any such thing.

-- Tad
From: ampac@netcom.com (Marc Kulla)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Help! Printing Question...
Date: 26 Jan 93 22:23:23 GMT
Article-I.D.: netcom.1993Jan26.222323.26314
Organization: Netcom Online Communications Services (408-241-9760 login: guest)

I have an odd problem.  When printing bitmap data to my HP LaserJet IIIp
printer (using BitBlt) I get this odd situation:

When the printer is configured at 300dpi, everything works fine.

When the printer is configured at 150 or 75dpi, it sometimes works
and sometimes just kicks out a blank sheet.

I do GetDeviceCaps calls, and it returns the same thing no matter what
I set the printer to.  For example, the dpi is always returned as 300
even if I change it in the configure printer selection.  

Any suggestions?

Marc
e-mail: ampac@netcom.com
From: andres@scf16.scf.loral.com (Jeff Andres)
Newsgroups: comp.os.ms-windows.programmer.misc,comp.os.mw-windows.programmer.tools
Subject: MS SDK???
Date: 22 Jan 93 18:52:48 GMT
Organization: Loral Space & Range Systems

Target Language: BPW 7.0
Newbie question

SDK = Software Development Kit ???

Where do you get it and what does it contain ? only usable from MS C or
C++ code generation ???


-- 

      Jeff Andres 			---  Loral Space and Range Systems
 					---  1260 Crossman Ave.  MS-S37
  e-mail: andres@scf16.scf.loral.com    ---  Sunnyvale, California  94089
From: misha@aiva.lt ()
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Styles of multiline edit
Date: Tue, 26 Jan 93 23:38:53 +0100
Distribution: world
Organization: Aiva System
Reply-To: misha@aiva.lt


Hi, netters!

In my program I have 3 multiline edit controls, created as
follows:

    for (i = 0; i < 3;  i++)
        hwndCard[i] = CreateWindow(
                      "edit", "",
                      WS_CHILD | WS_VISIBLE | WS_BORDER |
                      ES_MULTILINE | ES_WANTRETURN,
                      CARDX, CARDY,
                      CARDWIDTH, CARDHEIGHT,
                      hwndParent, i,
                      HINSTANCE(hwndParent),
                      NULL);

I'd like to let user change alignment in of these edits. Here is a
piece of my code:

//==============================================================
//   fnCmdAlign(HWND, WORD, LONG);     wMessage == WM_COMMAND;
//                                     wParam   == MI_LEFT
//                                              or MI_RIGHT
//                                              or MI_CENTER
//==============================================================
long fnCmdAlign(HWND hWnd, WORD wParam, LONG lParam)
{
    register   i;
    DWORD      dwStyle;
    //
    //   Get current dwStyle setting
    //
    dwStyle = GetWindowLong(hwndCard[0], GWL_STYLE);
    //
    //   Set the new dwStyle according to selected menu item.
    //
    switch (wParam)
       {
       case MI_LEFT:   
            dwStyle &= ~ES_RIGHT;    // mask off ES_RIGHT
            dwStyle &= ~ES_CENTER;   // mask off ES_CENTER
            dwStyle |= ES_LEFT;      // set ES_LEFT
            break;

       case MI_RIGHT:
            dwStyle &= ~ES_LEFT;     // mask off ES_LEFT
            dwStyle &= ~ES_CENTER;   // mask off ES_CENTER
            dwStyle |= ES_RIGHT;     // set ES_RIGHT
            break;

       case MI_CENTER: 
            dwStyle &= ~ES_RIGHT;    // mask off ES_RIGHT
            dwStyle &= ~ES_LEFT;     // mask off ES_LEFT
            dwStyle |= ES_CENTER;    // set ES_CENTER
       } 
    //
    //   Now set up the new window style...
    //
    for (i = 0;  i < 3;  i++)
        {
        //   Here we are...
        //
        SetWindowLong(hwndCard[i], GWL_STYLE, dwStyle);
        InvalidateRect(hwndCard[i], NULL, TRUE);
        UpdateWindow(hwndCard[i]);
        //
        //  AND NOTHING HAPPENS HERE!
        //
        }

Yes, the problem is that alignment remains unchanged for my edits,
althought WinSight shows me, that window style bits have been
changed! For further investigation I've tried to play with
ES_UPPERCASE and ES_LOWERCASE styles, and they both work, i.e.
after I set a new style it's in effect immediately.

Of course, I can work around the problem by simply destroy and
recreate windows with new style, but it seems, that I'm missing
something simple...

I've tried to compile the program with both BC++ 3.1 and MSC 6.0
with libraries from SDK 3.1 - no difference.

Any ideas? Please answer to my e-mail address, I don't read this
newsgroup often. Thanks in advance!

/\\ichael Dvorkin,
Vilnius, Lithuania                E-mail: misha@aiva.lt
---

---
From: jacs@aiai.uucp (Julian Smart)
Newsgroups: comp.windows.ms.programmer,comp.os.ms-windows.programmer.misc
Subject: Re: Comparison between MS-Windows and X-Windows
Date: 28 Jan 93 09:38:55 GMT
Reply-To: jacs@aiai.uucp (Julian Smart)
Organization: AIAI, University of Edinburgh, Scotland

In article <1993Jan24.233048.5960@ais.com> bruce@ais.com (Bruce C. Wright) writes:

>>If anyone has worked in both MS Windows and X windows environment, I
>>would like to know about your experience about these two with respect to
>>:-
>>1. ease of learning.
>>2. flexibility in design and implementation
>>3. ease in implementing a given application (probably 2 should cover
>>this)
>>4. portability.
>>
>>I would appreciate any comments on these issues. Please send your
>>responses to dhan@cs.arizona.edu

Bruce Wright doesn't mention the plethora of multiplatform development
toolkits available, which mean that you don't have to choose which
to develop on - you can develop on both simultaneously. Who would want to
develop on just one platform these days...? It doesn't seem worth spending
your precious time putting all your eggs in one basket, given the cost
of developing GUI apps.

>    1)	...
>
>	For the programmer the biggest problems with Xwindows are that it
>	doesn't support printing very well

Indeed; but multiplatform development toolkits presumably provide PostScript
generation under X (?) -- at least my freeby C++ toolkit wxWindows has a go at it.

>    3)	Ease of implementing a given application -- Depends on what the
>	application is.  In general X is nicer because it is harder to
>	crash the whole system than it is with MS-windows (X is usually
>	implemented on a true protected-mode OS, while MS-Windows is
>	only a sort of pretend protected-mode system; it's very easy to
>	crash it during development)

I don't crash Windows very often these days (once in a blue moon), but admittedly
it's easier to develop on a big, fast X machine than a slow PC.
>
>    4)	Portability -- If this is important then there's really no
>	choice;  MS-Windows apps are the epitome of non-portable code:
>	X is your only alternative.

?uh? There's lots of choice in that using a commercial toolkit, you
could run your apps on Macs, Windows, NT, X (Motif/OpenLook), OS/2... even
DOS (ugh).

I'm writing a reasonably big application on Windows and X but it's not fully commercial
so maybe my relatively happy experience is not typical. For what it's worth
my C++ toolkit, wxWindows, is available by ftp from skye.aiai.ed.ac.uk, directory pub/wxwin.

Julian Smart
jacs@aiai.ed.ac.uk
From: qiu@tree.egr.uh.edu (Feng Qiu)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: How do you use CScrollBar class in a dialog box ?
Date: 29 Jan 1993 02:48:50 GMT
Organization: University of Houston
Reply-To: qiu@tree.egr.uh.edu
NNTP-Posting-Host: oak.egr.uh.edu


I am programming using C++ 7.0 and  Microsoft Fundation Class.

I have a problem in using scroll bar in a dialog box. The problem is
that before the dialog box is poped up I want adjust the position of
the scroll bar contained in the dialog box to the right position I want it 
to be. I did this in OnInitDialog() using member function provided with 
CScrollBar class but it does not work. The position of the scroll bar is 
still at minimum position after the  dialog box has poped up.

The dialog box is a subclass of CModalDialog and the scroll bar is of
class CScrollBar.

Dose anyone knows why?
 
I'd appreciate your response. 
if it is possible, lease send your reply to qiu@tree.egr.uh.edu
 
Feng
Newsgroups: comp.os.ms-windows.programmer.misc
From: roger@rkhost.demon.co.uk (Roger Kinkead)
Subject: DOS <-> Windows IPC ?
Distribution: world
Organization: Home
Reply-To: roger@rkhost.demon.co.uk
X-Mailer: Simple NEWS 1.90 (ka9q DIS 1.19)
Date: Thu, 21 Jan 1993 23:06:17 +0000


Hi,


Is it possible for Inter-Process-Communications to take place between a
DOS task and my Windows program?

What I would like to do is this....

Run a DOS application in the background which will accept commands from (and
return responses to) my Windows program. The interface need only be a
couple of character streams - just enough for me to pass a text string to
the DOS app. and for the DOS app. to respond in a similar manner.

The DOS application will in effect be a small communications system, which 
will accept commands from the Windows application in a similar manner as one
might enter them at the keyboard.
I reckon this is the best approach to get some decent time-slicing under
windows to allow the communications system to operate successfully. And, to be
honest it means I can use 99% of the code that will be running at the other
end of the line in a standard DOS environment.
(The reason why decent multi-tasking is important is that some of the commands
will begin exchange of files and data with a range of protocols, protocols
which I would like to use 'as-is' from my DOS code if possible). 

Another reason is that it should be possible (when the time comes ) for simple
replacement of the DOS task to provide communications over  X.25, ethernet,etc.
because the IPC is just a couple of text streams.

Is there any 'standard' method of acheiving such DOS<->Windows IPC?

If there is not, then could I acheive this interface my grabbing a software
interrupt of my choice and writing a TSR (Terminate and Stay Ropey) to
provide a couple of calls to buffer the messages between apps?
Is this as straightforward as I hope it is .... or does Windows Enhanced Mode
cause any problems in calling real-mode software interrupts?


I apologise for the length of this message ... I'm afraid I'm not very good
as explaining myself consisely (or at all maybe!).

If anyone could offer my any assistance whatsoever, I would be most grateful.

Many Thanks for taking the time to read this.

Regards,


Roger
--

-----------------------------------------------------------------------------
| Roger Kinkead                               |  roger@rkhost.demon.co.uk   |
|                                             |                             |
| "Moorcroft", 27 Antrim Road, Lisburn,       |                             |
|  County Antrim, Northern Ireland, BT28 3ED  |                             |
-----------------------------------------------------------------------------

Newsgroups: comp.os.ms-windows.programmer.misc
From: harper@convex.com (David Harper)
Subject: Re: Viewer for postscript doc files on NT sdk. 
Date: Mon, 25 Jan 1993 18:54:28 GMT
Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.

In article <1993Jan24.211233.23040@emr1.emr.ca> jagrant@emr1.emr.ca (John Grant) writes:
> some stuff deleted...
>	 The only way to print them from File Manager
>	is to have an application that can read PS files associated
>	with them.  I am forced to jump out to DOS and do:
>		c:\copy xxx.ps lpt1
>	which seems kind of silly when Windows is supposed to be
>	all-wonderful and all-powerful.
>
>	On a similar note, if *.BAT files are pre-associated as
>	'executable' files, then how can I print a *.BAT file
>	from File Manager by clicking in it.  Obviously I will
>	have to manually fire up notepad on it.  File Manager
>	needs a way to print a file just be selecting it (it would
>	have to assume you know what you are doing and that the
>	file is already in appropriate print-ready format for
>	the printer).

Either the latest issue of PC Magazine or the previous issue had an article
in User to User which described how to implement "drag & drop" in the file
manager.  The main purpose was to be able to view documentation of the form
"readme" or "read.me" or "docs.man".  You'd go crazy trying to associate all
of these with notepad or another reader.  Now I can just click on a file of
interest and drag it over to one of three viewers I have permanently visable
in file manager (notepad, write & microemacs) and drop it on top.  Moments
later the selected app appears showing the file.  I don't know if the print
manager will allow you to do this or not, but it's worth a try.

Dave
From: onar@cee.hw.ac.uk (Onar Olsen)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Combo Box
Date: 27 Jan 93 16:06:07 GMT
Organization: Dept of Computing & Electrical Engineering, Heriot-Watt University, Scotland

Help !

I might be mad, but this is what I want to do:


I want to read the edit field of a Combo Box, and insert the
contents of the field into the Combo Box when the user presses return.


I have tried to 'subclass' the Combo Box and trap every WM_CHAR
message but without any success.



Please help if you can.



Onar


E-MAIL : onar@cee.hw.ac.uk
Posted-Date: Fri, 22 Jan 93 10:11:59 -0600
Received-Date: Fri, 22 Jan 93 10:10:32 CST
Date: Fri, 22 Jan 93 10:11:59 -0600
From: "Mansoor Ahmed" <mansoor@ssdc.honeywell.com>
To: comp.os.ms-windows.programmer.misc
Subject: MS-WIN programmer available
Newsgroups: comp.os.ms-windows.programmer.misc
Organization: mailEnteringNews at Honeywell SRC


I am looking for somebody in the Twin Cities area who
needs a MSWIn programmer. 

please mail mansoor@ssdc.honeywell.com 
or call (612)951-7279
From: christb@infmuc (Christian Barmala)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Aborting Eventprocessing
Date: 21 Jan 93 09:58:35 GMT
Organization: Informix Software, Inc.
X-Newsreader: Tin 1.1 PL3

The processing of messages that cause the screen to be repainted may take
a long time. During that time other messages may arrive, that make the
current repainting of the screen worthless, because they change the screen
and need again a repaint. Such messages may be iconizing, closing or resizing
the window, typing in text by keyborad or drawing graphics by mouse, ...

Therefore it seems reasonable to abort processing of WM_PAINT as soon
as such messages arrive and to process these messages.

In C this seems to me easy. There is probably a function like
"look_for_event_but_don't_get_it()". If it returns such an event,
I close all device contexts, that I opened during WM_PAINT, I invalidate
the part of the window, that has not yet been repainted (in case of doubt
the whole window) and then I return premature from the function that
processes WM_PAINT. Am I right?

How can the same be acomplished in Visual Basic?

Regards, Christian Barmala
Newsgroups: comp.os.ms-windows.programmer.misc
From: stevesi@microsoft.com (Steven Sinofsky)
Subject: Re: Debuging with CV of MFC program qust.
Date: 24 Jan 93 01:55:06 GMT
Organization: Microsoft Corporation

In article <1993Jan21.132929.3089@aristo.tau.ac.il> bardak@tau.ac.il (Barak Cohen) writes:
>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
>

There is a WinMain entry point, and it is contained in the MFC library.
There is CodeView information available so you can just point the
debugger to those files (c:\c700\mfc\src) when asked at startup.  In
order to get the debug information in your executable, you must be
sure to link with the /CODEVIEW switch.  Also, on the debug versions
of the MFC libraries have codeview information (those variants that
end with a 'd', such as mafxcwD.lib).
-- 
Steven Sinofsky
stevesi@microsoft.com
Disclaimer: I don't speak for Microsoft, BillG does that.
From: davidw@auck.irl.cri.nz (David White)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: MS-Fortran: filename from cmd line?
Date: 21 Jan 93 22:31:27 GMT
Organization: Industrial Research Ltd, Auckland, New Zealand
NNTP-Posting-Host: totara.auck.irl.cri.nz
Keywords: fortran, command line, filename

I recently upgraded to MS-Fortran 5.1, which can generate Windows
programs. 

I wish to associate the input files for my Fortran simulation with 
the Windows .EXE file, AND get the input filename into the 
simulation for character manipulation to generate corresponding 
output filenames. 

Eg, associate *.INP with SIMULATE.EXE. Now I want to be able to
double-click on XYZ.INP (in FileManager) to run SIMULATE, opening
XYZ.INP as input and generating XYZ.OUT for output. 

My local Microsoft support provided information about accessing
the PSP or PDB at the start of the app, and a Windows call:
GetCurrentPDB(). Before looking into something that seems rather
complex to me, has anyone solved this one already?

david white                           davidw@auck.irl.cri.nz

--
 david white    (engineer, Goon fan & son of my Dad)
 Internet davidw@auck.irl.cri.nz  Fax +64 9 443-4737
Newsgroups: comp.os.ms-windows.programmer.misc
From: jvanderm@watserv1.uwaterloo.ca (JVANDERM - MUTUAL GROUP)
Subject: Re: MS Windows GUI standards.
Organization: University of Waterloo
Date: Fri, 22 Jan 1993 12:13:37 GMT

In article <1jmn32INNk0i@shelley.u.washington.edu> jude@milton.u.washington.edu (Jude Stoller) writes:
>Can anyone point me to a book or file which discusses MS Windows GUI
>standards?
>
>Thanks in advance,
>Jude

Try:
        The Windows Interface - An Application Design Guide
         
        Microsoft Press - ISBN 1-55615-384-8

John.
Newsgroups: comp.os.ms-windows.programmer.misc
From: wcsswag@alfred.carleton.ca (The Charlatan)
Subject: VB 2.0 DDE Question
Organization: Carleton University, Ottawa, Canada
Date: Mon, 25 Jan 1993 01:29:40 GMT


    I posted earlier no reponse. So try, try again. 


  I have a program that establishes a DDE link with Excel(English
Version). I was wondering if a user ran the program on a system with a
foreign version of Excel(ie French), Would the DDE commands such
"System, SAVE(), etc", function or would they have to translated into
the language being used?

-email or post

Thanks in advance
Alex
Newsgroups: comp.os.ms-windows.programmer.misc