Article View: comp.os.ms-windows.programmer.misc
Article #1721Re: Need KLUDGE to make DOS .exe work *my way* from VB app
From: John Grant
Date: Mon, 14 Dec 1992 00:23
Date: Mon, 14 Dec 1992 00:23
48 lines
2714 bytes
2714 bytes
In article <1992Dec12.043729.18412@u.washington.edu> tvp@gibdo.engr.washington.edu () writes: >I'm fairly new to Windows programming. I picked up Windows SDK, VB and >Borland C++ 3.1 with the purchase of my home PC last spring. >Basically, all I've been using is BC++, and then only for compiling >straight C. Realizing this is a waste, I've taken on some small >projects to initiate me in different aspects of Windows programming. > [stuff deleted...] >For conversion, I thought I'd try Visual Basic. (Turns out I kind of >like it, but that's another story.) The way I did it was to put in a >Drive box, Directory box, and File list box (using the standard >idioms) for selecting the input text file; two check boxes repre- [stuff deleted...] Tad, I can't answer your question, however since the object of the exercise is to learn Windows programming, I do have one suggestion. Windows 3.1 comes with COMMDLG.DLL (Common Dialog Functions). They are: GetOpenFilename() - get pathname of input file GetSaveFilename() - get pathname of output file ChooseColor() - choose an RGB colour ChooseFont() - choose a font PrintDlg() - print setup FindText() - find text (i.e. in an editor) ReplaceText() - find & replace text The functions are very easy to use and save you a lot of work coding your application. They also give apps which use them a common look and feel. MicroSoft allows you to distribute COMMDLG.DLL with your app so it will run on Windows 3.0. In your case, assuming Visual Basic supports these functions, you can make a single function call to GetOpenFilename instead of managing 3 listboxes as you are doing now. If you want to see some of these functions in action, just use the Windows 3.1 utilities like Notepad, Write, PaintBrush, desktop/colour (i.e. windows colour setup). Also, as you have probably found out by now, you don't need the SDK if you have BC++ 3.1 - it includes (almost) everything you need. Good luck. It's a lot of work and a steep learning curve, but it's also very satisfying (as you've undoubtedly discovered). -- John A. Grant jagrant@emr1.emr.ca Airborne Geophysics Geological Survey of Canada, Ottawa
Technical Details
Message-ID:
<1992Dec14.002337.13668@emr1.emr.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrantReferences:
<1992Dec9.193630.25156@worak.kaist.ac.kr> <1992Dec12.043729.18412@u.washington.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!emr1!jagrant From: jagrant@emr1.emr.ca (John Grant) Subject: Re: Need KLUDGE to make DOS .exe work *my way* from VB app Message-ID: <1992Dec14.002337.13668@emr1.emr.ca> Organization: Energy, Mines, and Resources, Ottawa References: <1992Dec9.193630.25156@worak.kaist.ac.kr> <1992Dec12.043729.18412@u.washington.edu> Date: Mon, 14 Dec 1992 00:23:37 GMT Lines: 48