2009년 3월 30일 월요일

[C#]입력된 int를 LWORD 또는 HWORD로 전환하기

다음 method를 이용하면 원하는 대로 수정이 가능하다.

public IntPtr MakeLParam(int LoWord, int HiWord)
{
return (IntPtr)((HiWord << 16) | (LoWord & 0xffff));
}


이 method는 다음 처럼 사용하여야 한다.

private void buttonSaveNNext_Click(object sender, System.EventArgs e)
{
public uint g_WMReqPACSOperation;
g_WMReqPACSOperation = RegisterWindowMessage("Save and Next");

if (Save() && g_strStudyKey != string.Empty)
{
MakeLParam(0, 2);
IntPtr lParam = ICode.MakeLParam(0, 2);
SendMessage(g_WMReqPACSOperation, g_strStudyKey, lParam);
}
}

0 개의 댓글:

댓글 쓰기