Thread: Well, what do you think of my program?

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question Well, what do you think of my program?

    Ok. I posted a code in my last thread. If yoiu have downloaded it and tried the program. Tell me what you think please! I am 14 years old and I made that.
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: [email protected]

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,227
    It's pretty nice...try making it so that you can view it again in the program after it's been stored, and maybe you'd like to turn that into a dialog box, just to look a bit snazzier? Otherwise it's nice...oh yeah, and the help isn't working

  3. #3
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Thanks you! I need your help on the HELP menu, though

    Well, in the Help menu, I have the code in WM_COMMAND:

    case CM_HELP_HELP:
    //Help file goes here
    break;

    I want to start a .txt file. How do I do that? The help file is called sb15_help.txt. How do I run it from the Help menu?
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: [email protected]

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Not bad for a first windows program.

    But;
    Why do you need 8 x 6000b buffers? (bit of over kill)
    Use one large one (for validation) and then use lstrlen() to test if the user has entered a string that is too long to fit. Tell them to re-enter if they have.

    Try an array of strings for the input and an array for the HWNDs. Use hash defines for the edits and then you can refrence both arrays with these defines.


    Code:
    #define  NUM_EDITS    8
    #define  SURNAME      0
    #define  FIRSTNAME    1
    //ect
    char     sArray[NUM_EDITS][64];
    char     sBigBuffer[255];
    HWND     hWndArray[NUM_EDITS];
    
    for(i=0;i<NUM_EDITS;i++)
    {
        GetWindowText(hWndArray[i],sBigBuffer,255);
        if(lstrlen(sBigBuffer)>64)
        {
             //do error
        }
        else sprintf(sArray[i],"%*s",64,sBigBuffer);
    }
    Get some dynaminc memory allocation in there to hold the data structure. Increase size each time the user saves.

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    22
    You also can not tab from one edit box to the next? Or maybe it's just on NT machines. I'm running NT and find that sometimes when I program things to work a specific way they don't always work %100 on my NT box. Anyway, just my two cents....
    I can't say for sure.....but that doesn't look work related.

  6. #6
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Post I am working on..

    I am working on the TAB from one box to another right now. I will post the new one with TAB when I'm done.

  7. #7
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    You need to set the style for TABSTOP when you create the buttons.

    Also you have given all the buttons the same ID number (1). They should all be different.
    Try a structure to hold the HWND, ID, text and other details of the button. Then you can use a loop to create them.
    Which is why GetDlgItemText() won't work for you.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM