Can I get a recommendation for a book or document that explains how to write programs that use the component libraries WITHOUT using a form designer? Every book that I look at starts out with dragging and dropping controls onto a form, and then augmenting code that is generated by a form designer. I'm more comfortable writing all the code myself. Thanks.
Can I get a recommendation for a book or document that explains how to write programs that use the component libraries WITHOUT using a form designer? Every book that I look at starts out with dragging and dropping controls onto a form, and then augmenting code that is generated by a form designer. I'm more comfortable writing all the code myself. Thanks.
You reserve some memory, you create a window pointer, you create a GDI connection, you do this and that - and after one hour you got a window with a Close-Button. Horrible!
fpGUI is exactly what you want.
https://github.com/graemeg/fpGUI/tree/maint
You may use his designer but the one of the feature of fpGUI is that all is in one file, no form file.
So, perfectly easy to do all by code.
I see no reason why it shouldn't be possible to construct a GUI by hand while letting the message loop remain opaque... although I suspect that that approach would not be acceptable to the OP. See Fred's comment for a good starting point.
Can I get a recommendation for a book or document that explains how to write programs that use the component libraries WITHOUT using a form designer? Every book that I look at starts out with dragging and dropping controls onto a form, and then augmenting code that is generated by a form designer. I'm more comfortable writing all the code myself. Thanks.It's hard to recommend a book these days for what you want.
For Pascal and pure API, the only book I can think of is Dave Jewel's "Polishing Windows", it's an excellent book but, it is really old. The examples cater to Windows 95 (or 3.1, I don't remember).
fpGUI is exactly what you want.
https://github.com/graemeg/fpGUI/tree/maint
You may use his designer but the one of the feature of fpGUI is that all is in one file, no form file.
So, perfectly easy to do all by code.
I was considering to use it in the past, but now when resuming my interest in FreePascal/Lazarus, it looks that fpGUI is not so much in active development - at least, long time without any new release?
But yes, there are less new commits (last one is from July), maybe because no more bugs?
<snip> so books of that era need to be approached with great caution.I agree. The only books I've seen that are up to date to use the Windows API all cater to C programmers (and possibly C++) not Pascal (probably because there is very limited interest in programming to the API in that segment.)
But yes, there are less new commits (last one is from July), maybe because no more bugs?
You mean it's bugrid? I'll get me coat :-)
MarkMLl
Many years ago I found a book "Introduction to MFC Programming with Visual C++" written by Richard M. Jones. He explains how to write what he calls "Handcrafted MFC Programs". I was hoping to find a similar book about writing Delphi programs by hand. It's beginning to look like no such book exists. That's okay. It wouldn't be the first time I tried to find something that doesn't exist!
Well HTML, JavaScript and CSS are all by hand, there are editors but you can not use them if you like :P
Can I get a recommendation for a book or document that explains how to write programs that use the component libraries WITHOUT using a form designer? Every book that I look at starts out with dragging and dropping controls onto a form, and then augmenting code that is generated by a form designer. I'm more comfortable writing all the code myself. Thanks.Just curiosity.
I didn't make the original question clear enough. I actually already know how to write old-fashioned Win32 programs in C. I wrote Algol at Burroughs around 1980, and Pascal on a Convergent Technologies machine in 1982, and converting 'C' code to Pascal isn't too hard. What I'm hoping to find is an explanation of how to use the component libraries, but without using a form designer. Many years ago I found a book "Introduction to MFC Programming with Visual C++" written by Richard M. Jones. He explains how to write what he calls "Handcrafted MFC Programs". I was hoping to find a similar book about writing Delphi programs by hand. It's beginning to look like no such book exists. That's okay. It wouldn't be the first time I tried to find something that doesn't exist!Like marcov said, I also don't think there is such a book, but the internet is full of Delphi examples that would work on Lazarus:
What I'm hoping to find is an explanation of how to use the component libraries, but without using a form designer.
I don't think Petzold used a form designer (Or "AppWizard") to produce any of examples in any of these books except possibly the last one, which I didn't finish.
In my case, I am constructing a chessboard using an 8x8 array of Rich Text boxes, all sharing the same event handler. I have already written this program in C#, but now I need it in Pascal, to merge with the old Turbo Games chess program. I think it would take me longer to learn how create a two-dimensional array of text boxes in the form designer than it will take to write the code directly. Why am I using Rich Text boxes to make the squares on the board? Because is reduces the amount of keyboard handling code that I have to write.
What I'm hoping to find is an explanation of how to use the component libraries, but without using a form designer.
Everything that can be done via the Lazarus form designer can be done in code as well.