DisplayText() 함수
- Library/winsock
- 2009. 7. 14.
Winsock32 Library 를 사용하면서 생기는 문제점.
그리고 Vs6.0 을 사용하다가 2005를 사용할때 가끔씩 에러가 뜬다!!!!!!!!!!!!!!!!!!!!1
시뿔!! 뿔! 에러지 당연 -_-;;
//------------------------------------------------------------
void DisplayText( char *fmt, ... )
{
int Lines;
Lines = SendMessage( g_hEdit1, EM_GETLINECOUNT , 0, 0 );
if( Lines > 400 )
SetWindowText( g_hEdit1, " " );
va_list arg;
va_start( arg, fmt );
char cbuf[BUFSIZE];
//vswprintf( cbuf, fmt, arg ); // 요기서 에러가 나는데...(에러가 안날때도 있다? 이유는 모르지만)
wsprintf(cbuf,"%s", fmt); // 그냥 이함수로 글자를 출력했다.
// 그냥~ 출력하는건 내맘이니껀~ 이렇게 해두 상관없지뭐 씨뿔~뿔 에러! 췻..
int nLength = GetWindowTextLength( g_hEdit1 );
SendMessage( g_hEdit1, EM_SETSEL, nLength, nLength );
SendMessage( g_hEdit1, EM_REPLACESEL, FALSE, (LPARAM)cbuf );
SendMessage( g_hEdit1, EM_REPLACESEL, FALSE, (LPARAM)"\r\n" );
va_end(arg);
}
'Library > winsock' 카테고리의 다른 글
[C] 소켓으로 웹 연결하기 (0) | 2010.01.23 |
---|---|
[C] Critical Section (0) | 2009.04.20 |
TCP_Server, TCP_Client (API 모드) (0) | 2008.03.01 |
UDP_EventSelectServer,UDP_EventSelectClient (0) | 2008.02.29 |