Click here to Skip to main content
16,020,519 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: calling a function two ways Pin
Zac Howland28-Aug-06 5:53
Zac Howland28-Aug-06 5:53 
GeneralRe: calling a function two ways Pin
Jay0328-Aug-06 5:56
Jay0328-Aug-06 5:56 
GeneralRe: calling a function two ways Pin
David Crow28-Aug-06 6:08
David Crow28-Aug-06 6:08 
GeneralRe: calling a function two ways Pin
Jay0328-Aug-06 6:38
Jay0328-Aug-06 6:38 
GeneralRe: calling a function two ways Pin
toxcct28-Aug-06 7:06
toxcct28-Aug-06 7:06 
GeneralRe: calling a function two ways Pin
Jay0328-Aug-06 6:40
Jay0328-Aug-06 6:40 
GeneralRe: calling a function two ways Pin
Zac Howland28-Aug-06 6:08
Zac Howland28-Aug-06 6:08 
QuestionHandling mouseover events on toolbar with popup Pin
WebMaster28-Aug-06 5:01
WebMaster28-Aug-06 5:01 
Hey I need some help with trying to get a feature working.

What I have and what I'm trying to do:
I have a IE Toolbar derived from CCommandBarCtrlImpl (CCommandBarCtrlBase), this toolbar of course has several buttons and several of those buttons are of the dropdown type. On TBN_DROPDOWN the appropriate popupmenu is created as such
[code]
CMenu menuPopup;

menuPopup.CreatePopupMenu();
int items = 0;
for(unsigned int j=0;j<m_menu.m_items.size();j++)
{
="" if(m_menu.m_items[j]-="">shouldShow())
{
m_menu.m_items[j]->appendMenu(ctrl,(CMenuHandle)menuPopup,items,m_id);
items++;
}
}
m_globalReadyState=false;
DWORD dwThread=GetCurrentThreadId();
hSelectHook=SetWindowsHookEx(WH_CALLWNDPROC,SelectHook,NULL,dwThread);
hClickHook=SetWindowsHookEx(WH_MSGFILTER,ClickHook,NULL,dwThread);
ctrl->cur_btn=m_id;
::TrackPopupMenu(menuPopup, TPM_LEFTALIGN | TPM_RIGHTBUTTON, x, y, 0, wnd, NULL);
UnhookWindowsHookEx(hSelectHook);
UnhookWindowsHookEx(hClickHook);
m_globalReadyState=true;
ctrl->m_popup.clear();
for(j=0;j<m_menu.m_items.size();j++)
{
="" if(m_menu.m_items[j]-="">shouldShow())
{
m_menu.m_items[j]->FreeMenu();
}
}
menuPopup.DestroyMenu();
[/code]
This works fine, but something I noticed is that whenever a popupmenu is open (weather it's one I make or just some random one in IE) then the toolbarbuttons won't receive any mouseinput (eg their mouseover effects stop functioning).

Right now Im handling mouseover so that whenever a user moves the mouse over a button with a dropdown button the Menu is forcefully shown (by emulating a send to TBN_DROPDOWN (OnDropDown)). What I want is for the toolbar to still receive mouseinput whilst a popupmenu is open so that you can for example move the mouse over a button with a popupmenu the popupmenu pops up, if you move the mouse to the next button whilst the popupmenu is open that next button still receives the mouseover aka "Hot" effect and it should also close the open popupmenu, this is especially important if the next button has a popupmenu to, then the old should close, and the one corresponding to the next button should open!

I'm really stressed about this because it's the only thing left to fix and I am a tad unknowledgable about MFC since this source was bought in from someone else and just handed to me to modify i feel like a fish on land. Hopefully someone might be able to swiftly rescue me =)


Thanks in advance! =)
QuestionTitleBar Pin
HakunaMatada28-Aug-06 3:48
HakunaMatada28-Aug-06 3:48 
AnswerRe: TitleBar Pin
Hamid Taebi3-Sep-06 9:04
professionalHamid Taebi3-Sep-06 9:04 
GeneralRe: TitleBar Pin
HakunaMatada3-Sep-06 19:37
HakunaMatada3-Sep-06 19:37 
GeneralRe: TitleBar Pin
Hamid Taebi3-Sep-06 22:27
professionalHamid Taebi3-Sep-06 22:27 
QuestionCan anybody answer please? Pin
ivanris28-Aug-06 3:37
ivanris28-Aug-06 3:37 
GeneralRe: Can anybody answer please? Jeremy - THIS is a programming question... :) Pin
#realJSOP28-Aug-06 3:40
professional#realJSOP28-Aug-06 3:40 
GeneralRe: Can anybody answer please? Pin
Colin Angus Mackay28-Aug-06 3:46
Colin Angus Mackay28-Aug-06 3:46 
GeneralRe: Can anybody answer please? [modified*2] Pin
John M. Drescher28-Aug-06 3:52
John M. Drescher28-Aug-06 3:52 
JokeRe: Can anybody answer please? [modified*2] Pin
toxcct28-Aug-06 5:10
toxcct28-Aug-06 5:10 
QuestionRe: Can anybody answer please? Pin
David Crow28-Aug-06 4:51
David Crow28-Aug-06 4:51 
QuestionDisplaying a dialog derrived from CRecordview Pin
ivanris28-Aug-06 3:34
ivanris28-Aug-06 3:34 
AnswerRe: Displaying a dialog derrived from CRecordview Pin
David Crow28-Aug-06 3:51
David Crow28-Aug-06 3:51 
QuestionTo Shell a program Pin
Sina Parastgary28-Aug-06 2:32
Sina Parastgary28-Aug-06 2:32 
AnswerRe: To Shell a program Pin
toxcct28-Aug-06 2:38
toxcct28-Aug-06 2:38 
AnswerRe: To Shell a program Pin
Hamid Taebi28-Aug-06 2:50
professionalHamid Taebi28-Aug-06 2:50 
AnswerRe: To Shell a program Pin
_AnsHUMAN_ 28-Aug-06 2:55
_AnsHUMAN_ 28-Aug-06 2:55 
AnswerRe: To Shell a program Pin
User 21559728-Aug-06 3:42
User 21559728-Aug-06 3:42 

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.