Game Development Reference
In-Depth Information
uint fileCount = Native.DragQueryFile(_dropHandle, 0xffffffff, null, 0);
List<string> filteredFiles = new List<string>();
if (fileCount >= 1)
{
for (uint index = 0; index < fileCount; index++)
{
StringBuilder buffer = new StringBuilder(1024);
Native.DragQueryFile(_dropHandle,
index,
buffer,
buffer.Capacity + 1);
string fileExtension = Path.GetExtension(buffer.ToString());
foreach (string filterExtension in Extensions)
{
if (fileExtension == filterExtension)
{
filteredFiles.Add(buffer.ToString());
break;
}
}
}
_fileNames = filteredFiles.ToArray();
_commandIdentifier = (firstCommand + id) - 1;
CommandRegistration(_fileNames);
id = (_commandIdentifier++);
}
MenuItemInfo menuItemInfo = new MenuItemInfo();
menuItemInfo.Size = 48;
menuItemInfo.ID = id++;
menuItemInfo.SubMenu = (int)_popupMenu;
menuItemInfo.TypeData = MenuTitle;
menuItemInfo.Mask = (uint)Native.MaskFlags.Type |
Search Nedrilad ::




Custom Search