Click here to Skip to main content
15,896,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Dynamic loading Kernel32.dll for backwards compatibility? Pin
Tim Smith24-Jan-03 15:35
Tim Smith24-Jan-03 15:35 
GeneralRe: Dynamic loading Kernel32.dll for backwards compatibility? Pin
Nathan Brown24-Jan-03 18:36
Nathan Brown24-Jan-03 18:36 
GeneralRe: Dynamic loading Kernel32.dll for backwards compatibility? Pin
Michael Dunn24-Jan-03 20:33
sitebuilderMichael Dunn24-Jan-03 20:33 
GeneralRe: Dynamic loading Kernel32.dll for backwards compatibility? Pin
Nathan Brown27-Jan-03 17:03
Nathan Brown27-Jan-03 17:03 
Generalmapfile&release&DLL Pin
georgi_tg24-Jan-03 12:09
georgi_tg24-Jan-03 12:09 
QuestionCListCtrl read-only but enabled? Pin
berndg24-Jan-03 12:04
berndg24-Jan-03 12:04 
GeneralCBN_DBLCLICK - severe confusion. Please help!!!!! Pin
ns24-Jan-03 11:09
ns24-Jan-03 11:09 
GeneralRe: CBN_DBLCLICK - severe confusion. Please help!!!!! Pin
PJ Arends24-Jan-03 12:31
professionalPJ Arends24-Jan-03 12:31 
If you look up WM_COMMAND in MSDN you will see what the two parameters are used for. The LPARAM parameter will contain the HWND of the control that generated the message. The high word of the WPARAM parameter will contain the message code, in this case CBN_DBLCLK. And the low word of the WPARAM parameter will contain the controls ID, in this case ID_COMBO1.

So in order to handle a message from the toolbar (or controls in the toolbar) I would override the OnCommand() function in the CMainFrame class (parent window of the toolbar).

BOOL CMainFrame::OnCommand(WPARAM wp, LPARAM lp)
{
    HWND ctrlHWND = (HWND)lp;
    int ctrlID = LOWORD(wp);
    int message = HIWORD(wp);

    if (ctrlID == ID_COMBO1)
    {
        if (message == CBN_DBLCLK)
        {
            // handle double click in combo box here
        }
    }
}





CPUA 0x5041

Sonork 100.11743 Chicken Little

"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies

Within you lies the power for good - Use it!
GeneralThat helped!. One final question Pin
nss24-Jan-03 13:47
nss24-Jan-03 13:47 
GeneralRe: That helped!. One final question Pin
PJ Arends24-Jan-03 15:07
professionalPJ Arends24-Jan-03 15:07 
GeneralRe: That helped!. One final question Pin
nss25-Jan-03 4:47
nss25-Jan-03 4:47 
GeneralGetting a combobox to do some stuff Pin
ns24-Jan-03 10:34
ns24-Jan-03 10:34 
GeneralRe: Getting a combobox to do some stuff Pin
Stefan Pedersen24-Jan-03 12:47
Stefan Pedersen24-Jan-03 12:47 
GeneralRe: Getting a combobox to do some stuff Pin
georgiek5024-Jan-03 17:03
georgiek5024-Jan-03 17:03 
GeneralWindows stops drawing my subclassed controls Pin
jimNLX24-Jan-03 10:28
jimNLX24-Jan-03 10:28 
GeneralRe: Windows stops drawing my subclassed controls Pin
Neville Franks24-Jan-03 10:49
Neville Franks24-Jan-03 10:49 
GeneralRe: Windows stops drawing my subclassed controls Pin
jimNLX24-Jan-03 11:51
jimNLX24-Jan-03 11:51 
GeneralRe: Windows stops drawing my subclassed controls Pin
Neville Franks24-Jan-03 12:31
Neville Franks24-Jan-03 12:31 
GeneralRe: Windows stops drawing my subclassed controls Pin
Gary R. Wheeler25-Jan-03 3:09
Gary R. Wheeler25-Jan-03 3:09 
GeneralRe: Windows stops drawing my subclassed controls Pin
jimNLX25-Jan-03 12:32
jimNLX25-Jan-03 12:32 
GeneralRe: Windows stops drawing my subclassed controls Pin
Gary R. Wheeler26-Jan-03 1:25
Gary R. Wheeler26-Jan-03 1:25 
GeneralRe: Windows stops drawing my subclassed controls Pin
Barbara Shafer24-Feb-03 9:11
Barbara Shafer24-Feb-03 9:11 
Generaltcslen Pin
ns24-Jan-03 10:03
ns24-Jan-03 10:03 
GeneralRe: tcslen Pin
Roger Allen24-Jan-03 10:05
Roger Allen24-Jan-03 10:05 
GeneralThank you! Pin
ns24-Jan-03 10:11
ns24-Jan-03 10:11 

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.