123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?xml version="1.0" encoding="utf-8"?>
- <FDL version="1.4">
- <TypeDefinition url="..\..\..\default_typedef.xml"/>
- <Form id="SMSMP90108_PACS연계위젯" classname="SMSMP90108_PACS연계위젯" inheritanceid="" position="absolute 0 0 1024 768" titletext="New Form" onload="form_onload">
- <Layouts>
- <Layout>
- <Button id="btn_pop1" taborder="2" text="팝업1" onclick="btn_pop1_onclick" position="absolute 12 152 112 172"/>
- <Button id="btn_pop2" taborder="3" text="팝업2" onclick="btn_pop2_onclick" position="absolute 120 152 220 172"/>
- <Static id="Static00" text="PACS 연계위젯샘플" position="absolute 8 8 169 31"/>
- <Edit id="ipt_wparam" taborder="4" position="absolute 86 40 220 61"/>
- <Static id="Static01" text="wparam : " position="absolute 17 38 111 63"/>
- <Static id="Static02" text="lparam : " position="absolute 17 64 82 89"/>
- </Layout>
- </Layouts>
- <Script type="xscript4.0"><![CDATA[//=======================================================================================
- // Lib Include
- //---------------------------------------------------------------------------------------
- include "com_commonxp::comm_main.xjs"
- /****************************************************************************************
- * Argument :
- * Description : 시스템 헬퍼 관련 ocx 를 리턴한다.
- ****************************************************************************************/
- var axHelper = null;
- function getHelperObject(){
-
- // 객체가 널이면 생성하여 리턴한다.
- if (axHelper == null) {
-
- // 시스템 헬퍼관련 객체를 동적생성
- axHelper = new ActiveX("objHelper", 0,0,0,0);
- axHelper.progid = "{7ed5c30d-664e-4b8c-8629-5b787446b987}";
- this.addChild("objHelper", axHelper);
- axHelper.show();
- }
- return axHelper;
- }
- /****************************************************************************************
- * Argument :
- * Description : 폼 onload 이벤트에 대한 핸들러
- * 윈도우 핸들값을 가져와서 특정 레지스트리키에 세팅한다.
- * 외부프로그램에서 이 핸들값을 참조하여 윈도우 메세지를 보낸다.
- ****************************************************************************************/
- function form_onload(obj:Form, e:LoadEventInfo)
- {
- var helper = getHelperObject();
-
- // NSS 연계 초기화
- var sHWND = helper.getHWND();
- var nResult = helper.SetValueOfRegistry("HKEY_LOCAL_MACHINE", "SOFTWARE\\HIMED\\NSSMART", "Handle", "REG_DWORD", sHWND);
- if (nResult != 0)
- {
- messageBox("연계모듈이 구성되지","E007");
- }
-
- // 윈도우 메세지 핸들러 등록
- helper.setHandler("OnMessage", helper_onMessage);
- }
- /****************************************************************************************
- * Components : objActiveX
- * Components ID : helper
- * Event : onMessage
- * Argument : 01.objActiveX : ActiveX
- * : 02.axEventInfo
- * Description : 시스템헬퍼의 OnMessage 이벤트에 대한 핸들러 (윈도우메세지수신)
- ****************************************************************************************/
- function helper_onMessage(objActiveX, axEventInfo){
-
- var wparam = axEventInfo.wparam;
- var lparam = axEventInfo.lparam;
-
- trace("wparam: "+ axEventInfo.wparam +", lparam: "+axEventInfo.lparam);
-
- var helper = getHelperObject();
-
- var sDate = helper.GetValueOfRegistry("HKEY_LOCAL_MACHINE", "SOFTWARE\\HIMED\\PACS", "date");
- var sParam = helper.GetValueOfRegistry("HKEY_LOCAL_MACHINE", "SOFTWARE\\HIMED\\PACS", "param");
-
- alert("wparam: "+ wparam +", lparam: "+lparam+", date: "+ sDate+", param : "+ sParam);
-
- }
- function btn_pop1_onclick(obj:Button, e:ClickEventInfo)
- {
- frmf_open("SMZSA20300", "SMZSA20300", null, null, null, null, null, null, null, null, null, null, "M");
- }
- function btn_pop2_onclick(obj:Button, e:ClickEventInfo)
- {
- frmf_open("SMZSA20500", "SMZSA20500", null, null, null, null, null, null, null, null, null, null, "M");
- }
- ]]></Script>
- </Form>
- </FDL>
|