Я думаю, что проблема в том, что переполнение скрыто для этого div " .content, .container ."
удаление этого покажет полный раскрывающийся список, но убедитесь, что это не сделает другие вопросы для вашего сайта.
Thanks Dan, Alright.. This answers the first question I had. Sadly not the second. Note: Not everything prints.. Кредиты PInvoke.net
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Diagnostics;
namespace WindowsFormsApplication1
{
static class Program
{
[DllImport("Shlwapi.dll", SetLastError = true, CharSet = CharSet.Auto)]
static extern uint AssocQueryString(AssocF flags, AssocStr str, string pszAssoc, string pszExtra, [Out] StringBuilder pszOut, [In][Out] ref uint pcchOut);
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Debug.WriteLine(FileExtentionInfo(AssocStr.Command, ".doc"), "Command");
Debug.WriteLine(FileExtentionInfo(AssocStr.DDEApplication, ".doc"), "DDEApplication");
Debug.WriteLine(FileExtentionInfo(AssocStr.DDEIfExec, ".doc"), "DDEIfExec");
Debug.WriteLine(FileExtentionInfo(AssocStr.DDETopic, ".doc"), "DDETopic");
Debug.WriteLine(FileExtentionInfo(AssocStr.Executable, ".doc"), "Executable");
Debug.WriteLine(FileExtentionInfo(AssocStr.FriendlyAppName, ".doc"), "FriendlyAppName");
Debug.WriteLine(FileExtentionInfo(AssocStr.FriendlyDocName, ".doc"), "FriendlyDocName");
Debug.WriteLine(FileExtentionInfo(AssocStr.NoOpen, ".doc"), "NoOpen");
Debug.WriteLine(FileExtentionInfo(AssocStr.ShellNewValue, ".doc"), "ShellNewValue");
// DDEApplication: WinWord
//DDEIfExec: Ñﻴ߾
// DDETopic: System
// Executable: C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE
// FriendlyAppName: Microsoft Office Word
// FriendlyDocName: Microsoft Office Word 97 - 2003 Document
}
public static string FileExtentionInfo(AssocStr assocStr, string doctype)
{
uint pcchOut = 0;
AssocQueryString(AssocF.Verify, assocStr, doctype, null, null, ref pcchOut);
StringBuilder pszOut = new StringBuilder((int)pcchOut);
AssocQueryString(AssocF.Verify, assocStr, doctype, null, pszOut, ref pcchOut);
return pszOut.ToString();
}
[Flags]
public enum AssocF
{
Init_NoRemapCLSID = 0x1,
Init_ByExeName = 0x2,
Open_ByExeName = 0x2,
Init_DefaultToStar = 0x4,
Init_DefaultToFolder = 0x8,
NoUserSettings = 0x10,
NoTruncate = 0x20,
Verify = 0x40,
RemapRunDll = 0x80,
NoFixUps = 0x100,
IgnoreBaseClass = 0x200
}
public enum AssocStr
{
Command = 1,
Executable,
FriendlyDocName,
FriendlyAppName,
NoOpen,
ShellNewValue,
DDECommand,
DDEIfExec,
DDEApplication,
DDETopic
}
}
}
Некоторые дополнительные if для неизвестных типов файлов в XP .. Может не дать правильных результатов при использовании его с чем-либо, кроме FriendlyDocName, но только в качестве примера:
public static string FileExtentionInfo(AssocStr assocStr, string doctype)
{
if ((doctype.Length <= 1) || !doctype.StartsWith(".")) return "";
uint pcchOut = 0;
AssocQueryString(AssocF.Verify, assocStr, doctype, null, null, ref pcchOut);
if (pcchOut == 0) return (doctype.Trim('.').ToUpper() + " File");
StringBuilder pszOut = new StringBuilder((int)pcchOut);
AssocQueryString(AssocF.Verify, assocStr, doctype, null, pszOut, ref pcchOut);
return pszOut.ToString();
}
Чтение подобных вещей непосредственно из реестра, как правило, является плохой идеей (см. блог Раймонда Чена для всех кровавых подробностей ). В данном конкретном случае вам нужен API-интерфейс AssocQueryString
в shlwapi.h .
Вот код C ++:
TCHAR buf[1024];
DWORD sz = sizeof(buf) / sizeof(TCHAR);
AssocQueryString(ASSOCF_INIT_DEFAULTTOSTAR, ASSOCSTR_FRIENDLYDOCNAME, L".sql", NULL, buf, &sz);
Вы можете использовать его из C # либо через C ++ / CLI, выставляя хороший .NET-дружественный API; или позвоните напрямую через P / Invoke .