text box & buttons on window .. pls help urgent ???

This is a discussion on text box & buttons on window .. pls help urgent ??? within the Windows Programming forums, part of the Platform Specific Boards category; hello friends i am new to windows programming , but after reading some tutorials i have created a sample window ...

  1. #1
    Registered User intruder's Avatar
    Join Date
    Nov 2002
    Posts
    48

    text box & buttons on window .. pls help urgent ???

    hello friends i am new to windows programming , but after reading some tutorials i have created a sample window , but what i want to do is i want to insert a text box and two buttons in that window .. so can anybody pls help me how can i do that.. also i want to give a browse button with which we can select a file from the disk.. pls help .. urgent..

    thanks in advance..

    In

  2. #2
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    OMG its urgent?!

    :: Starts typing frantically ::
    Please direct all complaints regarding this post to the nearest brick wall Have a nice day.

  3. #3
    Registered User intruder's Avatar
    Join Date
    Nov 2002
    Posts
    48
    thank u for a very informative answer ... i am waiting for your typing to complete...

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Do you use MFC? If yes, add the controls in Resource Editor.

    Kuphryn

  5. #5
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,600
    CreateWindow() && CreateWindowEx() will make any control you'll need.

    Code:
    CreateWindowEx(0, "EDIT", "", ES_CENTER|WS_VISIBLE|WS_CHILD, 0, 0, 100, 25, hwnd, 0);
    
    CreateWindowEx(0, "BUTTON", "", BS_DEFPUSHBUTTON|WS_VISIBLE|WS_CHILD, 0, 0, 100, 25, hwnd, 0);
    To open a file, you'll need an OPENFILENAME struct, the GetOpenFileName dialog, and a buffer. Be sure to set the 0th offset of the buffer to 0.
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  6. #6
    Registered User intruder's Avatar
    Join Date
    Nov 2002
    Posts
    48
    hey thank u very much for helping me .. friends.. i am studying MFC but right now i am using DevC++ compiler...

    and trying to creat all this.. well thanks lots..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 07:14 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 10:06 AM
  3. opengl help
    By heat511 in forum Game Programming
    Replies: 4
    Last Post: 04-05-2004, 01:08 AM
  4. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 07:00 PM
  5. dont want to use all params
    By stallion in forum Windows Programming
    Replies: 2
    Last Post: 02-18-2003, 07:10 AM

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