'PROGRAMMING/api reference'에 해당되는 글 4건

  1. 2011.03.23 [Function] _beginthread, _beginthreadex
  2. 2011.03.23 [Function] InvalidateRect
  3. 2011.03.23 [Structure] TEXTMETRIC
  4. 2011.03.20 함수정리

■ _beginthread, _beginthreadex

스레드(thread)를 만든다.

 

■ Syntax

uintptr_t _beginthread( // NATIVE CODE
   void( __cdecl *start_address )( void * ),
   unsigned stack_size,
   void *arglist
);
uintptr_t _beginthread( // MANAGED CODE
   void( __clrcall *start_address )( void * ),
   unsigned stack_size,
   void *arglist
);
uintptr_t _beginthreadex( // NATIVE CODE
   void *security,
   unsigned stack_size,
   unsigned ( __stdcall *start_address )( void * ),
   void *arglist,
   unsigned initflag,
   unsigned *thrdaddr
);
uintptr_t _beginthreadex( // MANAGED CODE
   void *security,
   unsigned stack_size,
   unsigned ( __clrcall *start_address )( void * ),
   void *arglist,
   unsigned initflag,
   unsigned *thrdaddr
);

 

■ Parameters

1) start_address : 스레드가 시작되는 곳의 주소(스레드 함수에 대한 주소값)

2) stack_size : 새로운 스레드를 위한 스택의 크기 또는 0

3) arglist : 인수의 목록 또는 NULL (스레드 함수로 전달할 인수)

4) security

5) initflag

6) thrdaddr

 

 

출처: http://msdn.microsoft.com/en-us/library/kdzttdcb(v=VS.90).aspx

'PROGRAMMING > api reference' 카테고리의 다른 글

[Function] InvalidateRect  (0) 2011.03.23
[Structure] TEXTMETRIC  (0) 2011.03.23
함수정리  (0) 2011.03.20
Posted by 마마필로 :

■ InvalidateRect

특정한 윈도우의 업데이트 영역에 rectangle을 추가하는 함수. 업데이트 영역(update region, 무효화영역)이란 다시 그려질 필요가 있는

윈도우 클라이언트 영역의 한 부분을 말한다.

즉, InvalidateRect함수는 특정 영역을 다시 그리도록 해주는 함수이다.(무효화시킴)

 

■ Syntax

BOOL InvalidateRect(
  __in  HWND hWnd,
  __in  const RECT *lpRect,
  __in  BOOL bErase
);

 

■ Parameters

1) hWnd : 변화가 있어 업데이트해야할 윈도우 영역의 핸들. 이 파라미터 값이 NULL이면, 시스템은 이 응용프로그램뿐만 아니라

모든 윈도우를 무효화하고 다시 그린다. 또한, 함수를 리턴하기 전에 WM_ERASEBKGND 와 WM_NCPAINT 메시지를 보낸다.

이 파라미터를 NULL값으로 하는것은 추천하지 않는다.

 

2) lpRect : 무효화할 영역. 이 파라미터가 NULL일경우, 전체 클라이언트 영역이 무효화대상 영역이다.

 

3) bErase : 무효화 영역이 진행될 때 무효화영역 내의 배경을 지울것인가를 결정.

이 파라미터 값이 TRUE일 경우, 배경은 BeginPaint함수가 호출될때 지워지고, FALSE이면 배경은 그대로 남는다.

 

■ Return Value

함수가 성공이면 리턴값은 nonzero, 실패이면 0.

 

 

출처: http://msdn.microsoft.com/en-us/library/dd145002(VS.85).aspx


'PROGRAMMING > api reference' 카테고리의 다른 글

[Function] _beginthread, _beginthreadex  (0) 2011.03.23
[Structure] TEXTMETRIC  (0) 2011.03.23
함수정리  (0) 2011.03.20
Posted by 마마필로 :

TEXTMETRIC

실제적인 문자의 기본적인 정보를 포함하고 있는 구조체.

 

■ Syntax

typedef struct tagTEXTMETRIC {
  LONG  tmHeight;
  LONG  tmAscent;
  LONG  tmDescent;
  LONG  tmInternalLeading;
  LONG  tmExternalLeading;
  LONG  tmAveCharWidth;
  LONG  tmMaxCharWidth;
  LONG  tmWeight;
  LONG  tmOverhang;
  LONG  tmDigitizedAspectX;
  LONG  tmDigitizedAspectY;
  TCHAR tmFirstChar;
  TCHAR tmLastChar;
  TCHAR tmDefaultChar;
  TCHAR tmBreakChar;
  BYTE  tmItalic;
  BYTE  tmUnderlined;
  BYTE  tmStruckOut;
  BYTE  tmPitchAndFamily;
  BYTE  tmCharSet;
} TEXTMETRIC, *PTEXTMETRIC;

 

■ Members

tmHeight

The height (ascent + descent) of characters.

tmAscent

The ascent (units above the base line) of characters.

tmDescent

The descent (units below the base line) of characters.

tmInternalLeading

The amount of leading (space) inside the bounds set by the tmHeight member. Accent marks and other diacritical characters may occur in this area. The designer may set this member to zero.

tmExternalLeading

The amount of extra leading (space) that the application adds between rows. Since this area is outside the font, it contains no marks and is not altered by text output calls in either OPAQUE or TRANSPARENT mode. The designer may set this member to zero.

tmAveCharWidth

The average width of characters in the font (generally defined as the width of the letter x ). This value does not include the overhang required for bold or italic characters.

tmMaxCharWidth

The width of the widest character in the font.

tmWeight

The weight of the font.

tmOverhang

The extra width per string that may be added to some synthesized fonts. When synthesizing some attributes, such as bold or italic, graphics device interface (GDI) or a device may have to add width to a string on both a per-character and per-string basis. For example, GDI makes a string bold by expanding the spacing of each character and overstriking by an offset value; it italicizes a font by shearing the string. In either case, there is an overhang past the basic string. For bold strings, the overhang is the distance by which the overstrike is offset. For italic strings, the overhang is the amount the top of the font is sheared past the bottom of the font.

The tmOverhang member enables the application to determine how much of the character width returned by a GetTextExtentPoint32 function call on a single character is the actual character width and how much is the per-string extra width. The actual width is the extent minus the overhang.

tmDigitizedAspectX

The horizontal aspect of the device for which the font was designed.

tmDigitizedAspectY

The vertical aspect of the device for which the font was designed. The ratio of the tmDigitizedAspectX and tmDigitizedAspectY members is the aspect ratio of the device for which the font was designed.

tmFirstChar

The value of the first character defined in the font.

tmLastChar

The value of the last character defined in the font.

tmDefaultChar

The value of the character to be substituted for characters not in the font.

tmBreakChar

The value of the character that will be used to define word breaks for text justification.

tmItalic

Specifies an italic font if it is nonzero.

tmUnderlined

Specifies an underlined font if it is nonzero.

tmStruckOut

A strikeout font if it is nonzero.

tmPitchAndFamily

Specifies information about the pitch, the technology, and the family of a physical font.

The four low-order bits of this member specify information about the pitch and the technology of the font. A constant is defined for each of the four bits.

 

 

An application should carefully test for qualities encoded in these low-order bits, making no arbitrary assumptions. For example, besides having their own bits set, TrueType and PostScript fonts set the TMPF_VECTOR bit. A monospace bitmap font has all of these low-order bits clear; a proportional bitmap font sets the TMPF_FIXED_PITCH bit. A Postscript printer device font sets the TMPF_DEVICE, TMPF_VECTOR, and TMPF_FIXED_PITCH bits.

The four high-order bits of tmPitchAndFamily designate the font's font family. An application can use the value 0xF0 and the bitwise AND operator to mask out the four low-order bits of tmPitchAndFamily, thus obtaining a value that can be directly compared with font family names to find an identical match. For information about font families, see the description of the LOGFONT structure.

tmCharSet

The character set of the font. The character set can be one of the following values.

  • ANSI_CHARSET
  • BALTIC_CHARSET
  • CHINESEBIG5_CHARSET
  • DEFAULT_CHARSET
  • EASTEUROPE_CHARSET
  • GB2312_CHARSET
  • GREEK_CHARSET
  • HANGUL_CHARSET
  • MAC_CHARSET
  • OEM_CHARSET
  • RUSSIAN_CHARSET
  • SHIFTJIS_CHARSET
  • SYMBOL_CHARSET
  • TURKISH_CHARSET
  • VIETNAMESE_CHARSET

Korean language edition of Windows:

  • JOHAB_CHARSET

Middle East language edition of Windows:

  • ARABIC_CHARSET

  • HEBREW_CHARSET

Thai language edition of Windows:

  • THAI_CHARSET

□ 참고

 

이미지출처: http://blog.naver.com/tais11/40110366169

 

 

원문출처: http://msdn.microsoft.com/en-us/library/dd145132(v=VS.85).aspx

 

'PROGRAMMING > api reference' 카테고리의 다른 글

[Function] _beginthread, _beginthreadex  (0) 2011.03.23
[Function] InvalidateRect  (0) 2011.03.23
함수정리  (0) 2011.03.20
Posted by 마마필로 :

함수정리

2011. 3. 20. 00:38 from PROGRAMMING/api reference

BeginPaint : 프로그램에서 DC구조체로 연결하는 시점(아직 값이 채워지지는 않음)
GetClientRect: 사각영역(Client영역)을 가져옴. 구조체 값을 가져와서 채우는 함수
(창의 크기를 늘리고 줄일때 text(context)와의 비율을 일정하게 유지하기 위해 사용)
TextOut: 클라이언트 영역에만 출력가능
-->TextOut함수는 GetDC를 이용하는 문자출력 함수로, GetDC로 만든 문자열은 다른 윈도우에 의해 사라진다.

struct/functions/messages로 구분? 말머리?


'PROGRAMMING > api reference' 카테고리의 다른 글

[Function] _beginthread, _beginthreadex  (0) 2011.03.23
[Function] InvalidateRect  (0) 2011.03.23
[Structure] TEXTMETRIC  (0) 2011.03.23
Posted by 마마필로 :