Thread: Making Buttons

  1. #16
    Registered User
    Join Date
    Feb 2002
    Posts
    57
    Ah crap, I came back and pressed back on my browser and it reposted! Oh well, i guess ill have to try what you were saying. so RECT rect; to declare it but how would i capture teh coordinates? Hmm.... Would I have to make a different Bitmap for each Text? or could i still have them all on the same bmp? Thanks..

    btw, I think lParam is Y and wParam is X.
    Language: C++
    Compiler: Visual C++ 6.0
    Currently Working On: Simple OpenGL aspects

  2. #17
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    struct RECT{

    intn left;
    int top;
    int right;
    int bottom;
    };

    struct POINT {

    int x;
    int y;
    }


    No need to make a bitmap this way- just measure!!
    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;
    }

  3. #18
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    To capture the coods

    case WM_LBUTTONDOWN:
    ClickedPoint=MAKEPOINTS(lParam);

    Don't forget this is client coods for the dialog. May need screen coods (Look up the macro for that)

    Watch that your variables in the callback are declared 'static' if you need them next msg. ie the HWND of the ctrls.

    Or use

    GetClientRect(GetDlgItem(hDlg, ID_CTRL),&Rect);

    To filter non mouse click msg's from the button
    case ID_BUTTON:
    if(HIWORD(wParam)==BN_CLICKED)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 04-09-2009, 02:31 AM
  2. Ownerdraw buttons (2)
    By maes in forum Windows Programming
    Replies: 7
    Last Post: 09-11-2003, 05:50 AM
  3. Radio Buttons in Visual C++ 6
    By Ripper1 in forum Windows Programming
    Replies: 22
    Last Post: 05-16-2003, 07:54 AM
  4. Site on Making Common Controls like BUttons
    By knight543 in forum Windows Programming
    Replies: 3
    Last Post: 03-02-2002, 06:10 PM
  5. Grouping radio buttons
    By Bazz in forum Windows Programming
    Replies: 1
    Last Post: 08-28-2001, 07:15 AM