Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to handle windows messages in COM Exe server? Pin
John R. Shaw18-Dec-03 21:06
John R. Shaw18-Dec-03 21:06 
Generaldrawing from doc Pin
R. Thomas18-Dec-03 19:25
R. Thomas18-Dec-03 19:25 
GeneralRe: drawing from doc Pin
Monty218-Dec-03 19:47
Monty218-Dec-03 19:47 
GeneralRe: drawing from doc Pin
R. Thomas18-Dec-03 20:02
R. Thomas18-Dec-03 20:02 
GeneralRe: drawing from doc Pin
Monty218-Dec-03 20:21
Monty218-Dec-03 20:21 
GeneralRe: drawing from doc Pin
John R. Shaw18-Dec-03 20:40
John R. Shaw18-Dec-03 20:40 
GeneralGets a toolbar button ID!!! Pin
Eugene Pustovoyt18-Dec-03 19:22
Eugene Pustovoyt18-Dec-03 19:22 
GeneralRe: Gets a toolbar button ID!!! Pin
John R. Shaw18-Dec-03 20:02
John R. Shaw18-Dec-03 20:02 
A quick look implies the following:

1) Use pToolBar = CToolBar::GetToolBarCtrl(); to get access to control
2) Use pToolBar->GetItemRect(); to find which item the mouse is over.
3) Now use pToolBar->GetItemID(); to get the ID.

Accept for all the typing (loops, ect..), it should be easy.

P.S. It would be easier if each button on an MFC toolbar was an indiviual window, but they are not. If this helps helps, send me your solution; if not write an article on your solution.

INTP
GeneralRe: Gets a toolbar button ID!!! Pin
Eugene Pustovoyt18-Dec-03 20:23
Eugene Pustovoyt18-Dec-03 20:23 
GeneralRe: Gets a toolbar button ID!!! Pin
John R. Shaw18-Dec-03 22:01
John R. Shaw18-Dec-03 22:01 
GeneralRe: Gets a toolbar button ID!!! Pin
Eugene Pustovoyt18-Dec-03 23:29
Eugene Pustovoyt18-Dec-03 23:29 
Generalabout CFileDialog... Pin
Grrrr18-Dec-03 18:34
Grrrr18-Dec-03 18:34 
GeneralRe: about CFileDialog... Pin
John R. Shaw18-Dec-03 19:34
John R. Shaw18-Dec-03 19:34 
Generalchanging the menu bar due to a drop-down list selection Pin
Hin Jang18-Dec-03 18:32
Hin Jang18-Dec-03 18:32 
GeneralRe: changing the menu bar due to a drop-down list selection Pin
John R. Shaw18-Dec-03 19:13
John R. Shaw18-Dec-03 19:13 
GeneralWM_CLOSE Priority Pin
Anonymous18-Dec-03 18:24
Anonymous18-Dec-03 18:24 
GeneralRe: WM_CLOSE Priority Pin
John R. Shaw18-Dec-03 18:58
John R. Shaw18-Dec-03 18:58 
GeneralRe: WM_CLOSE Priority Pin
Anonymous18-Dec-03 19:14
Anonymous18-Dec-03 19:14 
GeneralRe: WM_CLOSE Priority Pin
Monty218-Dec-03 19:42
Monty218-Dec-03 19:42 
GeneralRe: WM_CLOSE Priority Pin
John R. Shaw18-Dec-03 21:36
John R. Shaw18-Dec-03 21:36 
Generalde-selecting items in cList Control Pin
azusakt18-Dec-03 17:32
azusakt18-Dec-03 17:32 
GeneralRe: de-selecting items in cList Control Pin
John R. Shaw18-Dec-03 17:47
John R. Shaw18-Dec-03 17:47 
GeneralDirectory Contents Question Pin
Roger Wright18-Dec-03 16:17
professionalRoger Wright18-Dec-03 16:17 
GeneralRe: Directory Contents Question Pin
Rob Manderson18-Dec-03 16:55
protectorRob Manderson18-Dec-03 16:55 
GeneralRe: Directory Contents Question Pin
Roger Wright18-Dec-03 20:38
professionalRoger Wright18-Dec-03 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.