Search

#include "stdafx.h"
#include "ExThread.h"
#include "MyThread.h"
#include <process.h>

#ifdef _DEBUG
#define new DEBUG_NEW
#endif

CWinApp theApp;
using namespace std;

UINT WorkerThreadFunction(void *pData)
{
    printf("Worker Thread Function\n");
    return 0;
}

DWORD WINAPI ThreadFunction(void *pData)
{
    printf("Thread Function\n");
    return 0;
}

unsigned int WINAPI ThreadFunction2(void *pData)
{
    printf("Thread Function2\n");
    return 0;
}

/*
    사용자 인터페이스 쓰레드 (User Interface Thread) 생성
    설명의 편의상, 본 예제에서 사용되고 있는 CMyThread는 CWinThread를 상속받은 클래스라고 가정합니다.
*/
void Example1()
{
    CMyThread *p = NULL;

    /* 정지된 상태로 쓰레드를 생성함. */
    p = (CMyThread *) AfxBeginThread(RUNTIME_CLASS(CMyThread), 0, 0, CREATE_SUSPENDED);

    /* 쓰레드를 다시 시작함. */
    p->m_bAutoDelete=TRUE;
    p->ResumeThread();
    Sleep(3000);

    /* 다음과 같이 사용자 인터페이스 쓰레드는 메시지를 주고 받을 수 있습니다.   */
    p->PostThreadMessage(WM_QUIT, 0, 0);    /* UI 쓰레드 종료 메시지 전송 */
    WaitForSingleObject(p->m_hThread, INFINITE);
}

/*
    작업자 쓰레드 (Worker Thread) 생성
*/
void Example2()
{
    CWinThread *p = AfxBeginThread(WorkerThreadFunction, NULL);
    WaitForSingleObject(p->m_hThread, INFINITE);
}

void Example3()
{
    HANDLE h = CreateThread(NULL, 0, ThreadFunction, NULL, 0, NULL);
    WaitForSingleObject(h, INFINITE);
    CloseHandle(h);
}

void Example4()
{
    HANDLE h = (HANDLE)_beginthreadex(NULL, 0, ThreadFunction2, 0, 0, NULL);
    WaitForSingleObject(h, INFINITE);
    CloseHandle(h);
}

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
    Example1();
    Example2();
    Example3();
    Example4();

    printf("done\n");

    return 0;
}

'Program Visual C++' 카테고리의 다른 글

RAW Data Draw  (0) 2011.08.11
YUV to RGB ...  (0) 2011.08.10
AfxBeginThread 사용법?  (0) 2009.05.05
Microsoft Platform SDK  (0) 2009.02.25
RichEdit 관련  (0) 2008.02.29

The Winner Takes It All - ABBA

Music 2010. 10. 10. 21:16 Posted by HisPark


보안 문제로 관리자 아이디로는 embed를 볼 수 없습니다. 확인하시려면 다른 아이디로 접속하세요




The Winner Takes It All - ABBA

I don't wanna talk
About the things we've gone through
Though it's hurting me Now it's history
I've played all my cards
And that's what you've done too
Nothing more to say No more ace to play
The winner takes it all The loser standing small
Beside the victory That's her destiny

I was in your arms Thinking I belonged there
I figured it made sense Building me a fence
Building me a home Thinking I'd be strong there
But I was a fool Playing by the rules
The gods may throw a dice Their minds as cold as ice
And someone way down here Loses someone dear
The winner takes it all The loser has to fall

It's simple and it's plain Why should I complain.

But tell me does she kiss Like I used to kiss you?
Does it feel the same When she calls your name?
Somewhere deep inside You must know I miss you
But what can I say Rules must be obeyed
The judges will decide The likes of me abide
Spectators of the show Always staying low

The game is on again A lover or a friend
A big thing or a small The winner takes it al
I don't wanna talk If it makes you feel sad
And I understand You've come to shake my hand
I apologize If it makes you feel bad
Seeing me so tense No self-confidence



But you see The winner takes it all
The winner takes it all 

'Music' 카테고리의 다른 글

SOS - Pierce Brosnan &amp; Meryl Streep  (0) 2008.09.24
Sweet Sacrifice -by Evanescence  (0) 2007.10.05
We Got It Going On - by Bon Jovi with Big and Rich  (0) 2007.10.05
Kiss Your Past Good-bye - Aerosmith  (0) 2006.01.23
SOS -Abba  (0) 2005.11.10