Hi,
I am a UNIX programmer by profession. I want to teach myself Windows programming (I have Windows XP Pro SP2 on my computer). I am proficient in C and Java and somewhat less in C++. I have two questions:
1) I notice there are many different GUI's used by programs that run on Windows. For example, Firefox has what I call a "classic" type window appearance, Microsoft Office 2007 has a completely different look to it, and some programs have an utterly unique
look to them. What are the different visual component libraries used to create these different looks?
2) What language should I use to write my programs? C# looks easy.
Thank you very much...
-
-
I’d say start by downloading and trying Visual Studio 2008 C# Express Addition.
Search the msdn help text for System.Windows.Forms Namespace.
Download Samples, hit the Webcasts, read and participate in the posts here at c9.
Have fun -
Hey,
I'f you're a *nix guy I'd go for this:
1. Check out the Win32 API, It's the actual base for anything else
2. Learn a bit about the wrappers (MFC, WTL), They're the abstraction stuff.
3. Learn the "big overhead stuff" C#, VB, whatever... -
GuitarMother wrote:Hey,
I'f you're a *nix guy I'd go for this:
1. Check out the Win32 API, It's the actual base for anything else
2. Learn a bit about the wrappers (MFC, WTL), They're the abstraction stuff.
3. Learn the "big overhead stuff" C#, VB, whatever...
Thanks for the responses so far. Am I correct in saying that MFC stands for 'Microsoft Foundation Classes'? And what does WTL stand for? I told you that I was a Windows Programmer Newbie... -
retierney wrote:
Hi,
I am a UNIX programmer by profession. I want to teach myself Windows programming (I have Windows XP Pro SP2 on my computer). I am proficient in C and Java and somewhat less in C++. I have two questions:
1) I notice there are many different GUI's used by programs that run on Windows. For example, Firefox has what I call a "classic" type window appearance, Microsoft Office 2007 has a completely different look to it, and some programs have an utterly unique look to them. What are the different visual component libraries used to create these different looks?
2) What language should I use to write my programs? C# looks easy.
Thank you very much...
There's only one "visual component library" at the OS level. To learn that, pick up Programming Windows. This is a C API.
If you're programming in C++, there's two "wrapper libraries" from Microsoft (and any number from other folks): MFC (Microsoft Foundation Classes) and WTL (Windows Template Library). To learn MFC, pick up Programming Windows with MFC. For WTL I can't recommend any good books. Don't even know if there are any on the subject. However, you can find info on the web.
If you're going to code in C# or any other .NET language, you have two choices: WinForms and WPF. I've never read any books on WinForms, since I knew Win32 and MFC so well. There just wasn't enough different for WinForms to require a book for me. So, can't recommend anything there. For WPF, the best book IMHO is Programming WPF. -
retierney wrote:
Thanks for the responses so far. Am I correct in saying that MFC stands for 'Microsoft Foundation Classes'? And what does WTL stand for? I told you that I was a Windows Programmer Newbie...
WTL is Windows Template Library.
There's a few concepts you'll want to come to understand.
one of the main thing is Unmanaged and Managed. Some of this relates to what level of Windows Programming you are wanting to do.
Unmanaged concepts:
COM - Component Object Model
MFC or other class libraries (ATL, WTL, etc)
Managed concepts:
GAC (Global assembly cache)
BCL (Base Class Library)
Many other concepts about the .Net Framework
If you're looking at just making programs in Windows, going with managed languages like VB.Net (VB 7, 8, or 9), C++.Net, and C# would be a good way to get into programming on windows.
Since you're coming from C and Java, C# will seem natural to you. You'll see the similarities to C and Java in it pretty quickly.
If you're looking at doing Windows programming (system utilities, drivers, etc) then you'll want to look into sticking with unmanaged code, particularly C/C++ and MFC for when you need it.
-
If you don't need very fast (i.e. realtime highspeed) apps and you're not writing code next to the OS (such as drivers) then C# does everything you need - for normal Windows forms programs (like most apps) it works as well as any other language and is somewhat more productive, particularly with some C and Java under your belt.
-
While you’re at it, go ahead and download your preferred version of Java for windows from Sun, also Eclipse and/or Netbeans for windows. I’m not sure, but you might find a GNU for windows too. You can get MySQL and PHP etc. for windows. That way you’ll have some tools that you’re already familiar with. Assuming you haven’t already done so.
-
Superior! Thank you one and all. The information you gave me is exactly what I was looking for. I've already done some Java and MySQL programming on Windows XP. Thank you especially for the book links.
Now for some fun. Here is a "Hello World!" Java program that does not require a main method. This program compiles and runs with no errors. I got it from the two volume set of books by Holtzman (sp?).
public class Hello
{
static
{
System.out.println("Hello World!");
System.exit(0);
}
}
As you know when a class is first referenced one of the first things done is to execute static blocks like the one I've shown. So the JVM loads the class, executes the println and then exits. You don't get a runtime error complaining about no main method because of the exit. Cool huh?
What does the following print?
char *cat = "Cat";
printf("%c", 2[cat]);
It prints 't' of course. The reason is that C arrays have the property of being commutative. Remember a + b = b + a.
So: (base + offset) == (offset + base) or cat[2] == 2[cat]
Cool, huh? -
retierney wrote:Superior! Thank you one and all. The information you gave me is exactly what I was looking for. I've already done some Java and MySQL programming on Windows XP. Thank you especially for the book links.
Now for some fun. Here is a "Hello World!" Java program that does not require a main method. This program compiles and runs with no errors. I got it from the two volume set of books by Holtzman (sp?).
public class Hello
{
static
{
System.out.println("Hello World!");
System.exit(0);
}
}
As you know when a class is first referenced one of the first things done is to execute static blocks like the one I've shown. So the JVM loads the class, executes the println and then exits. You don't get a runtime error complaining about no main method because of the exit. Cool huh?
If you have two of them, which one is executed first. Not so cool anymore...
Btw. I would also recommend going with C# (or any other .NET language - even IronPhyton or F# for that matter). It's a lot of fun to code for the .NET runtime and the system is very clean and well designed. -
retierney wrote:
char *cat = "Cat";
printf("%c", 2[cat]);
It prints 't' of course. The reason is that C arrays have the property of being commutative. Remember a + b = b + a.
So: (base + offset) == (offset + base) or cat[2] == 2[cat]
Cool, huh?
It's a consequence of the fact that a[b] is internally translated to *(a + b).
This unsuspected commutativity is often mentioned in C texts as if it were something to be proud of, but it finds no useful application outside of the Obfuscated C Contest
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.