Thread: regular C++ code in a windows application

  1. #16
    Registered User
    Join Date
    Sep 2010
    Posts
    69
    Quote Originally Posted by Elysia View Post
    Computer software is done via assembly, but you don't see me putting together programs in assembly.
    That is a shame.
    I do at every opportunity.
    I find it very enlightening to know exactly what the computer is doing at any given point.

    To me the computer is a thing of beauty, a thing to ponder. Not a mere appliance, like a toaster.
    The only thing bad I can say about the API is that there is so much to master and not enough time.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Well, all I can say is... good luck. I wouldn't want want to use your software in the near future.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Elysia and CommonTater: calm down and cool off. CommonTater, this is an unofficial warning: in my judgment, your posts #10 and #14 pretty much go against forum guideline #8. Stop your personal attacks.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #19
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by laserlight View Post
    Elysia and CommonTater: calm down and cool off. CommonTater, this is an unofficial warning: in my judgment, your posts #10 and #14 pretty much go against forum guideline #8. Stop your personal attacks.
    Noted. I just get real tired of everytime someone asks a windows API question I end up arguing with Elysia or someone else about it. Yes I got personal... won't do it again... but I get the distinct impression that for her it is a very personal issue.

  5. #20
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    Well, all I can say is... good luck. I wouldn't want want to use your software in the near future.
    I'd bet real money you use GIU programs written at the windows API level every day and don't even know it.
    (Notepad, Calculator and RegEdit being three prime examples.)

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CommonTater View Post
    Noted. I just get real tired of everytime someone asks a windows API question I end up arguing with Elysia or someone else about it. Yes I got personal... won't do it again... but I get the distinct impression that for her it is a very personal issue.
    It's not difficult to see why this happens. It's because Windows API is a complex beast, as I and others have pointed out.
    As a software engineer, you want to get as far away from low-level as you can get, because it's simply a good advice. That's why people are moving to the framework that shall not be named.
    But you are insisting that people use Windows API. That is why you get these discussions.

    And while I don't like WinAPI, that is not the reason why I steer people away it. It's simply because it's not a good tool. The end.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #22
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    As a software engineer, you want to get as far away from low-level as you can get, because it's simply a good advice. That's why people are moving to the framework that shall not be named.
    As a "software engineer" one would hope you would make an effort to understand as much as you can about the systems you work with. Shying away from something deemed "difficult" or "low level" seems the very opposite of the mission.

    How far do you think I would have gotten as an electronics engineer if I shyed away from resistors and capacitors?

    But you are insisting that people use Windows API. That is why you get these discussions.
    I do no such thing. If they want to use QT, wxWidgets, etc. that's fine with me and I won't say a word about it; never have, never will. Go ahead, look around... you won't find anyplace where I've told anyone not to use those things.

    And while I don't like WinAPI, that is not the reason why I steer people away it. It's simply because it's not a good tool. The end.
    Ok fine you don't like it... but why does that mean you have to dive into every conversation about it and make a real mess of things?

    In this case the OP was expressing frustration, doubts about his own programming desires... Does it not occur to you that a fight like the one you started --and yes you DID start this-- is the one thing that's going to scare him completely off...

  8. #23
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by CommonTater View Post
    As a "software engineer" one would hope you would make an effort to understand as much as you can about the systems you work with. Shying away from something deemed "difficult" or "low level" seems the very opposite of the mission.

    How far do you think I would have gotten as an electronics engineer if I shyed away from resistors and capacitors?
    Once again, it seems you are misunderstanding. You don't shy away from resistors and capacitors, but you do shy away from building everything by using an appropriate material and doping it, no? Same thing.

    I do no such thing. If they want to use QT, wxWidgets, etc. that's fine with me and I won't say a word about it; never have, never will. Go ahead, look around... you won't find anyplace where I've told anyone not to use those things.
    Insisting and forcing are not the same thing.
    I am insisting people do not use WinAPI. You are insisting they use it.
    Neither of us are forcing people to use--or not--the WinAPI.

    Ok fine you don't like it... but why does that mean you have to dive into every conversation about it and make a real mess of things?

    In this case the OP was expressing frustration, doubts about his own programming desires... Does it not occur to you that a fight like the one you started --and yes you DID start this-- is the one thing that's going to scare him completely off...
    Perhaps my initial reply was a bit too zealous, but nevertheless, it was good advice. Not giving good advice because someone doesn't like it should not deter it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #24
    Registered User
    Join Date
    Mar 2011
    Posts
    53
    Quote Originally Posted by Elysia View Post
    Everything in our world is made of molecules, but you don't see me putting together things of molecules.
    Computer software is done via assembly, but you don't see me putting together programs in assembly.
    How many times more will you say that? I saw you write the same sentence at least 5 times. You really should come up with sth new...

    Windows, the OS you are probably using and also the most popular one, is written using all these... So win32 isn't only the most preferred programming, it's also the most functional one. It gives you the ability of totally ruling your system and flexibility, as in assembly, but it also blends it with C, which is a high level programming language, as you know.

  10. #25
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Quote Originally Posted by new_in_c++ View Post
    So win32 isn't only the most preferred programming, it's also the most functional one.
    I would argue that the .NET framework is actually the preferred Windows programming platform of today. I still use Win32 for several of my programming projects, but I've finally "bit the bullet", and have started learning .NET and C# on the side.
    bit∙hub [bit-huhb] n. A source and destination for information.

  11. #26
    Registered User
    Join Date
    Apr 2011
    Posts
    6
    Blithering Zeus, what's happened here?

    That said, so long as they know their alternatives, they are free to choose whatever they want.
    I didn't know there were any feasible alternatives. Somebody mentioned Qt earlier - I'll google it and check it out. What other tools might there be? To be specific I am writing a very simple game. Or rather, I am interested in game programming and I would like to know what tools to use, or at least try out. the API was frustrating, and I am completely open to any suggestions. Also, I am using C++ rather than C because I understand that OOP makes game programming a lot easier.

  12. #27
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by new_in_c++ View Post
    Windows, the OS you are probably using and also the most popular one, is written using all these...
    All programs--believe it or not!--are not written in pure Win32.

    ...So win32 isn't only the most preferred programming, ...
    That is nonsense, and you know it. If it was, then GUI frameworks would not exist.

    ...it's also the most functional one. It gives you the ability of totally ruling your system and flexibility, as in assembly, but it also blends it with C, which is a high level programming language, as you know.
    And what if you don't need that control? A desire to learn is one thing. A desire to know is one thing. But writing a program is an entirely other thing.
    But you know, even Win32 API is limited. If you want full control over the system, you have to write a driver. But even so, you're probably limited to what you can do, so an OS is the best option. Yes, write a program that contains an OS and you have absolutely full control over everything. And guess what? It blends in with C and assembly!

    Furthermore, and I will repeat this, we are dealing with C++ here, and not C. And in C++, WinAPI is quite primitive and does not integrate very well into the language.

    Quote Originally Posted by tinder View Post
    I didn't know there were any feasible alternatives.
    See? Now this is why I suggest frameworks like this when WinAPI is mentioned.

    What other tools might there be? To be specific I am writing a very simple game. Or rather, I am interested in game programming and I would like to know what tools to use, or at least try out. the API was frustrating, and I am completely open to any suggestions. Also, I am using C++ rather than C because I understand that OOP makes game programming a lot easier.
    There are other GUI frameworks out there, but I don't which ones of them would work with well with game programming. Usually, you would probably need some kind of native handle access to the created window in order to work with it from DX/OGL.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #28
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by tinder View Post
    Blithering Zeus, what's happened here?
    Happens every time someone mentions "Windows API" programming...
    Elysia has a real stick up her butt about it.


    I didn't know there were any feasible alternatives. Somebody mentioned Qt earlier - I'll google it and check it out. What other tools might there be? To be specific I am writing a very simple game. Or rather, I am interested in game programming and I would like to know what tools to use, or at least try out. the API was frustrating, and I am completely open to any suggestions. Also, I am using C++ rather than C because I understand that OOP makes game programming a lot easier.
    Sure there are lots of libraries you can use with C or C++ ... There's QT and wxWidgets already mentioned, there's also microsoft's own MFC.
    Google is your friend.

    However, I would caution you against shying away from something because you intially find it hard... That's not the way to learn and grow in any field, but especially in programming. You will find that even with your fancy widget libraries you will still occasionally have to use Windows API calls, so it's probably a good idea to continue the study, even if you seldom use it.

    (As an engineer and technician, I can assure you that nobody rises to the top of their profession without a healthy does of the "OK, how does this work?" kind of curiosity.)

    QT Framework
    wxWidgets Library Tutorial
    MFC at MSDN

  14. #29
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    That is nonsense, and you know it. If it was, then GUI frameworks would not exist.
    Of course they would... There's always someone busy at reinventing the wheel... And lets not forget that money is a huge motivator in these projects... They're selling a product.
    Last edited by CommonTater; 04-19-2011 at 11:54 AM.

  15. #30
    Registered User
    Join Date
    Apr 2011
    Posts
    6
    Elysia has a real stick up her butt about it.
    Nice phrase.

    Well, initially finding something hard is one thing, but being slapped across the face with a haddock formed of sheer befuddlement is another. I don't know, maybe I just enjoy slipping random metaphors into my sentences for the hell of it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help in transfoming C++ code into regular ansi C..
    By transgalactic2 in forum C Programming
    Replies: 18
    Last Post: 12-08-2008, 04:50 AM
  2. Windows application
    By andypandy in forum Windows Programming
    Replies: 6
    Last Post: 07-10-2007, 10:39 AM
  3. Windows application
    By andypandy in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2007, 02:09 PM
  4. Windows form application and Windows application
    By |Wiz| in forum Windows Programming
    Replies: 5
    Last Post: 10-01-2005, 04:14 PM
  5. Replies: 1
    Last Post: 09-18-2005, 09:06 PM