本文介绍了滑鼠内容页面新增页面后,要如何排列顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起大家,我没有注意到这是一个Enalish论坛。

Sorry everybody, i have not notice this an Enalish forum.

我有插入页面程序。我想在鼠标属性中插入页面。

I have insert page program. I want to insert page in mouse property.

我已经在鼠标属性中添加页面,但它不能改变页面列表。

I allready add page in mouse property, but it can't not change page list.

I 。要在第一个列表项添加页

I want to add page in first list item.

示例代码:

STDMETHODIMP InsertPropSheet :: XPropSheet :: AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage,LPARAM lParam的)

{

      DbgOut(" XPropSheet :: AddPages \ n");

 

      METHOD_PROLOGUE(InsertPropSheet,PropSheet);

STDMETHODIMP InsertPropSheet::XPropSheet::AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam)
{
      DbgOut("XPropSheet::AddPages\n");
 
      METHOD_PROLOGUE(InsertPropSheet, PropSheet);

     PROPSHEETPAGE PPSP;

     PROPSHEETPAGE ppsp;

      pThis-> m_pPageMain =新PropPageMain();

   &NBSP ; pThis-> m_pPageMain-> m_psp.dwFlags | = PSP_USEHICON | PSP_USEREFPARENT;

     pThis-> m_pPageMain-> m_psp.hIcon = AfxGetApp() - > LoadIcon(IDI_LOGO);

    的memcpy(&安培; PPSP,&安培; pThis-> m_pPageMain-> m_psp,的sizeof(pThis-> m_pPageMain-> m_psp));

     pThis-> m_hPageMain = CreatePropertySheetPage((PROPSHEETPAGE *)& ppsp);

     if(pThis-> m_hPageMain)

    {

         CanDeletePropPageMain = TRUE;

     pThis->m_pPageMain = new PropPageMain();
     pThis->m_pPageMain->m_psp.dwFlags |= PSP_USEHICON | PSP_USEREFPARENT;
     pThis->m_pPageMain->m_psp.hIcon = AfxGetApp()->LoadIcon(IDI_LOGO);
     memcpy(&ppsp, &pThis->m_pPageMain->m_psp, sizeof(pThis->m_pPageMain->m_psp));
     pThis->m_hPageMain = CreatePropertySheetPage((PROPSHEETPAGE*)&ppsp);
    if(pThis->m_hPageMain)
    {
         CanDeletePropPageMain = TRUE;

         if(!lpfnAddPage(pThis-> m_hPageMain,lParam))
$
        {

            :: DestroyPropertySheetPage(pThis-> m_hPageMain);

           删除pThis-> m_pPageMain;

            pThis-> m_hPageMain = NULL;

            pThis-> m_pPageMain = NULL;

        }
     }
 

 返回NOERROR;

}

         if(!lpfnAddPage(pThis->m_hPageMain, lParam))
        {
            ::DestroyPropertySheetPage(pThis->m_hPageMain);
            delete pThis->m_pPageMain;
            pThis->m_hPageMain = NULL;
            pThis->m_pPageMain = NULL;
        }
     }
 
 return NOERROR;
}

 

 

 

推荐答案


这篇关于滑鼠内容页面新增页面后,要如何排列顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 21:05