Like Tree2Likes

Advantages of microsoft visual studios

This is a discussion on Advantages of microsoft visual studios within the Tech Board forums, part of the Community Boards category; Originally Posted by CommonTater Have you ever added a custom Icon to a program? I have, and you can typically ...

  1. #31
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    Quote Originally Posted by CommonTater View Post
    Have you ever added a custom Icon to a program?
    I have, and you can typically just load one from disk instead of your resource file, if you need one. Whether or not that's acceptable is up to the programmer in question.

    And this constant blather of yours about third party libraries is wearing a little thin... really... you're starting to sound like a script-kiddie... You claim to be a Windows programmer yet you assiduously avoid any contact with the operating system itself... It just doesn't make any sense to me.
    Because the OS API is seriously complex and poorly designed. I am honestly thinking that Linux's APIs are way better than Windows APIs, even though I have yet to study all of the Window's APIs from the OS's point of view.
    Although why there is no simple create_process in Linux is still beyond me...
    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.

  2. #32
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    I have, and you can typically just load one from disk instead of your resource file, if you need one. Whether or not that's acceptable is up to the programmer in question.
    And when the program and it's icon get separated? That's why you put this stuff into resources... so they are part and parcel of the same thing.
    You've never actually worked with Windows resources... have you?

    Because the OS API is seriously complex and poorly designed.
    In your opinion ... and that's all it is... an opinion.

  3. #33
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    Quote Originally Posted by CommonTater View Post
    And when the program and it's icon get separated? That's why you put this stuff into resources... so they are part and parcel of the same thing.
    You've never actually worked with Windows resources... have you?
    Yes, I have. I've used strings and icons. That's pretty much it, though.
    Although t'was a long time ago.

    In your opinion ... and that's all it is... an opinion.
    Yes, it's an opinion. It's the opinion why I stay away from Win API.
    That is what the discussion was about--why I stayed away from Win API.
    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.

  4. #34
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    Yes, I have. I've used strings and icons. That's pretty much it, though.
    Although t'was a long time ago.
    WOW... that's it, just WOW...


    Yes, it's an opinion. It's the opinion why I stay away from Win API.
    That is what the discussion was about--why I stayed away from Win API.
    Actually, the discussion was about various releases of MSVS and whether there were better choices.
    It only became about your apiphobia when you jumped in and started ranting.

  5. #35
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    No such thing as a rant. Just said you typically don't need them, which just adds up to: it's probably not worth it to buy VS for the sake of resources.
    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.

  6. #36
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    No such thing as a rant. Just said you typically don't need them, which just adds up to: it's probably not worth it to buy VS for the sake of resources.
    Typically don't need resources... ok, so how do you make a dialog box? How do you set up the keyboard? How do you design a menu?

    Really, Elysia... whether it's hidden from you by your silly libraries or not... believe me it's there.

    Grab a copy of Resource Hacker... it's free... and use it to view the resource section of your own code... I'm thinking you're in for something of a surprise.

  7. #37
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    That is not the point. Yes, libraries may use resources. Yes, they are using the Windows API. But that is irrelevant.
    What is relevant is that you don't have to do it. That is all that matters. Think nothing else.
    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.

  8. #38
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by Elysia View Post
    That is not the point. Yes, libraries may use resources. Yes, they are using the Windows API. But that is irrelevant.
    What is relevant is that you don't have to do it. That is all that matters. Think nothing else.
    No Elysia... what matters is that I WANT to do it and I don't appreciate being told not to.

    I LIKE getting down and dirty with the machine. I used to do chip level service on motherboards, component level service in audio, television and radio systems. I made a career of climbing right inside the technology and knowing how it works.

  9. #39
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    *shrug*
    You may do what you want. That wasn't relevant to my reply.
    The point was that while underlying technology may use resources and Win API, you don't have to, because it does it for you.
    So if you're willing to use those tools that abstract these things for you, you don't need to get all dirty with it.
    Unless you like doing if, of course.
    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.

  10. #40
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,415
    O_o

    *writes JSON parser*

    *crafts dialog from JSON object*

    *opens binary in "Portable Executable" exploder while dialog is shown*

    Nope. There is no dialog in the resource section of the executable.

    With the exception of shell related "PE" tags, like the version information visible in the version tab of the file properties window, the custom icon displayed by most file browsers, and some versions of the digital signature engine, you do not need to use or even know about "Windows" resource files to use dialogs, string tables, accelerators, menu, icon, paintbrushes, cursors, and a lot else besides. The "Windows" API isn't doing some magic executable mutation behind the scenes; the API, executable loader, and shell handler all just look at the resource table that is part of the "PE" format and translates that information into a sequence of system calls at runtime.

    Soma

  11. #41
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by phantomotap View Post
    the API, executable loader, and shell handler all just look at the resource table that is part of the "PE" format and translates that information into a sequence of system calls at runtime.
    Soma
    Totally clueless... here's a simple .rc resource script... typical of those used by C and C++ when building executables...
    Code:
    #include <windows.h>
    #include <commctrl.h>
    #include <richedit.h>
    
    LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
    
    APPICON ICON "RMRemote.ico"
    
    SMALLBTN1 BITMAP "SmallButtons1.bmp"
    
    SMALLBTN2 BITMAP "SmallButtons2.bmp"
    
    BIGBTN1 BITMAP "BigButtons1.bmp"
    
    BIGBTN2 BITMAP "BigButtons2.bmp"
    
    1 MANIFEST "Manifest.xml"
    
    ABOUT DIALOGEX DISCARDABLE 6, 18, 196, 102
    STYLE DS_SHELLFONT|WS_POPUP|DS_MODALFRAME|DS_3DLOOK|WS_CAPTION|WS_VISIBLE
    EXSTYLE WS_EX_NOPARENTNOTIFY
    CAPTION "About RMRemote"
    FONT 8, "MS Shell Dlg", 0, 0, 1
    {
      CONTROL "OK", IDOK, "Button", WS_TABSTOP, 139, 81, 45, 15
      CONTROL 8001, 4001, "Static", SS_BITMAP|SS_REALSIZECONTROL|WS_BORDER, 79, 4, 106, 27
      CONTROL "RMRemote ver 0.7.1\r\nCopright 2008 - 2011\r\nBy LD Blake\r\nAll rights reserved\r\n", 4002, "Static", WS_GROUP, 5, 3, 73, 33
      CONTROL "RMRemote is part of the Remote Media system.  Remote Media allows you to remotely launch your favorite multimedia player and then have remote control over playback of files.\r\n ", 4003, "Static", WS_GROUP, 5, 40, 180, 37
    }
    
    8001 BITMAP "logo.bmp"
    
    HOTKEYS ACCELERATORS
    {
      80, 1000, VIRTKEY
      VK_SPACE, 1001, VIRTKEY
      83, 1002, VIRTKEY
      VK_PRIOR, 1003, VIRTKEY
      VK_NEXT, 1004, VIRTKEY
      VK_LEFT, 1005, VIRTKEY
      VK_RIGHT, 1006, VIRTKEY
      VK_UP, 1007, VIRTKEY
      VK_DOWN, 1008, VIRTKEY
      49, 1009, VIRTKEY
      50, 1010, VIRTKEY
      51, 1011, VIRTKEY
      52, 1012, VIRTKEY
      VK_RETURN, 1013, VIRTKEY
      84, 1014, VIRTKEY
      88, 1015, VIRTKEY
    }
    
    VS_VERSION_INFO VERSIONINFO
    FILEVERSION 0,7,1,0
    PRODUCTVERSION 1,0,0,0
    FILEFLAGSMASK 0x3F
    FILEFLAGS 0x0
    FILEOS VOS__WINDOWS32
    FILETYPE VFT_APP
    FILESUBTYPE VFT2_UNKNOWN
    {
      BLOCK "StringFileInfo"
      {
        BLOCK "040904B0"
        {
          VALUE "Comments", "Client for Remote Media Server\0"
          VALUE "CompanyName", "LD Blake\0"
          VALUE "FileDescription", "Remote Media Remote Control\0"
          VALUE "FileVersion", "0.7.1.0\0"
          VALUE "InternalName", "RMRemote\0"
          VALUE "LegalCopyright", "2008 - 2011, LD Blake\0"
          VALUE "OriginalFilename", "RMRemote\0"
          VALUE "ProductName", "Remote Media\0"
          VALUE "ProductVersion", "1.0.0.0\0"
        }
      }
      BLOCK "VarFileInfo"
      {
        VALUE "Translation", 0x409, 0x4B0
      }
    }
    
    STRINGTABLE
    {
      10001, "RMRemote uses command line input.\n Please use RMClient instead."
      10010, "Bad Server Name"
      10011, "Host Offline"
      10012, "Can\'t Wake Host"
      10013, "RMServer Offline"
      10014, "Contacting Server"
      10015, "Menu Update"
    }
    
    STRINGTABLE
    {
      10016, "Server Error"
      10017, "Queued"
      10018, "No Network"
      10019, "No Remote"
      10020, "Finished"
      10021, "Server Timeout"
    }
    
    STRINGTABLE
    {
      20000, "Program class registration failed"
      20001, "Unable to create main program window"
      20002, "Could not find a working network connection"
      20003, "Unable to secure exclusive use of a network port."
      20004, "Unable to load settings."
    }
    
    STRINGTABLE
    {
      20020, "Remote Media requires Windows XP with service pack 2, or newer."
    }

    Do you see ANYTHING in there that translates to a system call?
    No.
    These are data ojects stored at the end of Windows PE files that are in fact called into use from OUR CODE... Get it... data stored as part of the program...

  12. #42
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    Although why there is no simple create_process in Linux is still beyond me...
    Wouldn't something like this work?

    Code:
    void create_process(...)
    {
         int pid = fork();
         if (pid == 0)
         {
              execv(...);
         }
    }

  13. #43
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,014
    It would, but again, that is kind of the point I wanted to make. Why two calls for something as simple as creating a new process?
    It seems like a waste. Not only does there have to be two traps to the kernel, but also a lot of work duplicating data (and sharing) that will later just be thrown away.
    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.

  14. #44
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,834
    Since this thread has long since wandered from "compare IDE's" into "OS API flamewars", it's time to end it.
    Besides, the 1-post OP hasn't bothered to return, so maybe it was just a waste of time anyway.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  15. #45
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Quote Originally Posted by Elysia View Post
    It would, but again, that is kind of the point I wanted to make. Why two calls for something as simple as creating a new process?
    It seems like a waste. Not only does there have to be two traps to the kernel, but also a lot of work duplicating data (and sharing) that will later just be thrown away.
    IIRC fork calls in linux don't automatically lead to duplication of the address space thanks the COW scheme the system uses. There will be a duplication on a call to execv, but there shouldn't be any real extra overhead over the Win32 methods. Many large scale *nix programs use fork a lot to provide multitasking so I doubt there's any serious penalty involved with this method.



    <edit> Oops...thread was closing as I typed, nevermind....</edit>

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Advantages of using C first?
    By dxfoo in forum General Discussions
    Replies: 46
    Last Post: 03-26-2010, 10:57 PM
  2. advantages of using IDE
    By surrounded in forum C Programming
    Replies: 8
    Last Post: 03-03-2009, 06:36 AM
  3. advantages and disadvantages in c
    By cnu_sree in forum C Programming
    Replies: 4
    Last Post: 11-06-2007, 09:29 AM
  4. What advantages does C# have?
    By jsrig88 in forum C# Programming
    Replies: 10
    Last Post: 01-13-2007, 07:00 PM
  5. Advantages in struct?
    By curlious in forum C++ Programming
    Replies: 5
    Last Post: 12-14-2003, 11:57 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21