Re: Saving and restoring windows



Ruediger Ihle wrote:
On Thu, 3 Jul 2008 17:34:02 UTC, Marty <net@xxxxxxxxxxxxxxxxxxx> wrote:

????

Why bother cluttering up the OS2.INI with that junk? Just put it right in the application INI.

Maybe he refers to the Win(Re-)StoreWindowPos APIs. The good thing about
these is, that they will not only save/restore the sizes and positions,
but also presentation parameters like fonts and colors etc. The bad thing
is, that for some strange reason it is not possible to specify a file name.
So data will end up in OS2.INI. However, instead of copying the stuff back
and forth, I would probably not use that API at all if I don't want the
stuff to reside in OS2.INI.

Never found or used that API myself. If you can't select an INI handle, then it seems kinda useless to me.

BTW, one should not forget to use meaningful defaults in case of no INI
entry exists or the values beeing bogus. Users normally don't really like
windows way outside the desktop area or at position (0,0) with a size of (0,0) ;-).

A point well worth mentioning!

--
[Reverse the parts of the e-mail address to reply.]
.



Relevant Pages

  • Re: Reg/INI Discussion from much earlier
    ... (File I/O and System Pooled Memory) so it is hard to see ... > I suspect that they are very inefficient, and prefer to use my own INI ... The API calls do have an advantage when it comes to writes, ... > I should really do a similar test with FileMon ...
    (microsoft.public.vb.general.discussion)
  • Re: INI files with VB 2003.NET
    ... your ini would still work. ... use the windows api to read/write their ini files. ... Let's be clear - I'm not saying that the ini format is not portable or easy to ... I have a common format and a common api. ...
    (microsoft.public.vb.general.discussion)
  • Re: Looking for some advice for my program
    ... completely forgotten that you use API calls to deal with them. ... I can only think that the API is for dealing with the 'order' of ... INI ... The API provides a way to say, "Give me entry X from section Y" or "Save Z ...
    (microsoft.public.vb.general.discussion)
  • Re: Some users cant write to ini file.
    ... application that reads the .ini through the API. ... Also, try changing the .ini by running the app., close the app., open ... the .ini in Notepad - you may well see the .ini as it was before the ...
    (borland.public.delphi.language.objectpascal)
  • Re: Saving and restoring windows
    ... Why bother cluttering up the OS2.INI with that junk? ... Maybe he refers to the WinStoreWindowPos APIs. ... one should not forget to use meaningful defaults in case of no INI ...
    (comp.os.os2.programmer.misc)