Click here to Skip to main content
15,888,579 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow27-Jan-09 6:04
ForNow27-Jan-09 6:04 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
Mark Salsbery27-Jan-09 6:15
Mark Salsbery27-Jan-09 6:15 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow27-Jan-09 6:40
ForNow27-Jan-09 6:40 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
Mark Salsbery27-Jan-09 6:52
Mark Salsbery27-Jan-09 6:52 
GeneralRe: Button Code "DEFPUSHBUTTON" code not receving control Pin
ForNow27-Jan-09 13:13
ForNow27-Jan-09 13:13 
Questionheap corruption after call to select() [modified] Pin
aliusam26-Jan-09 13:59
aliusam26-Jan-09 13:59 
AnswerRe: heap corruption after call to select() Pin
Cosmic Egg29-Jan-09 9:43
Cosmic Egg29-Jan-09 9:43 
QuestionHaving trouble with IOleCommandTarget interface Pin
Haim Nachum26-Jan-09 10:09
Haim Nachum26-Jan-09 10:09 
hi.
ive implemented a simple bho object with an IOleCommandTarget interface.
i have my Exec method and its called upon a click event of a toolbar button ive added to IE.

the method looks like that :
STDMETHODIMP CHelloWorldBHO::Exec(const GUID *pguidCmdGroup, 
  DWORD nCmdID, DWORD nCmdExecOpt, 
  VARIANTARG *pvaIn, VARIANTARG *pvaOut) 
{
    
	HRESULT hr = S_OK;
	HWND hwnd;
	if(m_spWebBrowser!=NULL)
	HRESULT hr1 = m_spWebBrowser->get_HWND((LONG_PTR*)&hwnd);
	 else
           {
             MessageBox(NULL, _T("No Web browser pointer"), _T("Oops"), 0);
           }


    return hr;
}


it always displays the "No Web browser pointer" message.
it seems my spWebBrowser variable is null even though ive implemented SetSite method.
i know that SetSite is fired when IE loads because im handeling an event of IE and it works fine.

my button is registerd in :
HKLM {
  NoRemove SOFTWARE
  {
    NoRemove Microsoft
    {
      NoRemove 'Internet Explorer'
      {
        NoRemove Extensions
        {
          ForceRemove '{5D578929-E74E-46A2-A810-4F33D011DC51}' 
            = s 'PageCop' {
            val 'Default Visible' = s 'yes'
            val 'ButtonText' = s 'Inspect page'
            val 'CLSID' = s '{1FBA04EE-3024-11d2-8F1F-0000F87ABD16}'
            val 'ClsidExtension' = 
                s '{A414425C-2E84-4CA3-B7F0-BCA49A9F89D6}'
            val 'Icon' = s 'C:\icons\WinXP\search4doc.ico'
            val 'HotIcon' = s 'C:\ icons\WinXP\search4doc.ico'
          }
        }
      }
    }
  }
}


my bho is registerd in :
HKLM {
  NoRemove SOFTWARE {
    NoRemove Microsoft {   
      NoRemove Windows {
        NoRemove CurrentVersion {
          NoRemove Explorer {
            NoRemove 'Browser Helper Objects' {
              ForceRemove '{A414425C-2E84-4CA3-B7F0-BCA49A9F89D6}' =    s 'HelloWorldBHO' {
                val 'NoExplorer' = d '1'
              }
            }
          }
        }
      }
    }
  }
}


anyone knows thats the problem?
AnswerRe: Having trouble with IOleCommandTarget interface Pin
«_Superman_»26-Jan-09 17:32
professional«_Superman_»26-Jan-09 17:32 
GeneralRe: Having trouble with IOleCommandTarget interface Pin
Haim Nachum27-Jan-09 2:26
Haim Nachum27-Jan-09 2:26 
QuestionVC++ 2008 Application and MSI Package Pin
pratap198026-Jan-09 6:39
pratap198026-Jan-09 6:39 
AnswerRe: VC++ 2008 Application and MSI Package Pin
Stuart Dootson26-Jan-09 7:06
professionalStuart Dootson26-Jan-09 7:06 
GeneralRe: VC++ 2008 Application and MSI Package Pin
pratap198026-Jan-09 7:28
pratap198026-Jan-09 7:28 
AnswerRe: VC++ 2008 Application and MSI Package Pin
Randor 26-Jan-09 8:02
professional Randor 26-Jan-09 8:02 
GeneralRe: VC++ 2008 Application and MSI Package Pin
pratap198026-Jan-09 11:04
pratap198026-Jan-09 11:04 
QuestionHide some lines of RichEditCtrl Pin
SutterA25-Jan-09 22:17
SutterA25-Jan-09 22:17 
AnswerRe: Hide some lines of RichEditCtrl Pin
Stuart Dootson26-Jan-09 0:13
professionalStuart Dootson26-Jan-09 0:13 
AnswerRe: Hide some lines of RichEditCtrl Pin
Code-o-mat26-Jan-09 1:03
Code-o-mat26-Jan-09 1:03 
GeneralRe: Hide some lines of RichEditCtrl Pin
SutterA26-Jan-09 2:11
SutterA26-Jan-09 2:11 
Newstext object models Pin
SutterA28-Jan-09 1:57
SutterA28-Jan-09 1:57 
GeneralRe: text object models Pin
Code-o-mat28-Jan-09 2:23
Code-o-mat28-Jan-09 2:23 
GeneralRe: text object models Pin
SutterA2-Feb-09 1:58
SutterA2-Feb-09 1:58 
GeneralRe: text object models Pin
Code-o-mat2-Feb-09 2:04
Code-o-mat2-Feb-09 2:04 
GeneralRe: text object models Pin
SutterA2-Feb-09 19:16
SutterA2-Feb-09 19:16 
GeneralRe: text object models Pin
Code-o-mat3-Feb-09 0:34
Code-o-mat3-Feb-09 0:34 

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.