+// ----------------------------------------------------------------------------
+// fonts
+// ----------------------------------------------------------------------------
+
+wxFont wxCreateFontFromStockObject(int WXUNUSED(index))
+{
+ wxFont font;
+
+ FONTMETRICS metrics;
+ HPS hPS = ::WinGetScreenPS(HWND_DESKTOP);
+ if (::GpiQueryFontMetrics(hPS, sizeof(FONTMETRICS), &metrics))
+ {
+ wxNativeFontInfo info;
+ info.fm = metrics;
+ font.Create(info);
+ }
+ else // GetStockObject() failed
+ {
+ wxFAIL_MSG( _T("stock font not found") );
+ }
+
+ return font;
+}
+