Thread: seniding button

  1. #1
    Registered User canine's Avatar
    Join Date
    Sep 2001

    Question seniding button

    How, if you had the button HWND could you send a message to it that would press it?
    In a perfect world every dog would have a home and every home would have a dog.
    Visit My Web Site, Canine Programming
    I use Win32 API

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    You use the fnction (in WIN32 API)

    HWND of dialog, not button but you must know which dlg the button is on as you put it there
    int ID of button on dialog, the ID in resource editor or the one from the HMENU cast.
    UINT state


    You can test its state with

    "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

  3. #3
    Registered User WayTooHigh's Avatar
    Join Date
    Aug 2001
    i'm not sure this is what you want, but...

    SendMessage(HANDLE_OF_BUTTON, BM_CLICK, 0, 0);

    hope it helps.
    Sometimes, the farthest point from the center is the center itself.

    Your life is your canvas, it's only as beautiful as you paint it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 06-28-2008, 08:30 PM
  2. elliptical button
    By geek@02 in forum Windows Programming
    Replies: 0
    Last Post: 11-21-2006, 02:15 AM
  3. writing text over a deleted button
    By algi in forum Windows Programming
    Replies: 4
    Last Post: 05-02-2005, 11:32 AM
  4. Window won't display on button command!?
    By psychopath in forum Windows Programming
    Replies: 6
    Last Post: 06-22-2004, 08:12 PM
  5. Replies: 1
    Last Post: 05-26-2004, 12:58 AM