Search found 22 matches: holdfont

Return to advanced search

Al compiliar sbrowse TSBFUNCS.C me marca errores

... (HFONT) _parni( 5 ) ; int wHeight = _parni( 6 ) ; int nHeightHead = _parni( 7 ) ; int nHeightSuper = _parni( 8 ) ; HDC hDC = GetDC( hWnd ) ; HFONT hOldFont ; int wMaxRight ; RECT rct ; if( hFont ) hOldFont = SelectObject( hDC, hFont ) ; GetWindowRect( hWnd, &rct ) ; wMaxRight = rct.right; rct.top ...
by noe aburto
Thu Aug 27, 2020 6:26 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Al compiliar sbrowse TSBFUNCS.C me marca errores
Replies: 1
Views: 290

Re: Bug in font management?

Antonio, Enrico, Please look for hOldFont in Class TBtnBmp where it is assigned and change it this way: hOldFont = SelectObject( ::hDC, ::oFont:hFont ) That solves it :-) I found two occurrences: hOldFont = SelectObject( ::hDC, If( ...
by Enrico Maria Giordano
Thu Jul 10, 2014 9:00 am
 
Forum: Bugs report & fixes / Informe de errores y arreglos
Topic: Bug in font management? [Solved]
Replies: 7
Views: 1389

Re: Bug in font management?

Enrico,

Please look for hOldFont in Class TBtnBmp where it is assigned and change it this way:

hOldFont = SelectObject( ::hDC, ::oFont:hFont )

That solves it :-)
by Antonio Linares
Thu Jul 10, 2014 4:19 am
 
Forum: Bugs report & fixes / Informe de errores y arreglos
Topic: Bug in font management? [Solved]
Replies: 7
Views: 1389

A question about using TEXTOUT on different images.

... possible, to paint a TTITLE on hMemDC instead on oDrawImg ??? ---------------------------- STATIC FUNCTION CL_DT( hMemDC, nStyle, oDrawImg ) LOCAL hOldFont := SelectObject( hMemDC, oFont3:hFont ) , oTitle1 @ aPoints[1][1], aPoints[1][2] TITLE oTitle1 SIZE 300, 50 OF oDrawImg NOBORDER oTitle1:nShadow ...
by ukoenig
Wed Jun 25, 2014 6:05 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: A question about using TEXTOUT on different images.
Replies: 0
Views: 311

Re: TEXTOUT() function cannot use some predefined fonts?

... Also, it is a very good practice to save and restore the GDI objects that we select, i.e.: hOldFOnt := SelectObject( oDlgMain:hDC, oMainFont:hFont ) ... SelectObject( oDlgMain:hDC, hOldFont )
by Antonio Linares
Mon Oct 07, 2013 5:25 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: TEXTOUT() function cannot use some predefined fonts?
Replies: 21
Views: 4551

Problemas al crear la libreria TWBROWSE

... = hb_parl( 6 ); PCLIPVAR pAsizes = hb_param( 7, -1 ); HFONT hFont = (HFONT) hb_parnl( 8 ); BOOL bDestroyDC = FALSE; TEXTMETRIC tm; RECT rct; HFONT hOldFont; if( ! hDC ) { bDestroyDC = TRUE; hDC = GetDC( hWnd ); } if( hFont ) hOldFont = SelectObject( hDC, hFont ); GetClientRect( hWnd, &rct ); ...
by ander7319
Fri Jan 04, 2013 9:55 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Problemas al crear la libreria TWBROWSE
Replies: 6
Views: 2878

Error al compilar TWBROWSE xHarbour build 1.2.1 y FWH 11.01

... = hb_parl( 6 ); PCLIPVAR pAsizes = hb_param( 7, -1 ); HFONT hFont = (HFONT) hb_parnl( 8 ); BOOL bDestroyDC = FALSE; TEXTMETRIC tm; RECT rct; HFONT hOldFont; if( ! hDC ) { bDestroyDC = TRUE; hDC = GetDC( hWnd ); } if( hFont ) hOldFont = SelectObject( hDC, hFont ); GetClientRect( hWnd, &rct ); ...
by alex_cyr
Sat Jul 09, 2011 2:11 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Error al compilar TWBROWSE xHarbour build 1.2.1 y FWH 11.01
Replies: 7
Views: 2664

Re: Errores de compilación con MSVC

Héctor,

En todas las líneas en las que uses SelectObject() tendras que hacerles el "casting" al mismo tipo de la variable que recibe el valor devuelto:

hOldFont = ( HFONT ) SelectObject( hDC, hFont ) ;

ya que SelectObject() devuelve un HGDIOBJ y lo vas a guardar en un HFONT.
by Antonio Linares
Fri Feb 26, 2010 8:57 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Errores de compilación con MSVC
Replies: 4
Views: 549

Pregunta esta clase dibuja la regla a cm

... METHOD Paint() CLASS TRegla local hOldPen, n := 1,pos,j,posmm local hLightPen,hOldFont local texto,finmm WNDRAISED(::hWnd,::hDC) hOldPen = SelectObject( ::hDC, ::oPen:hPen ) hOldFont= SelectObject( ::hDC, ::oFont:hFont ) SetTextColor(::hDC, ...
by Vladimir Zorrilla
Fri Aug 21, 2009 5:40 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: Pregunta esta clase dibuja la regla a cm
Replies: 0
Views: 1177

Re: FWH/xHarbour Menus

... TRUE ); return lResult; } else if( uMsg == WM_PAINT ) { PAINTSTRUCT ps; char text[ 256 ]; RECT rct; HDC hDC = BeginPaint( hWnd, &ps ); HGDIOBJ hOldFont; GetWindowText( hWnd, text, 255 ); GetClientRect( hWnd, &rct ); SetBkMode( hDC, TRANSPARENT ); SelectObject( hDC, GetStockObject( DEFAULT_GUI_FONT ...
by E. Bartzokas
Mon May 25, 2009 3:34 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: FWH/xHarbour Menus
Replies: 20
Views: 7787

Re: Newbie question about FWH 9.03

... so important, one button, or every buttons. If font will be change on all buttons, it will be OK! I tried to replace this string in btnbmp.prg: hOldFont = SelectObject( ::hDC, If( ::lBarBtn, ::oWnd:oFont:hFont, ::oFont:hFont ) ) // method paint() befor Drawtext... on just simple: hOldFont = ...
by Loach
Sat Apr 04, 2009 8:08 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Newbie question about FWH 9.03
Replies: 8
Views: 1466

Re: Newbie question about FWH 9.03

... my mistake? - Can I change the font of the buttons captions (prompts) on buttonbar? It seems that string in method paint() of class btnbmp: "hOldFont = SelectObject( ::hDC, If( ::lBarBtn, ::oWnd:oFont:hFont, ::oFont:hFont ) )" means that font always take from parent window... Why it ...
by Loach
Fri Apr 03, 2009 12:11 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Newbie question about FWH 9.03
Replies: 8
Views: 1466

Show different fonts on Infobar

... ....... ....... //----------------------------------------------------------------// STATIC FUNCTION ONPAINT( hDC, cMsg, oFont ) LOCAL hOldFont hOldFont := SelectObject( hDC, oFont:hFont ) SetBkMode( hDC, TRANSPARENT ) IF nCOLTEXT = 1 .or. e_COLTEXT = 1 SetTextColor( hDC, CLR_WHITE ...
by ukoenig
Fri Feb 22, 2008 1:35 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Possible to define a FONT with a saved String ?
Replies: 3
Views: 1014

... WINDOW oWnd return nil //----------------------------------------------------------------// static function OnPaint( hDC, cMsg, oFont ) local hOldFont hOldFont := SelectObject( hDC, oFont:hFont ) SetBkMode( hDC, TRANSPARENT ) TextOut( hDC, 5, 5, cMsg ) SelectObject( hDC, hOldFont ) return nil
by Otto
Mon Jan 21, 2008 5:50 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: bmptxt
Replies: 20
Views: 2885

... Static Function DrawRotated(hDC,cPrompt,Y,X,nClrText,nClrPane,oFont) Local hOldFont, nOldMode, nOldClrText, nOldClrPane nOldClrText:=SetTextColor(hDC,nClrText) if nClrPane<>nil nOldClrPane:=SetBkColor(hDC,nClrPane) else ...
by Raymundo Islas M.
Mon Mar 12, 2007 2:51 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: Texto vertical en un dialogo...
Replies: 2
Views: 757
Next

Return to advanced search