±ÍÇÏ´Â ¼Õ´Ô À̽ʴϴÙ
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ
  
  µ¨¸¶´ç °ø½Ä ÀºÇà°èÁÂ
  ÇϳªÀºÇà 227-910235-83607
  ¿¹±ÝÁÖ ÀÌ»ó±¹(¿î¿µÁø)
ÇÁ·ÎÁ§Æ® °Ô½ÃÆÇ
ÅõÇ¥°Ô½ÃÆÇ
µ¨¸¶´ç¼Ò°³
±âÃʺÎÅÍ È°¿ë±îÁö! µ¨ÆÄÀÌ ±³À° - µ¥ºê±â¾î
°­ÁÂ, ÆÁ, Á¤º¸ °­ÁÂ, ÆÁ, Á¤º¸ ÀÔ´Ï´Ù.
±Û³»¿ë - °­ÁÂ, ÆÁ, Á¤º¸
 [angel] Delphi7, ÀϺ»¾î¿Í Áß±¹¾î Ç¥½Ã
Ÿ¶ôõ»ç
(±è¼ºÈÆ)
2015-09-06 ¿ÀÀü 11:46:00
Ä«Å×°í¸®: ÆÁ
4950ȸ Á¶È¸



µî·ÏµÈ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.
¾È³çÇϼ¼¿ä. Å¸¶ôõ»ç ÀÔ´Ï´Ù.

Delphi7 ¿¡¼­ ÀϺ»¾î¿Í Áß±¹¾î°¡ ±úÁ® ³ª¿ÀÁö¸¸, 
Internet Explorer ¿¡¼­´Â ÀϺ»¾îÆÑ°ú Áß±¹¾îÆÑÀ» ¼³Ä¡ ÇÏÁö ¾Ê¾Æµµ ÀϺ»¾î¿Í Áß±¹¾î »çÀÌÆ®°¡ ³ª¿É´Ï´Ù.

ÅؽºÆ®¸¦ ¾µ¶§ Unicode·Î ¾²´Â ÇÔ¼ö DrawTextW() ·Î ¾²¸é ÀϺ»¾î¿Í Áß±¹¾î°¡ ±úÁöÁö ¾Ê°í ³ª¿É´Ï´Ù.

DrawTextW() ´Â DrawText() ¿Í »ç¿ë¹æ¹ýÀÌ µ¿ÀÏÇÕ´Ï´Ù.

Delphi7 ÀÇ ÄÄÆ÷³ÍÆ®´Â ÅؽºÆ® Ç¥½Ã ÇÒ ¶§ DrawText ¸¦ ¾²±â ¶§¹®¿¡ ±ÛÀÚ°¡ ±úÁý´Ï´Ù.
´ëÇ¥ÀûÀ¸·Î TLabel ÀÌ ÀÖ½À´Ï´Ù.

TLabel À» »ó¼Ó¹Þ¾Æ DrawText() È£Ãâ ÇÔ¼ö¸¸ DrawTextW() È£Ãâ·Î º¯°æ ÇϽõ簡,
´Ù½Ã ¸¸µå½Ãµç°¡ Çϸ頵˴ϴÙ.

Ç¥½Ã´Â À¯´ÏÄÚµå·Î Çϸ頵ÇÁö¸¸...

ÀԷ ¹ÞÀ» ¶§´Â ´ç¿¬È÷ ¾ð¾î ÆÑÀÌ ÀÖ¾î¾ß ÇÕ´Ï´Ù.
¿¡µðÆ®¿¡ ÀϺ»¾î¸¦ ¾²·Á¸é ÀϺ»¾î ¾ð¾îÆÑÀÌ ¼³Ä¡ µÇ¾î¾ß ÇÕ´Ï´Ù.

¾Æ·¡´Â Á¦ TLabel ÄÄÆ÷¿¡¼­ ¾²´Â ºÎºÐ

  // Draw Caption
  Canvas.Brush.Style := bsClear;
  if FShowCaption then     // Ä¸¼ÇÀÌ ÀÖÀ¸¸é
  begin
    sText := xyReplaceW('#13#10', #13#10, FCaption);     // ÅؽºÆ®ÀÇ "#13#10" À» #13#10 À¸·Î º¯È¯

    Canvas.Font.Assign(Font);
    if not Enabled then
      Canvas.Font.Color := FColorDisable;

    // ±âº» ÀÎÀÚ
    DrawStyle := DT_EXPANDTABS or DT_EDITCONTROL
          or WORD_WRAP_TEXT[FWordWrap] or ALIGNMENT_TEXT[FAlignment]
          or WORD_ELLIPSIS_TEXT[FWordEllipsis];

    // Àǹ̠¾ø´Ù. ¾ð¾î¸¦ ¿ÞÂʺÎÅÍ ¾µ±î, ¿À¸¥ÂÊ ºÎÅÍ ¾µ°¡ ¿©ºÎ´Ù. ¾Æ¶ø¿¡¼± ¿À¸¥ÂʺÎÅÍ ¾´´Ù.
    DrawStyle := DrawTextBiDiModeFlags(DrawStyle);
    CalcRect := MyRect;

    // Á¿ì Á¤·ÄÀº °è»ê ÇÑ´Ù.
    if FAlignment = taLeftJustify then
      MyRect.Left := MyRect.Left + FSpaces[0]
    else if FAlignment = taRightJustify then
      MyRect.Right := MyRect.Right - FSpaces[0];

    // À§ ¾Æ·¡ Á¤·ÄÀº ÀÎÀڷΠDT_CALCRECT ¸¦ ³Ö¾î ¾ò´Â´Ù.
    case FLayout of
      tlTop: MyRect.Top := MyRect.Top + FSpaces[1];
      tlCenter:
        begin
          DrawTextW(Canvas.Handle, PWideChar(sText), Length(sText), CalcRect, DrawStyle or DT_CALCRECT);
          OffsetRect(MyRect, 0, ((SrcRect.Bottom - CalcRect.Bottom) div 2) + FSpaces[1]);
        end;
      tlBottom:
        begin
          DrawTextW(Canvas.Handle, PWideChar(sText), Length(sText), CalcRect, DrawStyle or DT_CALCRECT);
          OffsetRect(MyRect, 0, SrcRect.Bottom - CalcRect.Bottom - FSpaces[1]);
        end;
    end;

    // Á¤ÇØÁø ¿µ¿ª¿¡ Unicode ¸¦ ±×¸°´Ù.
    DrawTextW(Canvas.Handle, PWideChar(sText), Length(sText), MyRect, DrawStyle);
  end;