Results 1 to 9 of 9

Thread: Need advice on VB to VC++ conversion.

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Location
    Huntingdon Valley, PA 19006
    Posts
    1,151

    Need advice on VB to VC++ conversion.

    I want to learn Visual C++ and convert some VB applications. I have what looks like a decent tutorial manual.

    The manual does not seem to describe any startup option which provides the same type of form that the VB standard exe startup option provides.

    I do not want to try every option. Perhaps there is no similar option for Visual C++.

    My applications use Text Boxes, Control Arrays, List boxes, Picture Boxes, Command Buttons, Et cetera. Basically the applications provide for data entry to scientific calculation programs which display graphic results in Picture Boxes and/or numeric results in an array of Text Boxes. One of my applications writes data to a disk file and later reads it back.

    What Visual C++ startup options should I start learning?
    Live long & prosper.

    The Dinosaur from prehistoric era prior to computers.

    Eschew obfuscation!
    If a billion people believe a foolish idea, it is still a foolish idea!
    VB.net 2010 Express
    64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Sorry, but you can't go straight into converting your GUI programs just yet.

    First you need to learn the language, which is noted in the FAQ. Also, go to www.bruceeckel.com and get "Thinking in C++" because it's a great tutorial. www.cplusplus.com has plenty of reference, and no doubt the others will have their links and suggestions.

    Once you've learnt the language, you'll then need to learn the Win32 API (since MFC is evil and if you want to learn it you need to learn the API first anyway).

    Basically, the options to be concerned with are: Win32 Console Application (for a raw C++ program), and Win32 Application (looks the same but doesn't start a console window up for you).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73
    I can convert for you, IM me (CafnatdHotPocket)
    if(GetWindowLong(hwnd,GWL_ID)==IDC_MICROSOFT_APPLICATION)
    {
    SetWindowText(hwnd,"I suck.");
    SendMessage(hwnd,WM_START_SUCKING,0,0);
    SendMessage(hwnd,WM_CRASH,0,0);
    }

  4. #4
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Saying to IM you doesn't really help considering you haven't said WHAT messenger
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  5. #5
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73
    Well, unless I specify otherwise, it usually means AIM/AOL...

    I'd actually LIKE the challenge of converting it.
    if(GetWindowLong(hwnd,GWL_ID)==IDC_MICROSOFT_APPLICATION)
    {
    SetWindowText(hwnd,"I suck.");
    SendMessage(hwnd,WM_START_SUCKING,0,0);
    SendMessage(hwnd,WM_CRASH,0,0);
    }

  6. #6
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    If you don't know how windows work, i.e. classes, messages you will find out that windows prograqmming is not as easy as in VB. Just to make the form(window) in C++ you will need two pages of code and VB makes that automatically without any VB code.

    But it is important not to be scared of twp pages of code just for a simple window. Most people don't remember that code, they just paste it but it is really easy to understand. If you don't know the C++ language you have to learn it first and then go to windows programming. You can accomplish that in a month.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  7. #7
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73
    I Always copy/paste the window code from http://www.winprog.org
    if(GetWindowLong(hwnd,GWL_ID)==IDC_MICROSOFT_APPLICATION)
    {
    SetWindowText(hwnd,"I suck.");
    SendMessage(hwnd,WM_START_SUCKING,0,0);
    SendMessage(hwnd,WM_CRASH,0,0);
    }

  8. #8
    Frenzied Member Skitchen8's Avatar
    Join Date
    Feb 2001
    Location
    Binghamotn, NY
    Posts
    1,943
    Originally posted by TadaTensai
    I can convert for you, IM me (CafnatdHotPocket)
    hey, would it be possible for you to convert my MP3 Player also?
    Government is another way to say better…than…you.
    It’s like ice but no pick, a murder charge that won’t stick,
    it’s like a whole other world where you can smell the food,
    but you can’t touch the silverware.
    Huh, what luck. Fascism you can vote for.
    Humph, isn’t that sweet?
    And we’re all gonna die some day, because that’s the American way
    -Stone Sour

  9. #9
    Lively Member
    Join Date
    Dec 2000
    Location
    Indiana
    Posts
    73
    I could try.... Go ahead an email me ([email protected]) or IM me (Parksie: AIM!) at CafnatdHotPocket
    if(GetWindowLong(hwnd,GWL_ID)==IDC_MICROSOFT_APPLICATION)
    {
    SetWindowText(hwnd,"I suck.");
    SendMessage(hwnd,WM_START_SUCKING,0,0);
    SendMessage(hwnd,WM_CRASH,0,0);
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width