nsThebesDeviceContext::nsThebesDeviceContext() { #ifdef PR_LOGGING if (!gThebesGFXLog) gThebesGFXLog = PR_NewLogModule("thebesGfx"); #endif PR_LOG(gThebesGFXLog, PR_LOG_DEBUG, ("#### Creating DeviceContext %p\n", this)); mAppUnitsPerDevPixel = nscoord(-1); mAppUnitsPerInch = nscoord(-1); mAppUnitsPerDevNotScaledPixel = nscoord(-1); mPixelScale = 1.0f; mFontCache = nsnull; mWidget = nsnull; mFontAliasTable = nsnull; #ifdef NS_DEBUG mInitialized = PR_FALSE; #endif mDepth = 0; mWidth = 0; mHeight = 0; mPrintingScale = 1.0f; #if defined(XP_WIN) && !defined(WINCE) SCRIPT_DIGITSUBSTITUTE sds; ScriptRecordDigitSubstitution(LOCALE_USER_DEFAULT, &sds); #endif }
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int iShowCmd) { MSG msg; SCRIPT_DIGITSUBSTITUTE scriptDigitSubstitute; g_LogFont.lfQuality = CLEARTYPE_QUALITY; // Register main window class InitMainWnd(); ScriptRecordDigitSubstitution(LOCALE_USER_DEFAULT, &scriptDigitSubstitute); // // Create main window // hwndMain = CreateWindowEx(0, szAppName, // window class name szAppName, // window caption WS_OVERLAPPEDWINDOW|WS_CLIPCHILDREN, CW_USEDEFAULT, // initial x position CW_USEDEFAULT, // initial y position 800, // initial x size 800, // initial y size NULL, // parent window handle NULL, // use window class menu hInst, // program instance handle NULL); // creation parameters // // Initialize the font // g_LogFont.lfHeight = -70; lstrcpy(g_LogFont.lfFaceName, L"Times New Roman"); UpdateFont(); ShowWindow(hwndMain, iShowCmd); // // Standard message loop // while(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } DeleteObject(g_hFont); return 0; }