Re: Shortened text - win32lib large fonts problem?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hello,

Here is an example that will retrieve the font size currently set by the user.

    hdc = GetDC(NULL) --Get DC for screen
    iDPI = GetDeviceCaps(hdc, LOGPIXELSX)
    ReleaseDC(NULL, hdc)

Also, take a look at my clock demo on the user-contrib page.
This shows an alternative to obtain the measurment that could
be used to set the XY axis of any control based on user set
font sizes. Be carefull 'cause this is a generalized routine.

       poke4(pt,0) poke4(pt+4,0)  
       
       junk = c_func(xClientToScreen,{hwnd, pt}) 
       
       x = peek4s(pt) y = peek4s(pt+4)

       c_proc(GetWindowRect, {hwnd,rect})

       x -= peek4s(rect_Left)
       y -= peek4s(rect_Top)

Basic stuff !

Euman
euman at bellsouth.net


----- Original Message ----- 
From: "Wolf" <wolfritz at KING.IGS.NET>

> > Yep, that's it. For info then, a lot of programs don't display
> > properly if large fonts are selected (right click on desktop
> > background, properties, settings, advanced, general).
> >
> > Suppose I should invest in a 19" monitor...
> 
> The size of the monitor ? No !
> The static sizes of win32lib controls do not dynamically change if you've
> selected large fonts as your WIN default.
> This is even worse for lists, which may attempt to resize, but aren't given
> enuf room to expand, so they 'bleed' over the control below.
> You'll have to blame this on the programmer   blink

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu