morris@jade.jpl.nasa.gov (Mike Morris) (02/08/90)
I've only been reading this newsgroup for a month or so, so please pardon me if I am asking an old question, but... I'm writing my first "real" program for Windows 2.11, and would like to include a feature in the "About <application-name>..." menu item. Since this application will be running on over 250 386sx machines, I fully expect to have to support several different versions simultaneously. I'd like to be able to tell the user 'click on the "About..." item and tell me what you see'. I want the About item to bring up a window which has, among other things: "<application name> Version NN.NN, dated MM/DD/YY, at HH:MM" in the window. I cannot find any reference in any book about getting file information from the system. It's obvious it can be done, just look at the "Long..." option in the MS-DOS window. But how? I think I can put the rev number string into a #define in the .H file... If I can't get the file date/time, is there a way that I can read the system date and time during the compile process and stuff them into a #define ? Years ago when I programmed on a HP-1000, with a 2645 terminal, the editor had a neat feaure where it would recognize a certain special format of date/time string in the source code and automatically update it. Too bad nobody has put it into a MS/PC-DOS editor... My environment is Microsoft C version 5.1, the SDK kit, either the notepad editor for quick fixes or the Norton editor when under dos... BTW, has anybody gotten the MAKE/RC/CL/Link process to run under windows? It'd be nice to not have to bring up windows up to iconedit, dialog box edit, and down to edit/compile/link, and up to test. Lastly, is there a way to "reset" the Windows loader "memory changed" announcement? I recently began using 386max to stuff my Novell drivers into high memory. 386max claims to be a compatible replacement for HIMEM.SYS and SMARTDRIVE, but I can't install (i.e. SETUP) windows while it's running. Mike Morris Internet: Morris@Jade.JPL.NASA.gov Misslenet: 34.12 N, 118.02 W #Include quote.cute.standard Bellnet: 818-447-7052 #Include disclaimer.standard Radionet: WA6ILQ
symult@cit-vax.Caltech.Edu (Symult Customer Service) (02/09/90)
Regarding your question about doing make-compile-link under Windows. Yes you can, I have done it by creating a pif file for make.exe. Here are the parameters: KB Required: 256 KB Desired: 640 Directly Modifies: Screen Program Switch: Text Screen Exchange: Text All other parameters are off. This will run make as an old app and it doesn't close the window when it is done, so you can copy the error messages onto the clipboard, and paste them into notepad (say). There is one curious anomaly though. On my system, if I just have the MSDOS executive running, make will fail with the error "not enough memory". However, when I start up another windows application, the make will work. I also rename my makefiles to have the.mak extension, and modify win.ini so that it invokes make when I double click on the .mak file in the MS DOS exec window. david@symult.com
hadgraft@civeng.monash.edu.au (Roger Hadgraft) (02/12/90)
In article <2773@jato.Jpl.Nasa.Gov>, morris@jade.jpl.nasa.gov (Mike Morris) writes: > > BTW, has anybody gotten the MAKE/RC/CL/Link process to run under > windows? It'd be nice to not have to bring up windows up to iconedit, > dialog box edit, and down to edit/compile/link, and up to test. I do this routinely on both a 386 and a 286. > -- Roger Hadgraft | hadgraft@civeng.monash.edu.au Lecturer in Civil Engineering | phone: +61 3 565 4983 Monash University | fax: +61 3 565 3409 Clayton, Vic. 3168. Australia. |
patrickd@chinet.chi.il.us (Patrick Deupree) (02/13/90)
In article <2773@jato.Jpl.Nasa.Gov> morris@jade.Jpl.Nasa.Gov (Mike Morris) writes: >Lastly, is there a way to "reset" the Windows loader "memory changed" >announcement? I recently began using 386max to stuff my Novell drivers >into high memory. 386max claims to be a compatible replacement for HIMEM.SYS >and SMARTDRIVE, but I can't install (i.e. SETUP) windows while it's running. > All you have to do to setup Windows with 386max running is put a semicolon in front of your 386max line in your config.sys. What this does is make the Windows installation program think it's a comment. However, it will still execute in DOS. -- "Organized fandom is composed of a bunch of nitpickers with a thing for trivial pursuit." -Harlan Ellison
jfbruno@rodan.acs.syr.edu (John Bruno) (09/13/90)
Responding to my question about intercepting messages to an edit control... In article <7275@umd5.umd.edu> brianf@umd5.umd.edu (Brian Farmer) writes: > >Someone at Microsoft thought of this first and called it subclassing. It is >covered in the manuels but I'm not sure where. The 2.1 sdk told you how to >do it but not why to do it. It's also mentioned in passing in "Reference-Volume 1" of SDK 3.0. > [code deleted] Thanks! That's basically what I wanted to do. >Just about any window message if fare game for you to play with. All messages >for the window will pass through MySubclassWndProc before they go onto the >actual window function. You can trap messages, changes messages, add messages. Well, now I have another question. I'd like to make some text lines in the edit control a different color. I guess I'd have to intercept several messages to get this to work, like WM_PASTE, WM_PAINT, WM_CHAR, probably some others too, but since Win3.0 does the actual drawing of the characters on the screen, how can I change their color? Could I do something like was suggested above, only in some cases not call the windows edit control proc? Is this a kosher thing to do? > >Hope this helps, > >Brian Farmer >brianf@umd5.umd.edu Once again, thanks for the help ---jb
kensy@microsoft.UUCP (Ken SYKES) (09/14/90)
In article <1990Sep12.185146.21307@rodan.acs.syr.edu> jfbruno@rodan.acs.syr.edu (John Bruno) writes: >Responding to my question about intercepting messages to an edit control... >Well, now I have another question. I'd like to make some text lines in the edit >control a different color. I guess I'd have to intercept several messages >to get this to work, like WM_PASTE, WM_PAINT, WM_CHAR, probably some others >too, but since Win3.0 does the actual drawing of the characters on the screen, >how can I change their color? Could I do something like was suggested above, >only in some cases not call the windows edit control proc? Is this a kosher >thing to do? > Actually it would probably be more kosher to make the listbox an owner-draw listbox. This will allow you to fiddle it with the output characteristics to your hearts content. The docs explain how owner-draw controls work. Ken Sykes Disclaimer: The above opinions are solely my own.
jfbruno@rodan.acs.syr.edu (John Bruno) (09/14/90)
In article <57431@microsoft.UUCP> kensy@microsoft.UUCP (Ken SYKES) writes: >In article <1990Sep12.185146.21307@rodan.acs.syr.edu> jfbruno@rodan.acs.syr.edu (John Bruno) writes: >>Responding to my question about intercepting messages to an edit control... >>Well, now I have another question. I'd like to make some text lines in the edit >>control a different color. I guess I'd have to intercept several messages >>to get this to work, like WM_PASTE, WM_PAINT, WM_CHAR, probably some others >>too, but since Win3.0 does the actual drawing of the characters on the screen, >>how can I change their color? Could I do something like was suggested above, >>only in some cases not call the windows edit control proc? Is this a kosher >>thing to do? >> > >Actually it would probably be more kosher to make the listbox an owner-draw >listbox. This will allow you to fiddle it with the output characteristics >to your hearts content. The docs explain how owner-draw controls work. But I'm not doing a listbox, it's an edit control. Page 1-50 in Volume I of the reference manual defines constants for owner-draw list boxes, combo boxes, and buttons only. I was hoping that I could avoid drawing the entire control myself when all I really need is to be able to a have few of the text lines in the edit control be a different color, without the user being able to edit these items. It's easy enough to stop the user from editing certain items with subclassing, but I was hoping for a way to tell Windows that certain lines are to be drawn in a different color. Is there a way to do this without making an owner-draw edit control (yuk)? Is it even possible to have an owver draw edit-control? > >Ken Sykes >Disclaimer: The above opinions are solely my own. ---jb
kensy@microsoft.UUCP (Ken SYKES) (09/17/90)
[stuff deleted about how to color parts of an edit control] Oops, sorry about that. You're right, no such thing as owner-draw edit controls. I don't know of a way to do what you want without implementing your own control. It's a similar problem to having multiple fonts in an edit control. Sorry I can't be of more help. Ken Sykes Disclaimer: The above opinions are solely my own.