DCGUILuaGlues.EnableRenderEvent("dialog", "listbox", true); -- dialog라는 다이얼로그에 있는 listbox라는 컨트롤의 렌더 이벤트 처리를 활성화 시킨다.
DCGUILuaGlues.EnableWndProcEvent("dialog", "listbox", true); -- dialog라는 다이얼로그에 있는 listbox라는 컨트롤의 메시지 이벤트 처리를 활성화 시킨다.
DCGUILuaGlues.EnableCallBackFromDialogEvent(true); -- GUI 매니저의 이벤트 처리기를 활성화 시킨다.
-- 타이머 설치
DCGUILuaGlues.SetTimer("dialog", "listbox", 1, 0.5);
DCGUILuaGlues.SetTimer("dialog", "listbox", 2, 1.0);
DCGUILuaGlues.SetTimer("dialog", "listbox", 3, 3.0);
-- WndProc 이벤트 처리기
function dialoglistboxWndProc(Message, wParam, lParam)
if Message == 275 --[[WM_TIMER--]] then
local f;
if wParam == 1 then
f = io.open("aa.txt", "ab");
DCGUILuaGlues.KillTimer("dialog", "listbox", wParam);
DCGUILuaGlues.DeleteChildWindow("dialog", "listbox");
elseif wParam == 2 then
f = io.open("bb.txt", "ab");
else
f = io.open("cc.txt", "ab");
end
f:write(wParam .. "\r\n");
f:close();
end
return false;
end
-- Render 이벤트 처리기
function dialoglistboxRender(fDeltaTime)
local f = io.open("aa.txt", "ab");
f:write(fDeltaTime .. "\r\n");
f:close();
return false;
end
-- 매니저의 이벤트 처리기
function ManagerCallBackFromDialog(strDlgName, strCtlName, Message, wParam, lParam)
if strDlgName == "dialog" and strCtlName == "scroll" and Message == 2026 --[[WM_SCROLL--]] then
local nPos;
ret, nPos = DCGUILuaGlues.GetThumbPos(strDlgName, strCtlName);
DCGUILuaGlues.SetThumbPos("dialog", "progress", nPos);
end
if strDlgName == "dialog2" and strCtlName == "slider" and Message == 2026 --[[WM_SCROLL--]] then
local nPos;
ret, nPos = DCGUILuaGlues.GetThumbPos(strDlgName, strCtlName);
DCGUILuaGlues.SetWindowText("dialog", "updown", tostring(nPos));
end
if strDlgName == "dialog2" and strCtlName == "button" and Message == 273 --[[WM_COMMAND--]] then
DCGUILuaGlues.DeleteText("dialog", "listbox");
DCGUILuaGlues.DeleteChildWindow("dialog2", "button");
end
return false;
end
댓글을 달아 주세요
야이 삐리리야! 심장 안 좋은 사람은 more.. 눌러보지 않도록 경고문을 써놨어야 할 것 아냐! 싸이버 수사대에 살포시 꼰질러줄테닷!
훗. 걸려들었군 ㅋㅋ