Owner draw button Missing double clicks
Harry Hahne -- hahne@epas.utoronto.ca
Saturday, June 29, 1996
Visual C++, MFC 4.1, Win 95
I have a dialogbar with several ownerdrawn graphical buttons. If I double
click on a button, the second click is absorbed. I want to be able to click
multiple times quickly have the button respond to each click as a single
click.
In the dialog editor, I set the button to "Owner Draw". I have my own class
derived from CDialogBar. In CMyDialogBar::Create(), for each button I have I
have:
ButtonNext.AutoLoad(ID_RECORD_NEXT,this);
This allows the graphic buttons to display just fine.
The strange thing is, if I change the button to a regular text button, it
responds to multiple clicks.
I also wonder what the "Icon" and "Bitmap" options in the dialog editor "Push
Button Properties" are for and how they are used. I can't find anything about
these options in the documentation.
Harry Hahne
hahne@chass.utoronto.ca
Vilas Patil -- vilasp@rpsadf.atlantaga.ncr.com
Friday, July 05, 1996
[Mini-digest: 3 responses]
Are you sure you have not set WS_DBLCLICK style to your button? I suspect
u did..
Remove it then the button should respond to individual clicks
Vilas
----------
From: owner-mfc-l
To: mfc-l
Subject: Owner draw button Missing double clicks
Date: Saturday, June 29, 1996 9:50AM
Visual C++, MFC 4.1, Win 95
I have a dialogbar with several ownerdrawn graphical buttons. If I double
click on a button, the second click is absorbed. I want to be able to click
multiple times quickly have the button respond to each click as a single
click.
In the dialog editor, I set the button to "Owner Draw". I have my own class
derived from CDialogBar. In CMyDialogBar::Create(), for each button I have
I
have:
ButtonNext.AutoLoad(ID_RECORD_NEXT,this);
This allows the graphic buttons to display just fine.
The strange thing is, if I change the button to a regular text button, it
responds to multiple clicks.
I also wonder what the "Icon" and "Bitmap" options in the dialog editor
"Push
Button Properties" are for and how they are used. I can't find anything
about
these options in the documentation.
Harry Hahne
hahne@chass.utoronto.ca
-----From: Dean Grimm
The trick here is to handle BN_DOUBLECLICKED and have it call your
BN_CLICKED handler for each of your buttons
==========================================================
Dean Grimm Software Engineer / Cortron corp.
-----From: Barry Tannenbaum
I remember seeing similar behavior a while back. I simply mapped the double
click notification to the same routine as the single click.
- Barry
--------------------------------------------------------------------------------
3DV Technology, Inc Phone: (603) 595-2200 X228
410 Amherst St., Suite 150 Fax: (603) 595-2228
Nashua, NH 03063 Net: barry@dddv.com
| Вернуться в корень Архива
|