반응형

The full sequence of events fired for a Window object are as follows.

On application startup, if the Window is the application’s main window.

(Application events are also shown in the correct sequence).

  • Application.Startup
  • Window.Initialized
  • Window.IsVisibleChanged
  • Window.SizeChanged
  • Window.LayoutUpdated
  • Window.SourceInitialized
  • Application.Activated
  • Window.Activated
  • Window.PreviewGotKeyboardFocus
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusedChanged
  • Window.GotKeyboardFocus
  • Window.LayoutUpdated
  • Window.Loaded
  • Window.ContentRendered

On normal application shutdown, the event sequence is:

  • Window.Closing
  • Window.IsVisibleChanged
  • Window.Deactivated
  • Application.Deactivated
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusedChanged
  • Window.LostKeyboardFocus
  • Window.Closed
  • Application.Exit

When application/window loses focus (user switches to another application):

  • Window.Deactivated
  • Application.Deactivated
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusedChanged
  • Window.LostKeyboardFocus

When application/window gains focus (user switches back to application):

  • Application.Activated
  • Window.Activated
  • Window.PreviewGotKeyboardFocus
  • Window.IsKeyboardFocusWithinChanged
  • Window.IsKeyboardFocusChanged
  • Window.GotKeyboardFocus

 

When Developing Windows Applications using Windows Forms,

you will most likely find yourself needing to make user of the form’s

events, and this requires you to know when each form event fires.

In this short reference artivle I will show you the sequence of the form

events when the Form is being started and when it is being shut down.

 

When Form Start up

  • Control.HandleCreated
  • Control.BindingContextChanged
  • Form.Load
  • Control.VisibleChanged
  • Form.Activated
  • Form.Shown

When Form Shutdown

  • Form.Closing
  • Form.FormClosing
  • Form.Closed
  • Form.FormClosed
  • Form.Deactivate

참고

http://wpf.2000things.com/2012/07/30/613-window-event-sequence/

http://www.daveoncsharp.com/2009/06/windows-forms-event-sequence/

반응형
반응형

Uzbekistan's soccer team arrives for World Cup qualifier

 

image

 

Uzbekistan's national football team arrives in Seoul on June 9, 2013 for a World Cup qualifier on June 11 against South Korea. South Korea currently leads Group A in the qualification round for the 2014 World Cup in Brazil, followed by Uzbekistan.

Monday, Jun 10, 2013

 

‘축구공 가득 들고’

우즈베키스탄 축구 대표팀 선수들이 9일 오후 인천공항을 통해 입국, 자리에 앉아 휴식을 취하고 있다. 최강희 감독이 이끄는 한국 축구 대표팀은 오는 11일 오후 8시 서울월드컵경기장에서 우즈베키스탄과 2014 브라질월드컵 아시아지역 최종예선 7차전을 치른다.

2013-06-10 (월요일)

Word  

arrives

v, (특히 여정 끝에) 도착하다.
arrived – arrived - arriving

I'll wait until they arrive.
난 그들이 도착할 때까지 기다릴 것이다.
I was pleased to hear you arrived home safely.
네가 집에 무사히 도착했다는 소식을 듣고 기뻤어.

qualifier

n, 예선 통과자

a World Cup qualifier
월드컵 예선 경기

against

prep,~에 반대하여[맞서] 관습, 관례

the fight against terrorism
대테러전
We're playing against the league champions next week.
우리는 다음주에 리그전 챔피언들과 시합을 한다.

currently

ad, 현재, 지금

The hourly charge is currently £35.
시간당 수수료는 현재 35파운드이다.
Currently, over 500 students are enrolled on the course.
현재 그 과정에는 500명이 넘는 학생이 등록되어 있다.

leads

v, (앞장서서) 안내하다
led – led – leading, 3인칭 단수 현재 leads

He led us out into the grounds.
그가 우리를 이끌고 운동장으로 나갔다.
The receptionist led the way to the boardroom.
안내실 직원이 중역실로 가는 길을 안내해 주었다.

qualification

n, 자격[자격증]

In this job, experience counts for more than paper qualifications.
이 일에서는 경험이 서류상의 자격증보다 더 중요하다.
academic/educational/professional/vocational qualifications
학위증[졸업 증서]/교육 이수증/전문 자격증/취업 자격증

followed v, (의 뒤를) 따라가다
followed – followed – following

He followed her into the house.
그가 그녀 뒤를 따라 집 안으로 들어왔다.
Follow me please. I'll show you the way.
따라오세요. 길을 알려 드릴게요.

 

참고 : www.arirang.co.kr

         http://endic.naver.com

반응형
반응형

C Language String Types and Classes

String Type

Description

char/wchar/TCHAR The C strings for ANSI and Unicode
CString The C++/MFC class wrapper for C strings
BSTR The Visual Basic string type
_bstr_t A C++ class wrapper for the Visual Basic string type
CComBSTR Yet another C++ class wrapper for the Visual Basic string type used predominately in ATL code

 

Demo Code

 

BSTR to CString and CString to BSTR

 

void BSTRtoCString(BSTR bStr){
    CString csStr =bStr;
}

void CStringtoBSTR()
{
    CString csStr = NULL;

    csStr = "Hello BelieveIT!";

    BSTR bStr = csStr.AllocSysString();

    BSTRtoCString(bStr);

    ::SysFreeString(bStr); //finished using the BSTR

}

 

Base Code

BSTR GetBSTR()
{
    _bstr_t bstrt(_T("This is the test string!"));

    BSTR bstr;

    bstr = bstrt.copy();

    return bstr;
}

CComBSTR GetComBSTR()
{
    CComBSTR bstr("This is the test string!");

    return bstr;

}

void ShowBSTR(BSTR bstr)
{
    _bstr_t bstrt(bstr);

    CString cstr;

    cstr.Format(_T("%s"),(LPCTSTR)bstrt);

    AfxMessageBox(cstr);

}

 

Conversions Code

 

_bstr_t BSTRto_bstr_t()
{
    BSTR bstr = GetBSTR();

    _bstr_t bstrFinal(bstr);

    ShowBSTR(bstrFinal);

    bstrFinal = bstr;

    return bstrFinal;
}

 

BSTR _bstr_ttoBSTR()
{
    _bstr_t bstr(_T("This is Converting string"));

    BSTR bstrFinish;

    bstrFinish = bstr.copy();

    ShowBSTR(bstrFinish);

    bstrFinish = bstr;

    return bstrFinish;

}

 

BSTR CComBSTRtoBSTR()
{
    CComBSTR bstr(_T("This is Converting string"));

    BSTR bstrFinish;

    bstrFinish = bstr;

    ShowBSTR(bstrFinish);

    bstrFinish = bstr.Copy();

    return bstrFinish;

}

 

CComBSTR _bstr_ttoCComBSTR()
{
    _bstr_t bstr(_T("This is Converting string"));

    CComBSTR bstrFinish;

    bstrFinish.AppendBSTR(bstr);

    return bstrFinish;

}

 

CString BSTRtoCString()
{
    //conversion that only works in Unicode
    BSTR bstr;

    bstr = GetBSTR();

    TCHAR szFinal[255] = {0,};

    _stprintf(szFinal, _T("%s"), (LPCTSTR)bstr);

    AfxMessageBox(szFinal);

    _bstr_t bstrIntermediate(bstr);

    CString strFinal;

    _stprintf(szFinal, _T("%s"), (LPCTSTR)bstrIntermediate);

    strFinal.Format(_T("%s"),(LPCTSTR)bstrIntermediate);

    return strFinal;

}

 

CString _bstr_ttoCString()
{
    _bstr_t bstr(_T("This is Converting string"));

    TCHAR szFinal[255] = {0,};

    _stprintf(szFinal,_T("%s"),(LPCTSTR)bstr);

    return szFinal;
}

 

LPCTSTR CComBSTRtoLPCTSTR()
{

    CComBSTR bstr("This is Converting string");

    _bstr_t bstrIntermediate(bstr);

    TCHAR szFinal[255] = {0,};

    _stprintf(szFinal, _T("%s"),(LPCTSTR)bstrIntermediate);

    return szFinal;
}

 

_bstr_t LPCTSTRto_bstr_t()
{
    LPCTSTR szStart = _T("This is Converting string");

    _bstr_t bstrFinal(szStart);

    ShowBSTR(bstrFinal);

    bstrFinal = szStart;

    return bstrFinal;
}

 

CComBSTR LPCTSTRtoComBSTR()
{
    LPCTSTR szStart = _T("This is Converting string");

    CComBSTR bstrFinal(szStart);

    ShowBSTR(bstrFinal);

    bstrFinal.Empty();

    bstrFinal.Append(szStart);

    return bstrFinal;
}

 

[ Reference ]

http://blog.naver.com/mismir?Redirect=Log&logNo=40013446819
http://www.codeproject.com/Articles/1282/Easy-way-to-manipulate-BSTR-using-CString-class

반응형

+ Recent posts