Author |
Topic: Changing fonts (Read 452 times) |
|
Matt
Developer
member is offline


Gender: 
Posts: 210
|
 |
Re: Changing fonts
« Reply #6 on: Oct 13th, 2014, 8:44pm » |
|
on Oct 13th, 2014, 08:05am, g4bau wrote:| This is undesirable in so many ways! |
|
Can you explain why?
A couple of years ago, I adjusted a WINLIB2 version that included DEF FN_newdialogf(title$,x%,y%,cx%,cy%,font%,size%,typeface$) and SYS "MultiByteToWideChar", 0, 0, typeface$, -1, dlg%+2*L%+40, 16 TO F%
This seemed to work fine, although I only ever used it once. (For some reason, I don't seem to have a copy of it now.) Is there a real potential for error with ajusting your code in this way?
Matt
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: Changing fonts
« Reply #7 on: Oct 13th, 2014, 9:37pm » |
|
on Oct 13th, 2014, 8:44pm, Matt wrote: I thought these points were very well known:
Copying a library into a program 'freezes' it, so that subsequent changes to the library do not automatically get incorporated when the program is next compiled. This practice has in the past resulted in users reporting an incompatibility with a new version of Windows, when in fact the library has already been updated to address the issue.
Creating a 'custom' library, based on one of the supplied libraries, has much the same consequences. If the library on which it was based is updated, to fix a bug or improve compatibility, the user must remember to incorporate the changes into his customised version. Even if he remembers to do so, it can be quite difficult to transfer the modifications reliably, especially if it's not obvious what they are for or how they work (the supplied libraries are notoriously badly structured and commented, for reasons of brevity and speed).
Changing the 'default' dialogue box font, which then 'propagates' to all the child controls, is contrary to the fundamental principle of Windows of presenting a uniform user interface whatever application is being used. Imagine what would happen if the font size were increased significantly and the user has also selected extra large fonts because of (say) an eyesight problem. The combination of the two could result in a dialogue box which doesn't fit on the screen or is otherwise impossible to use.
If you must modify the functionality of a library (and I would need to be convinced) remember that you need only copy an individual FN/PROC into your program - which will then automatically take precedence over the one with the same name in the library. That reduces the possibility of future problems if the library is updated. I cannot think of any circumstances when it makes sense to copy an entire library into a user's program as Svein advocates. Richard.
|
| « Last Edit: Oct 13th, 2014, 10:43pm by rtr2 » |
Logged
|
|
|
|
|