Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Anik33

@Anik33
About
Posts
5
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Text Draw problem with Print Preview
    A Anik33

    Not Solved Yet. Just Create an SDI Application and insert the following codes in OnDraw() CRect rcPos = CRect(10,10,500,40); CFont font; LOGFONT lf; ZeroMemory(&lf,sizeof(lf)); lf.lfHeight = 25; lstrcpy(lf.lfFaceName,"Arial"); lf.lfWeight = FW_BOLD; lf.lfCharSet = DEFAULT_CHARSET; font.CreateFontIndirect(&lf); pDC->SelectObject(&font); CString str = "Sample Text1 Sample Text1 Sample Text1"; pDC->DrawText(str, &rcPos, DT_LEFT|DT_VCENTER|DT_SINGLELINE); font.DeleteObject(); rcPos.top += 30; rcPos.bottom += 30; lf.lfHeight = 30; lstrcpy(lf.lfFaceName,"Comic Sans MS"); font.CreateFontIndirect(&lf); pDC->SelectObject(&font); str = "Sample Text2 Sample Text2"; pDC->DrawText(str, &rcPos, DT_LEFT|DT_VCENTER|DT_SINGLELINE); font.DeleteObject(); and insert following code to OnPrepareDC() pDC->SetMapMode(MM_ANISOTROPIC); CSize sizeDoc = CSize(1000,1000); pDC->SetWindowExt(sizeDoc); CDC dcScreen; dcScreen.CreateCompatibleDC(0); int nLogPixelX = dcScreen.GetDeviceCaps(LOGPIXELSX); int nLogPixelY = dcScreen.GetDeviceCaps(LOGPIXELSY); int nDevPixelX = pDC->GetDeviceCaps(LOGPIXELSX); int nDevPixelY = pDC->GetDeviceCaps(LOGPIXELSY); if (nLogPixelX != nDevPixelX || nLogPixelY != nDevPixelY) { sizeDoc.cx = (sizeDoc.cx * nDevPixelX) / nLogPixelX; sizeDoc.cy = (sizeDoc.cy * nDevPixelY) / nLogPixelY; } pDC->SetViewportExt(sizeDoc); Now run the exe. and see print preview.

    C / C++ / MFC help csharp visual-studio question

  • Text Draw problem with Print Preview
    A Anik33

    I am using Visual Studio 6.0. Print preview changes text width on different zoom view. Let me describe in details.(Tested in an SDI application) I want to draw a text "Sample text1 Sample text1 Sample text1" whose font size is 10 and face is Arial.Just below this text I want to draw another text "Sample text2 Sample text2" whose font size is 15 and face is Comic Sans MS. Both are aligned LEFT or RIGHT.It draws fine. Now when I want to see the print preview it shows different text width than what was drawn previously. Now after zoom in again the view changes. In a word I dont get actual print preview. Can you help me plz?

    C / C++ / MFC help csharp visual-studio question

  • Resource Localization (Polish Character)
    A Anik33

    I am using Visual Studio 6.0. VS resource editor does not support unicode. So when I write some polish characters in string table or dialog controller "??" values are shown. How should I make a resource file/ resource dll for Polish language? Thanks in advance.

    C / C++ / MFC visual-studio csharp question learning

  • Smoking & Software Relation?
    A Anik33

    ccc

    The Lounge design question

  • ping a remote server
    A Anik33

    Hi, I need to know whether a remote(in other LAN)host/server is up or down. I can ping any host in my LAN. But when I want to ping any server as for example www.codeproject.com from my pc I get Request timed out message. Thanks in advance. Nayan Kumar Sarkar

    C / C++ / MFC com sysadmin tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups