자바빈즈 태그 설명 DarkKaiser, 2007년 7월 1일2023년 9월 6일 <jsp:useBean/> 태그 <jsp:useBean id=”자바빈 ID” class=”자바빈 클래스 이름” scope=”scope 영역 지정”/> /* 아래 두 문장은 같은 의미이다. */ <jsp:useBean id="customer" class="mybean.customer.CustomerBean"/> mybean.customer.CustomerBean = new mybean.customer.CustomerBean(); 만약 자바빈 클래스 파일을 불러오면서 초기화할 내용이 있다면 <jsp:useBean/>을 시작 태그와 종료 태그 형태로 쓴 다음 가운데 초기화할 내용을 적어주면 됩니다. <jsp:useBean> ... 초기화할 내용 Continue Reading
웹로직에서 JSP 파일의 컴파일 결과가 저장되는 폴더 DarkKaiser, 2007년 7월 1일2023년 9월 4일 서버 이름이 myserver이고 웹 애플리케이션 모듈의 이름이 study라고 할 때, JSP 파일이 컴파일 된 클래스 파일이 위치하는 곳은 \mydomain\myserver\.wlnotdelete\extract\myserver_study_web\jsp_servlet\ 에 위치한다. 만약 JSP 파일의 중간 생성 파일(.java)을 얻고자 할 경우에는 웹로직에서 설정을 잡아주어야 한다.해당 웹 애플리케이션 모듈을 선택하고 나서 구성>디스크립터 페이지에서 아래 JSP 생성 유지의 체크박스를 체크하면 중간 생성 Continue Reading
Adding Most Recently Used(MRU)FilestoanSDI/MDI Application DarkKaiser, 2007년 7월 1일2023년 9월 6일 Adding MRU to MFC SDI or MDI is actually not very difficult. I just add ?AddToRecentFileList(LPCTSTR lpszPathName) to ?CDocument derived class which calls the add the path name to ?CWinApp’s ?CRecentFileList (m_pRecentFileList). I use SDI for this demo. 1. Iinclude afxadv.h to stdafx.h. This contains the Continue Reading
프로젝트에 WindowsXP 테마 스타일 적용하기 DarkKaiser, 2007년 7월 1일2023년 9월 6일 윈XP의 화려한 UI를 사용해 보자. 아래를 따라해보자. 1. 우선 여러분의 프로젝트에서 리소스를 새로 추가한다. 이때 “Custom”을 선택하여 리소스 타입에 “24”라고 입력한다.2. 에디터에 아래의 XML 구문을 복사하여 붙여넣는다. <?xml version="1.0" encoding="UTF-8" standalone="yes"?<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"<assemblyIdentity processorArchitecture="x86" version="5.1.0.0" type="win32" name="test.exe"/<descriptionTest Application</description<dependency<dependentAssembly<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" Continue Reading
언어별 리소스 블럭 DarkKaiser, 2007년 7월 1일2023년 9월 4일 한글 리소스 블럭 ///////////////////////////////////////////////////////////////////////////// // Korean resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR) #ifdef _WIN32 LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT #pragma code_page(949) #endif //_WIN32 ... #endif 일본어 리소스 블럭 ///////////////////////////////////////////////////////////////////////////// // Japanese resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN) #ifdef _WIN32 LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT #pragma code_page(932) #endif //_WIN32 ... #endif 영어 리소스 블럭 ///////////////////////////////////////////////////////////////////////////// // English Continue Reading
서브클래싱 컨트롤에 마우스 Hover/Leave 구현 DarkKaiser, 2007년 7월 1일2023년 9월 4일 마우스 Hover, Leave를 구현하고자 하는 서브클래싱된 컨트롤의 헤더 파일에 아래의 두 함수를 추가하도록 한다. //{{AFX_MSG(CHoverButton) afx_msg LRESULT OnMouseLeave(WPARAM wparam, LPARAM lparam); afx_msg void OnMouseHover(WPARAM wparam, LPARAM lparam); //}}AFX_MSG 다음으로 소스파일의 메시지맵에 메시지에 대한 함수를 연결하도록 한다. BEGIN_MESSAGE_MAP(CHoverButton, CButton) ON_MESSAGE(WM_MOUSELEAVE, OnMouseLeave) ON_MESSAGE(WM_MOUSEHOVER, OnMouseHover) END_MESSAGE_MAP() 다음으로 실제 함수를 구현해주면 된다. void CHoverButton::OnMouseHover(WPARAM Continue Reading
MDI 프로젝트에서 프로그램 실행시 빈 자식창 안뜨게 하기 DarkKaiser, 2007년 7월 1일2023년 9월 5일 /* Parse command line for standard shell commands, DDE, file open */ CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); /* 프로그램 시작시 자식창이 바로 오픈되지 않도록 한다. */ cmdInfo.m_nShellCommand = cmdInfo.FileNothing; /* Dispatch commands specified on the command line */ if (!ProcessShellCommand(cmdInfo)) return FALSE; Continue Reading
std::auto_ptr DarkKaiser, 2007년 7월 1일2023년 9월 5일 가리키고 있는 대상에 대해 소멸자가 자동으로 delete를 불러주도록 설계되어 있는 스마트 포인터 auto_ptr은 자신이 소멸될 때 자신이 가리키고 있는 대상에 대해 자동으로 delete를 먹이기 때문에, 어떤 객체를 가리키는 auto_ptr의 개수가 둘 이상이면 절대로 안된다. auto_ptr 객체를 복사하면(복사 생성자 혹은 복사 대입 연산자를 통해) 원본 객체는 null로 바뀐다. STL 컨테이너의 경우엔 Continue Reading