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

  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 ::

  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,708
    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:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  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, 08:14 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11: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, 08:00 PM
  5. dont want to use all params
    By stallion in forum Windows Programming
    Replies: 2
    Last Post: 02-18-2003, 08:10 AM