Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

mncreate.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

PMENU InternalCreateMenu (BOOL fPopup)
PMENU _CreateMenu ()
PMENU _CreatePopupMenu ()


Function Documentation

PMENU _CreateMenu  ) 
 

Definition at line 81 of file mncreate.c.

References FALSE, and InternalCreateMenu().

Referenced by xxxSetLPITEMInfo().

00082 { 00083 return InternalCreateMenu(FALSE); 00084 }

PMENU _CreatePopupMenu  ) 
 

Definition at line 97 of file mncreate.c.

References InternalCreateMenu(), and TRUE.

00098 { 00099 return InternalCreateMenu(TRUE); 00100 }

PMENU InternalCreateMenu BOOL  fPopup  ) 
 

Definition at line 36 of file mncreate.c.

References tagTHREADINFO::amdesk, tagMENU::fFlags, tagTHREADINFO::hdesk, HMAllocObject(), MFISPOPUP, NULL, PtiCurrent, RETURN_IF_ACCESS_DENIED, tagTHREADINFO::rpdesk, TIF_CSRSSTHREAD, tagTHREADINFO::TIF_flags, and TYPE_MENU.

Referenced by _CreateMenu(), and _CreatePopupMenu().

00038 { 00039 PMENU pmenu; 00040 PTHREADINFO ptiCurrent = PtiCurrent(); 00041 PDESKTOP pdesk = NULL; 00042 00043 /* 00044 * If the windowstation has been initialized, allocate from 00045 * the current desktop. 00046 */ 00047 pdesk = ptiCurrent->rpdesk; 00048 /* 00049 * Just like in xxxCreateWindowEx, bypass the security check if hdesk is NULL 00050 * This allows CSR worker threads (ie harderror boxes) to do what they need to 00051 */ 00052 if (ptiCurrent->hdesk != NULL) { 00053 RETURN_IF_ACCESS_DENIED(ptiCurrent->amdesk, DESKTOP_CREATEMENU, NULL); 00054 } else { 00055 UserAssert(ptiCurrent->TIF_flags & TIF_CSRSSTHREAD); 00056 } 00057 00058 pmenu = HMAllocObject(ptiCurrent, pdesk, TYPE_MENU, sizeof(MENU)); 00059 00060 if (pmenu != NULL) { 00061 if (fPopup) { 00062 pmenu->fFlags = MFISPOPUP; 00063 } 00064 } 00065 return pmenu; 00066 }


Generated on Sat May 15 19:44:47 2004 for test by doxygen 1.3.7