2013-06-18 2 views
3

나는 모든 C API XLM 함수의 전체 문서를 찾기 위해 꽤 많은 시간을 보냈다. xll 추가 기능 개발을위한 MSDN 설명서가 누락 되었습니까?

나는 그들 중 몇 가지 설명이 페이지를 발견 : http://msdn.microsoft.com/en-us/library/office/bb687910%28v=office.12%29.aspx

을하지만, 예를 들어 나는 xlfAddMenu을 이해하고 사용하고 싶었, 나는 나를 설명 MSDN에 페이지를 찾을 수 없습니다.

사용할 수있는 설명서가 있는지 알고 있습니까? 명백하게 거기에 도착하는 것은 그렇게 쉽지 않다.

답변

0

모든 C API XLM 기능에 대한 공식 문서는 없습니다. 그러나, documentation로 C API를 XLM의 기능에 대한 다음 말한다 :

더 많은 기능은 XLLs을 개발할 때 유용한 C API를 통해 Excel에서 노출됩니다. 그들은 또한

에서, SDK의 설치를 COMME EXAMPLE.[C,H] 파일이 이러한 기능 중 일부를 사용. "XLM에서 매크로 시트를 사용할 수있는 Excel 워크 시트 기능과 기능 및 명령에 해당하면 사용할 수 있습니다 그것은 그들을 사용하는 방법을 배울 수 예를 들어, xlfAddMenuxlAutoOpen 콜백 함수에 사용되는

// In the following block of code, the Generic drop-down menu is created. 
// Before creation, a check is made to determine if Generic already 
// exists. If not, it is added. If the menu needs to be added, memory is 
// allocated to hold the array of menu items. The g_rgMenu[] table is then 
// transferred into the newly created array. The array is passed as an 
// argument to xlfAddMenu to actually add the drop-down menu before the 
// help menu. As a last step the memory allocated for the array is 
// released. 
// 
// This block uses TempStr12() and TempNum12(). Both create a temporary 
// XLOPER12. The XLOPER12 created by TempStr12() contains the string passed to 
// it. The XLOPER12 created by TempNum12() contains the number passed to it. 
// The Excel12f() function frees the allocated temporary memory. Both 
// functions are part of the framework library. 

Excel12f(xlfGetBar, &xTest, 3, TempInt12(10), TempStr12(L"Generic"), TempInt12(0)); 

if (xTest.xltype == xltypeErr) 
{ 
    hMenu = GlobalAlloc(GMEM_MOVEABLE,sizeof(XLOPER12) * g_rgMenuCols * g_rgMenuRows); 
    px = pxMenu = (LPXLOPER12) GlobalLock(hMenu); 

    for (i=0; i < g_rgMenuRows; i++) 
    { 
     for (j=0; j < g_rgMenuCols; j++) 
     { 
      px->xltype = xltypeStr; 
      px->val.str = TempStr12(g_rgMenu[i][j])->val.str; 
      px++; 
     } 
    } 

    xMenu.xltype = xltypeMulti; 
    xMenu.val.array.lparray = pxMenu; 
    xMenu.val.array.rows = g_rgMenuRows; 
    xMenu.val.array.columns = g_rgMenuCols; 

    Excel12f(xlfAddMenu,0,3,TempNum12(10),(LPXLOPER12)&xMenu,TempStr12(L"Help")); 

    GlobalUnlock(hMenu); 
    GlobalFree(hMenu); 
} 
0

나에게 가장 좋은 문서에 따르면 (그러나 업데이트되지 ..) 다음 책은 다음과 같습니다.. Excel을 사용하여 금융 응용 프로그램 C/C++의 Add-in 개발, 2 판 스티브 돌턴. xlfAddMenu 함수 페이지 332에 대한 설명을 찾을 수 있습니다. 또한 Microsoft Excel XLL 소프트웨어 개발 키트의 chm 파일에서 코드 예제를 비롯한 유용한 정보를 찾을 수 있습니다 (xlfAddMenu를 찾지 못해서 감가 상각 된 기능).