Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to identify which toolbar button has been clicked.

How to identify which toolbar button has been clicked.

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutoriallearningworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TClarke
    wrote on last edited by
    #1

    Hi all, My situation is that I have to intercept a click on the print button on an IE print preview window. The project dictates that the Page Setup dialog should be opened first when Print is clicked. My question is what is the best way to do this? I have subclassed the window but the toolbar buttons are not separate windows so all I'm getting is a WM_LBUTTONDOWN message to the main window with the location of the click. I can of course stop this message getting through but knowing for sure when the right button has been hit is where I'm having a problem with this technique. Is there a way of querying the window to find the rect and position of the print button? I'm unhappy about measuring it myself and hard coding in the value in case some system change invalidates the value I've come up with Thanks for any ideas and help

    Cheers Tom Philosophy: The art of never getting beyond the concept of life. Religion: Morality taking credit for the work of luck.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups