Re: [lazarus] IDE menu text colour wrong
Mark Morgan Lloyd wrote: Michael Van Canneyt wrote: It is not a big problem for me but in this case Lazarus (Win32 interface) will contain some redefinitions of this structures or will assign some magic constants into the cbSize parameters. I think the latter would be best. We can always insert the constants directly in the windows unit, so everyone benefits. Agreed. According to http://blogs.msdn.com/oldnewthing/archive/2003/12/12/56061.aspx cbSize is basically used as a magic number which has to be correct, rather than simply the size of the structure with some elements ignored by the OS. I'm sure I've come across cases where there was a list of sizes AKA magic numbers for use rather than a simple sizeof(), but I can't say which compiler or API family. Indeed, with some of the MS headers you wil find consts with the size of a struct for certain versions. Marc _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Michael Van Canneyt wrote: > > It is not a big problem for me but > > in this case Lazarus (Win32 interface) will contain some redefinitions of > > this structures or will assign some magic constants into the cbSize > > parameters. > > I think the latter would be best. > > We can always insert the constants directly in the windows unit, so everyone > benefits. Agreed. According to http://blogs.msdn.com/oldnewthing/archive/2003/12/12/56061.aspx cbSize is basically used as a magic number which has to be correct, rather than simply the size of the structure with some elements ignored by the OS. I'm sure I've come across cases where there was a list of sizes AKA magic numbers for use rather than a simple sizeof(), but I can't say which compiler or API family. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
On Mon, 24 Jul 2006, Martin Smat wrote: Michael Van Canneyt wrote: On Mon, 24 Jul 2006, Martin Smat wrote: Yes, and that is the point. Where you get the right size from? Normally you use sizeof(STRUCTURE) but this won't work for older Windows versions where you need to specify smaller size (without the new properties). Or do you know the sizes of all structures by hearth? No. But let me ask it differently. What would a Visual C programmer do ? He has only the current headers, so you are saying that simply his programs won't run on older windowses, and that's it ? He also will have to do some effort to make sure his apps will run on older windowses. Or he ships a newer comtrl.dll with his app... You are right. So the conclusion of this discussion is that FPC will support the newest structures and if the programmer needs to use it in some older versions he must do the appropriate changes himself? Yes. It is not a big problem for me but in this case Lazarus (Win32 interface) will contain some redefinitions of this structures or will assign some magic constants into the cbSize parameters. I think the latter would be best. We can always insert the constants directly in the windows unit, so everyone benefits. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Michael Van Canneyt wrote: On Mon, 24 Jul 2006, Martin Smat wrote: Yes, and that is the point. Where you get the right size from? Normally you use sizeof(STRUCTURE) but this won't work for older Windows versions where you need to specify smaller size (without the new properties). Or do you know the sizes of all structures by hearth? No. But let me ask it differently. What would a Visual C programmer do ? He has only the current headers, so you are saying that simply his programs won't run on older windowses, and that's it ? He also will have to do some effort to make sure his apps will run on older windowses. Or he ships a newer comtrl.dll with his app... You are right. So the conclusion of this discussion is that FPC will support the newest structures and if the programmer needs to use it in some older versions he must do the appropriate changes himself? It is not a big problem for me but in this case Lazarus (Win32 interface) will contain some redefinitions of this structures or will assign some magic constants into the cbSize parameters. Martin. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
On Mon, 24 Jul 2006, Martin Smat wrote: Michael Van Canneyt wrote: On Sun, 23 Jul 2006, Felipe Monteiro de Carvalho wrote: On 7/23/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: So, but it is not actually a bug ? It just means that the command is not executed on older windows version ? I think this is a bug. Because Free Pascal should allow the users to write a single software and expect it to run on all Windows versions. It does: All you need to do is specify the old size in the size field. Yes, and that is the point. Where you get the right size from? Normally you use sizeof(STRUCTURE) but this won't work for older Windows versions where you need to specify smaller size (without the new properties). Or do you know the sizes of all structures by hearth? No. But let me ask it differently. What would a Visual C programmer do ? He has only the current headers, so you are saying that simply his programs won't run on older windowses, and that's it ? He also will have to do some effort to make sure his apps will run on older windowses. Or he ships a newer comtrl.dll with his app... Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Michael Van Canneyt wrote: On Sun, 23 Jul 2006, Felipe Monteiro de Carvalho wrote: On 7/23/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: So, but it is not actually a bug ? It just means that the command is not executed on older windows version ? I think this is a bug. Because Free Pascal should allow the users to write a single software and expect it to run on all Windows versions. It does: All you need to do is specify the old size in the size field. Yes, and that is the point. Where you get the right size from? Normally you use sizeof(STRUCTURE) but this won't work for older Windows versions where you need to specify smaller size (without the new properties). Or do you know the sizes of all structures by hearth? Martin. That's probably why they put it there in the first place: to remain backwards compatible. The old version of the structures should always remain available, even if they are not present on new windows headers. This way we will be doing a better job then windows headers are doing. New strutures should have a different name from the old ones. And we would need to create overloaded versions of all calls that use these structures; I don't think that is a good proposition, it's a maintenance nightmare. I don't see why we should be holier than the pope. Microsoft should have done things the proper way and intruduce XyzEX versions of their records. Sometimes they do, sometimes they don't; They're simply not being very consequent... Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Michael Van Canneyt wrote: > >> I think this is a bug. Because Free Pascal should allow the users to >> write a single software and expect it to run on all Windows versions. > > It does: > > All you need to do is specify the old size in the size field. > That's probably why they put it there in the first place: > to remain backwards compatible. How do we know this size ? >> New strutures should have a different name from the old ones. > > And we would need to create overloaded versions of all calls that use > these structures; I don't think that is a good proposition, it's a > maintenance nightmare. An embedded record could work, but doesn't make the source using it nicer.. Micha _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
On Sun, 23 Jul 2006, Felipe Monteiro de Carvalho wrote: > On 7/23/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > So, but it is not actually a bug ? It just means that the command is not > > executed > > on older windows version ? > > I think this is a bug. Because Free Pascal should allow the users to > write a single software and expect it to run on all Windows versions. It does: All you need to do is specify the old size in the size field. That's probably why they put it there in the first place: to remain backwards compatible. > The old version of the structures should always remain available, even > if they are not present on new windows headers. This way we will be > doing a better job then windows headers are doing. > > New strutures should have a different name from the old ones. And we would need to create overloaded versions of all calls that use these structures; I don't think that is a good proposition, it's a maintenance nightmare. I don't see why we should be holier than the pope. Microsoft should have done things the proper way and intruduce XyzEX versions of their records. Sometimes they do, sometimes they don't; They're simply not being very consequent... Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
On 7/23/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: So, but it is not actually a bug ? It just means that the command is not executed on older windows version ? I think this is a bug. Because Free Pascal should allow the users to write a single software and expect it to run on all Windows versions. The old version of the structures should always remain available, even if they are not present on new windows headers. This way we will be doing a better job then windows headers are doing. New strutures should have a different name from the old ones. If we donĀ“t want to have several versions of each structure, then we should have at least 2: One for the first version of the structure (to ensure maximum compatibility) and one with the newest version (for people that want to use new features). thanks, -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Michael Van Canneyt wrote: > > > Hmmm, I thought windows could handle this if the size field is set > > > correctly? > > > > > > > > I thought it as well but the reality is different. Windows can handle only > > if > > you use old (smaller) structure in new Windows version but using newer > > (bigger) structure in older version leads to ignore the command where this > > structure is used. > > So, but it is not actually a bug ? It just means that the command is not > executed > on older windows version ? > > If this is correct: > > This is a programmer's or Windows API error, then. The programmer should know > that > he cannot use the newer command/arguments on an old windows; The headers are > correct, > though; They conform to the latest Windows. Could this possibly depend on the version of comctl32.dll or similar? One thing I'd throw in is that speaking as somebody who's running no MS OSes later than NT and who doesn't write for or support external users I wouldn't really miss the pretty pictures next to the menu text. What would be useful however is some sort of visual indication that clicking on a menu entry will put a tick/check mark next to it- is this doable? -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
On Sun, 23 Jul 2006, Martin Smat wrote: > Florian Klaempfl wrote: > > Micha Nelissen wrote: > > > > > Martin Smat wrote: > > > > > > > The structure MENUITEMINFO contains in the development version of > > > > FPC > > > > new parameter "hbmpItem" making this structure larger then > > > > expected by > > > > Windows. > > > > Any ideas how to solve it? > > > > > > > Beat the FPC guys for breaking backward compatibility. Make a copy of > > > the structure, MENUITEMINFOEX or MENUITEMINFO2 or so, that has the > > > new > > > layout (and will be win2000+). > > > > > > > Hmmm, I thought windows could handle this if the size field is set > > correctly? > > > > > I thought it as well but the reality is different. Windows can handle only if > you use old (smaller) structure in new Windows version but using newer > (bigger) structure in older version leads to ignore the command where this > structure is used. So, but it is not actually a bug ? It just means that the command is not executed on older windows version ? If this is correct: This is a programmer's or Windows API error, then. The programmer should know that he cannot use the newer command/arguments on an old windows; The headers are correct, though; They conform to the latest Windows. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Florian Klaempfl wrote: Micha Nelissen wrote: Martin Smat wrote: The structure MENUITEMINFO contains in the development version of FPC new parameter "hbmpItem" making this structure larger then expected by Windows. Any ideas how to solve it? Beat the FPC guys for breaking backward compatibility. Make a copy of the structure, MENUITEMINFOEX or MENUITEMINFO2 or so, that has the new layout (and will be win2000+). Hmmm, I thought windows could handle this if the size field is set correctly? I thought it as well but the reality is different. Windows can handle only if you use old (smaller) structure in new Windows version but using newer (bigger) structure in older version leads to ignore the command where this structure is used. Martin. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Micha Nelissen wrote: > Martin Smat wrote: >> The structure MENUITEMINFO contains in the development version of FPC >> new parameter "hbmpItem" making this structure larger then expected by >> Windows. >> Any ideas how to solve it? > > Beat the FPC guys for breaking backward compatibility. Make a copy of > the structure, MENUITEMINFOEX or MENUITEMINFO2 or so, that has the new > layout (and will be win2000+). Hmmm, I thought windows could handle this if the size field is set correctly? _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Martin Smat wrote: > The structure MENUITEMINFO contains in the development version of FPC > new parameter "hbmpItem" making this structure larger then expected by > Windows. > Any ideas how to solve it? Beat the FPC guys for breaking backward compatibility. Make a copy of the structure, MENUITEMINFOEX or MENUITEMINFO2 or so, that has the new layout (and will be win2000+). Micha _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Mark Morgan Lloyd wrote: > > Martin Smat wrote: > > > I think I found the source of your problem. It is caused by using > > development version of FPC 2.1.1 for compiling the daily snapshots. In > > this version some internal Windows API structures were extended with > > some new properties defined since Win2000 and it seems this new > > structures are not backward compatible with Win95, Win98, WinNT4. The > > stable version 2.0.2 still contain old structures that should be > > compatible with those versions of Windows. But I would need some proof > > for my presumption. Can I send you the lazarus.exe file compiled with > > FPC 2.0.2 by the mail? It is 2.6MB zipped file. I don't have any machine > > with this Windows version to test it myself. Or second possibility is > > that you compile the Lazarus with FPC 2.0.2 yourself. > > By all means send the .exe over, otherwise it will take me days to get up to > speed compiling things. Does it go with .16 or .17? I reckon that if FPC is > implicated the sooner we can characterise the problem the better for > everybody. Using the .exe you sent in conjunction with the other .17 files worked. Title bar OK, main menu OK, right-button menu OK, menu editor OK. Trivial problem is that the environment setup refers to FPC 2.1.1 paths. I'll spend some time working with this and hopefully get to the point where I can compile from source. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Martin Smat wrote: > I think I found the source of your problem. It is caused by using > development version of FPC 2.1.1 for compiling the daily snapshots. In > this version some internal Windows API structures were extended with > some new properties defined since Win2000 and it seems this new > structures are not backward compatible with Win95, Win98, WinNT4. The > stable version 2.0.2 still contain old structures that should be > compatible with those versions of Windows. But I would need some proof > for my presumption. Can I send you the lazarus.exe file compiled with > FPC 2.0.2 by the mail? It is 2.6MB zipped file. I don't have any machine > with this Windows version to test it myself. Or second possibility is > that you compile the Lazarus with FPC 2.0.2 yourself. By all means send the .exe over, otherwise it will take me days to get up to speed compiling things. Does it go with .16 or .17? I reckon that if FPC is implicated the sooner we can characterise the problem the better for everybody. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Mark Morgan Lloyd wrote: Martin Smat wrote: If I understand it well, you can now see all menus, submenus and the menu items but after selecting the item it does not process any action? Then there must be also some message processing problem. I will take a look on it if I find something. 'Fraid so. Context (right-click) editor menu is OK. Didn't get to test things like the TMainMenu property editor for obvious reasons. This problem seems to be caused by extended MENUITEMINFO structure in the development version of FPC 2.1.1. This structure is not backward compatible with older Windows versions (95, NT4). To be more precise: assigning the structure size into the "cbSize" parameter is the place that makes the structure unusable by older Windows. MenuInfo.cbSize := sizeof(MENUITEMINFO); The structure MENUITEMINFO contains in the development version of FPC new parameter "hbmpItem" making this structure larger then expected by Windows. Any ideas how to solve it? Martin. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Martin Smat wrote: > If I understand it well, you can now see all menus, submenus and the > menu items but after selecting the item it does not process any action? > Then there must be also some message processing problem. I will take a > look on it if I find something. 'Fraid so. Context (right-click) editor menu is OK. Didn't get to test things like the TMainMenu property editor for obvious reasons. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Mark Morgan Lloyd wrote: The snapshot downloads and runs fine. Unfortunately none of the menu items do anything. To clarify: in .16 the text in the title bar was erratic and I couldn't see any menu text, but "Restart" and "Quit" were in the expected places and worked. In .17-20060720 the title bar is reliable and I can see the menu text but no main menu entries work (drop-down are OK). In both cases I'm running under NT4 SP6a, I've not had a chance to check either version under Linux. I know I should be investigating and fixing this myself, but it is going to take me some while to get up to speed and I have a lot of other demands on my time. If I understand it well, you can now see all menus, submenus and the menu items but after selecting the item it does not process any action? Then there must be also some message processing problem. I will take a look on it if I find something. Martin. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Martin Smat wrote: > > You don't need the sources from SVN repository. Lazarus has daily snapshots. > You can download it from > ftp://ftp.hu.freepascal.org/pub/lazarus/Lazarus-0.9.17-20060720-win32.exe > > I never used this snapshots but I hope they are working just fine. The snapshot downloads and runs fine. Unfortunately none of the menu items do anything. To clarify: in .16 the text in the title bar was erratic and I couldn't see any menu text, but "Restart" and "Quit" were in the expected places and worked. In .17-20060720 the title bar is reliable and I can see the menu text but no main menu entries work (drop-down are OK). In both cases I'm running under NT4 SP6a, I've not had a chance to check either version under Linux. I know I should be investigating and fixing this myself, but it is going to take me some while to get up to speed and I have a lot of other demands on my time. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Martin Smat wrote: > > You don't need the sources from SVN repository. Lazarus has daily snapshots. > You can download it from > ftp://ftp.hu.freepascal.org/pub/lazarus/Lazarus-0.9.17-20060720-win32.exe > > I never used this snapshots but I hope they are working just fine. Thanks, I'll try that out over the next few hours. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Mark Morgan Lloyd wrote: Martin Smat wrote: Could you install the latest version 0.9.17 and check with it? Some changes were done between 0.9.16 and current 0.9.17 in the menu drawing code. Can somebody point me at a binary? Alternatively what do I need to build it- FPC 2.0.2a plus the Lazarus source RPM? I'm afraid I'm somewhat inexperienced when it comes to things like CVS. You don't need the sources from SVN repository. Lazarus has daily snapshots. You can download it from ftp://ftp.hu.freepascal.org/pub/lazarus/Lazarus-0.9.17-20060720-win32.exe I never used this snapshots but I hope they are working just fine. Martin. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Martin Smat wrote: > > Could you install the latest version 0.9.17 and check with it? > Some changes were done between 0.9.16 and current 0.9.17 in the menu > drawing code. Can somebody point me at a binary? Alternatively what do I need to build it- FPC 2.0.2a plus the Lazarus source RPM? I'm afraid I'm somewhat inexperienced when it comes to things like CVS. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] IDE menu text colour wrong
Mark Morgan Lloyd wrote: I've just installed 0.9.16 onto NT4 SP6a, and there appears to be a minor problem: the text in the main title bar (i.e. above the component tabs etc.) is erratic and there is no text at all on the main menu or any drop-down menus. I've tried changing the menu background colour to no effect (i.e. if there's any text there it tracks the background colour), this was OK when I last looked which I think was 0.9.14, I've not yet tried it on Linux. Apart from that it looks good and I really do wish I could put more time into this and possibly make some concrete contributions. Could you install the latest version 0.9.17 and check with it? Some changes were done between 0.9.16 and current 0.9.17 in the menu drawing code. Martin. _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] IDE menu text colour wrong
I've just installed 0.9.16 onto NT4 SP6a, and there appears to be a minor problem: the text in the main title bar (i.e. above the component tabs etc.) is erratic and there is no text at all on the main menu or any drop-down menus. I've tried changing the menu background colour to no effect (i.e. if there's any text there it tracks the background colour), this was OK when I last looked which I think was 0.9.14, I've not yet tried it on Linux. Apart from that it looks good and I really do wish I could put more time into this and possibly make some concrete contributions. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] _ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives