overview
<p><ac:link><ri:page ri:content-title="NavigationItemUIInterface" /></ac:link> function called by the framework to request that you create the window for you UI-side component.</p>
functiondefinition
<ac:structured-macro ac:name="code"><ac:parameter ac:name="language">cpp</ac:parameter><ac:plain-text-body><![CDATA[HWND NavItemCreateWindow(
NAVCREATEITEM* pCs
); ]]></ac:plain-text-body></ac:structured-macro>
parameters
<p><ac:structured-macro ac:name="vardef"><ac:parameter ac:name="Name">pCs</ac:parameter><ac:parameter ac:name="TypeMod">*</ac:parameter><ac:parameter ac:name="Linked">true</ac:parameter><ac:parameter ac:name="Type">NAVCREATEITEM</ac:parameter><ac:parameter ac:name="Style">Parameter</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter><ac:rich-text-body>Pointer to a <ac:link><ri:page ri:content-title="NAVCREATEITEM" /></ac:link> structure that defines how to create the window.</ac:rich-text-body></ac:structured-macro></p>
returnvalue
<p><ac:structured-macro ac:name="returnvalue"><ac:parameter ac:name="Type">HWND</ac:parameter><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter><ac:rich-text-body><p>HWND of your newly created window or NULL if you cannot/will not create the window</p></ac:rich-text-body></ac:structured-macro></p>
remarkscontent
<p>NAVCREATEITEM also contains an LPARAM context that is the same value that you specified as LPARAM field when you inserted the NavItem that NavItemCreateWindow is being called for. You can use this context any way you wish but often it is used to specify which instance of a class the message relates to. This allows you to use the same <ac:link><ri:page ri:content-title="NavigationItemUIInterface" /></ac:link> object for different items.</p>
examplescontent
<ac:structured-macro ac:name="code"><ac:plain-text-body><![CDATA[class OurPanel : public CWnd
{
public:
void Create(HWND parent, RECT rect);
};
OurPanel ourPanel;
// Set as the NavItemCreateWindow member of our NavigationItemUIInterface
HWND NavItemCreateWindow( NAVCREATEITEM* pCs )
{
AFX_MANAGE_STATE( AfxGetStaticModuleState() );
outPanel.Create(pCs->hParent, CRect(pCs->rcWnd));
return ourPanel.m_hWnd;
}
]]></ac:plain-text-body></ac:structured-macro>
seealsocontent