Results 1 to 21 of 21

Thread: Editor in VC++

  1. #1

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Editor in VC++

    Hi everybody. This is a Text Editor made by me. It's not made in MFC.
    Attached Files Attached Files
    Last edited by prog_tom; Sep 7th, 2001 at 02:48 AM.

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  2. #2

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Suggestions?

    Any Suggestions regarding this Text Editor? This will not be the Final Release of this Editor Series

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I would next implement loading.
    Then a proper file selection mechanism (common dialogs, it's easy)
    Then maybe a menu.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Commen Dialogs?

    How to load a Common Dialog?

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Also made without MFC (the MFC version took about 1/10 of the time, and has more features).
    This program lets you search a word by number in a file. You supply the number (Bearbeiten->Set Highlight) and it will mark this word in the text.

    I accidently posted a only half translated version.
    Datei -> File
    Bearbeiten -> Edit
    Window -> Fenster
    Attached Files Attached Files
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Common Dialogs

    Can you tell me how to load a Common Dialog in VC++ Win32 Programming, please?

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    the header is commdlg.h

    You have to declare an OPENFILENAME structure and fill it's members (see MSDN)

    And you call GetOpenFileName or GetSaveFileName

    Then get the information you want from the now modified ofn

    then proceed as usual
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    this is what I used in my app
    not very elgant but effective
    Attached Files Attached Files
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Code:
    HeapFree(GetProcessHeap, 0, *ppszContent);
    GetProcessHeap()
    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

  10. #10

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Menu?

    How to create a Menu?

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    MSDN, and search for CreateMenu.
    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

  12. #12

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Common Dialogs?

    Sorry about this, I really got messed up... Would anyone place a code that only does the Common Dialogs part? Thanks

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  13. #13
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Here is a fregment from one of my apps.

    PHP Code:
                OPENFILENAME    ofn;
                
    long retval;
                
    TCHAR *szFullPathName;
                
    szFullPathName = new TCHAR[512];
                
    lstrcpy(szFullPathName,"");
                
    memset(&ofn,0,sizeof(OPENFILENAME));
                
    ofn.lStructSize sizeof(OPENFILENAME);
                
    ofn.hwndOwner hDlg;
                
    ofn.nFilterIndex 1;
                
    ofn.lpstrFile szFullPathName;
                
    ofn.nMaxFile 512;
                
    ofn.lpstrInitialDir  "c:\\";
    ofn.lpstrFilter "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0";

                
    ofn.lpstrDefExt "txt";
                
    retval GetSaveFileName(&ofn);
                if(
    retval!=0)
                {
                                                      
    //do something
                                                    

    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

  14. #14
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by Vlatko
    PHP Code:
    ofn.lpstrInitialDir  "c:\\";
    ofn.lpstrFilter "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0"
    Looks like they got messed up by the parser.

    ofn.lpstrInitialDir = "c:\\";
    ofn.lpstrFilter = "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0";
    Code:
    ofn.lpstrInitialDir  = "c:\\";
    ofn.lpstrFilter = "Text Files(*.txt)\0*.txt\0All Files(*.*)\0*.*\0";
    Last edited by parksie; Sep 7th, 2001 at 03:04 PM.
    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

  15. #15

    Re: Editor in VC++

    Originally posted by prog_tom
    Hi everybody. This is a Text Editor made by me. It's not made in MFC.
    What a nice, sexy clean UI.

  16. #16
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Re: Re: Editor in VC++

    Originally posted by filburt1


    What a nice, sexy clean UI.
    You are wrong Furby Everybody should leave MS, Corel or any other best know text editors, and use this one


    That is the most *****ed up text editor I have EVER seen
    Baaaaaaaaah

  17. #17

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Ahh!!!

    Come on guys. I'm waiting for my damn Flight(#NW070) from Northwest Airlines... Orgin: Shanghai, Destination: Little Rock. Connect in Detroit. So I can't mess around with you guys much. Damn. Can't believe they destroyed the great World Trade Center!!! And the Pentagon!@!!@$#

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  18. #18
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Are you alone on the flight(without your parents)?
    Baaaaaaaaah

  19. #19

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Post Yeah

    That's right All alone. Without my parents But due to the incident in the US. All planes to the US will be cancelled. Well they say it's going to be open on the 15th...
    So I'm damn tired here in Shanghai.

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

  20. #20
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    You are only 12...right?
    Baaaaaaaaah

  21. #21

    Thread Starter
    Fanatic Member prog_tom's Avatar
    Join Date
    May 2001
    Location
    Los Angeles and Little Rock
    Posts
    810

    Talking Yes

    You are kind of right Try this code:
    VB Code:
    1. Dim i as Long
    2. Dim myname as String
    3. Dim yours as String
    4. Dim yourage as Long
    5. Private Sub Form_Load()
    6. i=13
    7. myname="Tom Zhang"
    8. yours="Abdul"
    9. yourage="234078324"
    10. MsgBox "Hi, I'm " & myname & " and you are " & yours & " you are " & yourage & " years old.  and I'm " & i & " age old."
    11. End Sub
    Ha ha
    Damn NWA!

    prog_tom
    JOIN THE REVOLUTION!!!! Dual T3 backedup science community.
    http://physics.sviesoft.com/forum

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