Use generic wxHyperlinkCtrl under Vista/7 without comtrl32.dll v6.
Replace the test for the OS version with the test for comtrl32.dll version in HasNativeHyperlinkCtrl() wxMSW function as the native control could be not available even under Vista/7 if we're not using comtrl32.dll v6 and this can happen if the program was linked without the appropriate manifest or, possibly more likely, if a DLL using wxWidgets was loaded by such a program. Closes #12711. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b9293331c6
commit
acd0b94c38
@ -54,7 +54,10 @@ namespace
|
||||
{
|
||||
bool HasNativeHyperlinkCtrl()
|
||||
{
|
||||
return wxGetWinVersion() >= wxWinVersion_XP;
|
||||
// Notice that we really must test comctl32.dll version and not the OS
|
||||
// version here as even under Vista/7 we could be not using the v6 e.g.
|
||||
// if the program doesn't have the correct manifest for some reason.
|
||||
return wxApp::GetComCtl32Version() >= 600;
|
||||
}
|
||||
|
||||
wxString GetLabelForSysLink(const wxString& text, const wxString& url)
|
||||
@ -150,7 +153,7 @@ wxSize wxHyperlinkCtrl::DoGetBestClientSize() const
|
||||
{
|
||||
// LM_GETIDEALSIZE only exists under Vista so use the generic version even
|
||||
// when using the native control under XP
|
||||
if ( wxGetWinVersion() < wxWinVersion_6 )
|
||||
if ( !HasNativeHyperlinkCtrl() || (wxGetWinVersion() < wxWinVersion_6) )
|
||||
return wxGenericHyperlinkCtrl::DoGetBestClientSize();
|
||||
|
||||
SIZE idealSize;
|
||||
|
Loading…
Reference in New Issue
Block a user