Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Where to start?

sailboatsailboat Member Posts: 2
Hi, I'm new to this forum but im not new to C++. I currently program for Windows Using C++. This is my problem, I've learned how to use the language and create ADT's like graphs and binary trees, but I don't know where to start with application of my knowledge. I want to be able to apply my programming knowledge to my current computer, I want to make window applications and I want to understand how to use functions that come from the operating system like something as simple being able to tell my computer to shutdown or drawing a window and being able to sort through my file system. I know it sounds silly, but does anyone have any ideas?

Comments

  • sailboatsailboat Member Posts: 2
    I thought about my request and I simplified it. I have a few questions, what are .dlls and how can I use them and analyze them. How would I ask windows to wait for specific keys to be pressed on the keyboard and notify my program when they have been? Finally, how would I tell my computer to load an mp3 and start playing it?
  • LundinLundin Member Posts: 3,711
    : I thought about my request and I simplified it. I have a few
    : questions, what are .dlls and how can I use them and analyze them.
    : How would I ask windows to wait for specific keys to be pressed on
    : the keyboard and notify my program when they have been? Finally,
    : how would I tell my computer to load an mp3 and start playing it?
    :

    Generally, it sounds like you want to learn Windows programming. There are two ways to go:

    - You could download a RAD-tool and learn it. RAD stands for rapid application development and RAD tools is a package containing compiler, linker etc but also easy ways to make graphical user interfaces in Windows.

    The two major RAD tools are Microsoft Visual Studio and Borland Builder. They are rather similar to use nowadays, if you know one of them you can easily learn the other. Both MS and Borland are giving away completely free, though slightly limited versions of their RAD tools, they can be found somewhere on their respective sites.

    RAD tools don't require too much effort to learn, and you can make most kind of programs with them. Also, you don't have to use the RAD functionality, you could naturally use them as just plain compilers if you want.


    - The other option is to learn Windows API programming. Windows comes with a huge API (Application Programming Interface) of functions for controlling literally everything on the computer. This is traditionally known as "Win32 programming" or "API programming". It gives you a lot of possibilities, but it is also rather advanced. Writing programs in pure Win API is very tedious and requires a lot of knowledge, which is why the RAD tools appeared.

    Checking keyboard input, turning off the computer etc etc is all done by the OS, and you can tell the OS to do these things through the Win API.

    DLLs are a kind of standard binary files in Windows. They contain code and resources, just as executable files do. The difference is that programs can open up and execute DLLs in runtime. One advantage with DLLs is that they follow a standard, so a program in C++ can use a DLL written in Visual Basic or Delphi. Another advantage is that programs can share resources with each other, so that the size of the executables become smaller.

    Understanding DLL programming is part of learning the Windows API. If you have a RAD tool you can however use it to easily create DLLs out of your code.

    The best way to learn the Win API in my opinion, is to read the book "Programming Windows" by Charles Petzold. This book is very well-known, and considered to be the "Windows bible".
Sign In or Register to comment.