SetWindowTheme - 如何防止视觉样式应用于窗口?

时间:2016-11-25 16:51:19

标签: c++ windows

我阅读了有关SetWindowTheme的这篇Microsoft文档:https://msdn.microsoft.com/en-us/library/windows/desktop/bb759827(v=vs.85).aspx,它说:

  

当pszSubAppName和pszSubIdList为NULL时,主题管理器将删除先前应用的关联。您可以通过指定空字符串(L"")来阻止视觉样式应用于指定窗口,该字符串与任何节条目都不匹配。

上面的L" "对我来说看起来不像是一个空字符串 - 它有一个空格。我是否应该传递// obtain function pointer to SetWindowTheme (FARPROC&)SetWindowTheme = ::GetProcAddress(dll, "SetWindowTheme"); if (SetWindowTheme != 0) { WCHAR *empty = (WCHAR*)" "; (*SetWindowTheme)( hWnd, empty, empty ); } Sub FillinternetForm() Dim ie As Object Set ie = CreateObject("Internetexplorer.Application") ie.Navigate "https://google.com" ie.Visible = True While ie.Busy DoEvents 'wait until IE is done loading page. Wend ie.Document.getElementById("lst-ib").Value = "Fast Sub" ie.Navigate "https://google.com", CLng(2048) While ie.Busy DoEvents 'wait until IE is done loading page. Wend With CreateObject("Shell.Application").Windows Set ie = .Item(.Count - 1) End With While ie.Busy DoEvents 'wait until IE is done loading page. Wend ie.Document.getElementById("lst-ib").Value = "Fast slow Sub" End Sub 以防止应用视觉样式?

以下是我使用它的用法。从char *到WCHAR *的c风格演员看起来很可疑:

function morphPath(path){
// some magic here
return newPath;
}

function morphTube(path){
// change tube's vertices positions based on path
}

0 个答案:

没有答案