win32, C Programming

Hello there ,

Iv got a little problem with this program i have written using the win32 API with C. As simple as it may sound, but im still proud of, iv written a program which reads a external file (this isn't really relevant) and displays its contents on the window, what Im trying to do is make it so when you scroll within the window the/a heading would constantly be shown no matter how much up scroll down, (displayed just above the text) but im not sure which params I'm suppose to edit, could someone please lead me to the right direction.

Any help would be appreciated,

Thank you.

Sorry about the spelling and bad gramma, what I meant to say was
"when you scroll within the window the/a heading would constantly be shown no matter how much *you scroll down"
If I understand you correctly, you want something like

+--------------------------------------+-+
| Nursery Rhymes.txt |^|
| A peanut sat upon a railroad track, +-+
| His heart was all a-flutter. |-|
| Around the bend came number ten... | |
| Toot! Toot! | |
| Peanut butter. | |
| | |
+--------------------------------------+-+
| Nursery Rhymes.txt |^|
| Toot! Toot! +-+
| Peanut butter. | |
| | |
| |-|
| | |
| | |

?

Typically text components are not designed to do that. You can place another text component either above or inside the main text component that displays the desired title. If you place it inside, you can turn off the component borders and align it so it looks like it is part of the main text component. You'll just have to remember to be careful about the first line.

Hope this helps.
Last edited on
Thanks Duoas,

Your example is exactly as i wanted it, but im still abit fuzzy on how to actually achieve this, any hints on how to make the title a part of the main text but still be shown when u scroll down?

Thank you again.
Last edited on
Create a label component with the same text attributes as the edit control (font, size, colors, etc). Position it above the edit control so that it obscures the first line. Now just insert the title string as the first line in your text (in the edit control) and set it as the label's caption.

Hope this helps.
Hi,

As I'm new to Win32 programming, I want to know the differences between Win32 programming and .NET programming.

Thank you all.
In a nutshell:

- .NET is offers multilanguage development platform where MFC is C/C++ only.
- .NET is more secure
- .NET offers many usefull libraries from web programming to embedded programming.
- .NET comes w/a powerfull development environment. (Visual Studio)

For more info, see http://www.microsoft.com/net/.

Berk
Software Developer - Microsoft Corp.
I'd have to disagree on
- .NET is more secure

Code is only as secure as the individual developers ability to write secure code.
.NET needs its enormous Runtime
.NET code reversing is too easy
.NET is slow
Most of .NET developers are kids, who even don't know what is Win32 API or a message loop, and can only click, click, click... on a black box.
.NET is horrible
Last edited on
.NET needs its enormous Runtime

So? Many languages and libraries require large runtimes. GTK, Java, etc. Nothing wrong with that.

.NET code reversing is too easy

It's easy to reverse engineer any language, regardless of if it's compiled or interpreted. It's just slightly easier with .NET and Java, but still easy with C++.

.NET is slow

Actually, overall .NET is only about 10-15% slower than running a native application. But this really would come down to the individual developers ability to write good code.

Most of .NET developers are kids, who even don't know what is Win32 API or a message loop, and can only click, click, click... on a black box.

Actually, I've yet to meet a .NET developer who is a kid. I know many professional developers who are quite fond of .NET. So you have no idea what you are talking about. Are you even a prof developer or just a kid yourself?

.NET is horrible

Arrogant statement. Would you care to elaborate?

I've yet to see a helpful reply from you, nor have I seen any valid arguments against anything you have tried to argue. Your definitely a Microsoft fanboy, but I'd hate to break this to you, there are other operating systems and programming languages out there; And they are GOOD. Just because you know a little C++ and some Win32API doesn't make it the best, or only good one.



Last edited on
Topic archived. No new replies allowed.