일요일, 9월 09, 2007

일기 (2007.09.08)

:: 서울대공원에서... ^___^
- 딥다 많구나... 사진이... -_-;

일단 대문...





















































































































































목요일, 9월 06, 2007

일기 (2007.09.06)

오래된 사진...

일기 (2007.09.05)

:: 아이비(IVY) 싸인
우리 사업부 같은 층 피부과에 아이비(IVY) 가 왔다가 같은 팀 직원에게 싸인 해줌.
-_-; 부럽군...

구경 하시라~ 아이비(IVY) 싸인을...

월요일, 8월 20, 2007

Ads. UNIQLOCK Japan

:: UNIQLOCK
http://www.uniqlo.jp/uniqlock/

월요일, 8월 13, 2007

일기 (2007.08.13)

:: 도전하고 실패하라.
Try and fail, but don't fail to try.
- Stephen Kaggwa
I can accept failure, but I can't accept not trying.
- Michael Jordan

:: 오늘 하루가 낫다.
There is only one time that is important - NOW!
It is the most important time because it is the only time that we have any power.
- Tolstoy

:: 어려운 일과 쉬운 일.
Do the hard jobs first. The easy jobs will take care of themselves.
Don't be afraid to give your best to what seemingly are small jobs.

일요일, 7월 08, 2007

일기 (2007.07.08)

오늘 학도, 형진(with girl friend) 과 함께 '도가니탕' 을 먹으러 감사원 근처 식당에 갔다.
친구들 기다리는 동안 감사원 근처 '삼청공원' 에서 접사를 연습했다.





솜씨가 제법이지 않나 ? ^____^

월요일, 7월 02, 2007

Irrlicht + ActiveX (Internet Explorer) = ? (project linked)

***************************************************************************
// New Code
// Date: July.06.2007
// Author : June (godmode2k@hotmail.com | MSN)
***************************************************************************
Code:

//! ~Ctl.h
// ---------------------------------------------------------------
class ~Ctrl : public COleControl
{
public:
...
// ADD [
HWND m_hWnd;
HWND m_hIrrlichtWindow;
HINSTANCE m_hInstance;
bool m_IsFirst; // set flag, at drawing first time via OnDraw(...)
void EngineTest(CWnd* cWnd);
// ]
...
};
// ---------------------------------------------------------------


Code:

//! ~Ctl.cpp
// ---------------------------------------------------------------
// Global Variable
#include "stdafx.h"
#include "~.h"
#include "~Ctl.h"
#include "~Ppg.h"

//! Here !
#include

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

// 3D Engine Test
// -----------------------------------------------------------------------------
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#pragma comment(lib, "Irrlicht.lib")

video::IVideoDriver* driver = 0;
IGUIEnvironment* env = 0;
scene::ISceneManager* smgr = 0;
s32 cnt = 0;
IGUIListBox* listbox = 0;
HWND g_hWnd;
// -----------------------------------------------------------------------------
...

CTest_engine_activex_vc60Ctrl::CTest_engine_activex_vc60Ctrl()
{
InitializeIIDs(&IID_DTest_engine_activex_vc60, &IID_DTest_engine_activex_vc60Events);

// TODO: Initialize your control's instance data here.

// ADD [
m_IsFirst = true;
// ]
}

void ~Ctrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
// TODO: Replace the following code with your own drawing code.
// pdc->FillRect(rcBounds, CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH)));
// pdc->Ellipse(rcBounds);

// ADD [
if( m_IsFirst ) {
m_IsFirst = false;
EngineTest( pdc->GetWindow() );
}
// ]


//! EventReceiver
// Yes, you using your own EventReceiver class as before.
// ADD [
class MyEventReceiver : public IEventReceiver
{
private:
bool m_isRender;
IrrlichtDevice* device;
public:
void setDevice(IrrlichtDevice* v) { device = v; }
void setRender(bool v) { m_isRender = v; }
bool getRender(void) { return m_isRender; }

virtual bool OnEvent(SEvent event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = device->getGUIEnvironment();

switch(event.GUIEvent.EventType)
{
case EGET_SCROLL_BAR_CHANGED:
if (id == 104)
{
s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();

for (u32 i=0; i {
SColor col = env->getSkin()->getColor((EGUI_DEFAULT_COLOR)i);
col.setAlpha(pos);
env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col);
}

}
break;
case EGET_BUTTON_CLICKED:
if (id == 101)
{
setRender( false );
return true;
}
default:
break;
}
}

return false;
}
...
};
// ]

void ~Ctrl::EngineTest(CWnd* cWnd)
{
// ADD [
//! Set for Child Window as a Button
// -----------------------------------------
video::E_DRIVER_TYPE driverType;
driverType = video::EDT_OPENGL;
MyEventReceiver receiver;

irr::SIrrlichtCreationParameters param;
m_hWnd = cWnd->m_hWnd;
m_hInstance = AfxGetInstanceHandle();

m_hIrrlichtWindow = CreateWindow("BUTTON", "Test Engine On The ActiveX", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, 10, 200, 640, 480, m_hWnd, NULL, m_hInstance, NULL);
param.WindowId = reinterpret_cast( m_hIrrlichtWindow );
param.DriverType = driverType;
IrrlichtDevice* device = irr::createDeviceEx( param );

receiver.setDevice( device );
receiver.setRender( true );
device->setEventReceiver(&receiver);

// -----------------------------------------
// Your code
// -----------------------------------------

//! Prepare to Rendering
// -----------------------------------------
g_hWnd = m_hWnd;
::ShowWindow( m_hIrrlichtWindow , SW_SHOW );
::UpdateWindow( m_hIrrlichtWindow );

while( device->run() && driver ) {
if( !receiver.getRender() ) { break; }
//! "isWindowActivate()" isn't work here.
//if( device->isWindowActive() ) {
driver->beginScene(true, true, SColor(0,200,200,200));
smgr->drawAll();
env->drawAll();
driver->endScene();

//! ^___^
::UpdateWindow( m_hIrrlichtWindow );
//}
}
// ]

device->closeDevice();
device->drop();
}

//! Mouse Event
// ClassWizard -> add Message "WM_MOUSEACTIVATE"
int ~Ctrl::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
// TODO: Add your message handler code here and/or call default

// ADD [
OnActivateInPlace( true, NULL );
// ]

return COleControl::OnMouseActivate(pDesktopWnd, nHitTest, message);
}
// ---------------------------------------------------------------



***************************************************************************


***************************************************************************
// Source: posted in Irrlicht forum, see below link.
// http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=22652&start=0&postdays=0&postorder=asc&highlight=
***************************************************************************
Answer is ******. lol
but it works fine !

// ---------------------------------------------------------------
// Project: You wanna Rendering 3D materials using Irrlicht on the Web ?
// ---------------------------------------------------------------
// Purpose: Irrlicht as ActiveX Control on the Web Browser such as Internet Explorer.
// Author : June (godmode2k@hotmail.com | MSN)
// Date : July. 2nd. 2007, KST
// ---------------------------------------------------------------
// Note : Ready ?
// Update:
// + August 28, 2008:
// 1. You can check out full of source code relevant this thread below link.
// http://code.google.com/p/gedk/downloads/list
// ---------------------------------------------------------------

Q: I don't know how to create an ActiveX Control with Visual C++ !!!
A: Don't worry baby. See below site.
http://www.codeguru.com/cpp/com-tech/activex/
http://www.codeproject.com/KB/COM/CompleteActiveX.aspx

[STEP #1]
Make an ActiveX Control using MS-VC++ (6.0 or whatever) where Project - > "MFC ActiveX ControlWizard" tab.
Its done ?

[STEP #2]
Adds below code.

Code:

//! ~Ctl.h
// ---------------------------------------------------------------
class ~Ctrl : public COleControl
{
public:
...
// ADD [
HWND m_hWnd;
HWND m_hIrrlichtWindow;
HINSTANCE m_hInstance;
bool m_IsFirst; // set flag, at drawing first time via OnDraw(...)
void EngineTest(CWnd* cWnd);
// ]
...
};
// ---------------------------------------------------------------


Code:

//! ~Ctl.cpp
// ---------------------------------------------------------------
// Global Variable
#include "stdafx.h"
#include "~.h"
#include "~Ctl.h"
#include "~Ppg.h"

//! Here !
#include

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

// 3D Engine Test
// -----------------------------------------------------------------------------
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;

#pragma comment(lib, "Irrlicht.lib")

IrrlichtDevice *device = 0;
video::IVideoDriver* driver = 0;
IGUIEnvironment* env = 0;
scene::ISceneManager* smgr = 0;
s32 cnt = 0;
IGUIListBox* listbox = 0;
HWND g_hWnd;
// -----------------------------------------------------------------------------
...

CTest_engine_activex_vc60Ctrl::CTest_engine_activex_vc60Ctrl()
{
InitializeIIDs(&IID_DTest_engine_activex_vc60, &IID_DTest_engine_activex_vc60Events);

// TODO: Initialize your control's instance data here.

// ADD [
m_IsFirst = true;
// ]
}

void ~Ctrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
// TODO: Replace the following code with your own drawing code.
// pdc->FillRect(rcBounds, CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH)));
// pdc->Ellipse(rcBounds);

// ADD [
if( m_IsFirst ) {
m_IsFirst = false;
EngineTest( pdc->GetWindow() );
}
// ]


//! EventReceiver
// Yes, you using your own EventReceiver class as before.
// ADD [
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
...
}
...
};
// ]

void ~Ctrl::EngineTest(CWnd* cWnd)
{
// ADD [
//! Set for Child Window as a Button
// -----------------------------------------
video::E_DRIVER_TYPE driverType;
driverType = video::EDT_OPENGL;
MyEventReceiver receiver;

irr::SIrrlichtCreationParameters param;
m_hWnd = cWnd->m_hWnd;
m_hInstance = AfxGetInstanceHandle();

m_hIrrlichtWindow = CreateWindow("BUTTON", "Test Engine On The ActiveX", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, 10, 200, 640, 480, m_hWnd, NULL, m_hInstance, NULL);
param.WindowId = reinterpret_cast( m_hIrrlichtWindow );
param.DriverType = driverType;
device = createDeviceEx( param );
device->setEventReceiver(&receiver);

// -----------------------------------------
// Your code
// -----------------------------------------

//! Prepare to Rendering
// -----------------------------------------
g_hWnd = m_hWnd;
::ShowWindow( m_hIrrlichtWindow , SW_SHOW );
::UpdateWindow( m_hIrrlichtWindow );

while( device->run() && driver ) {
//! "isWindowActivate()" isn't work here.
//if( device->isWindowActive() ) {
driver->beginScene(true, true, SColor(0,200,200,200));
smgr->drawAll();
env->drawAll();
driver->endScene();

//! ^___^
::UpdateWindow( m_hIrrlichtWindow );
//}
}
// ]
}

//! Mouse Event
// ClassWizard -> add Message "WM_MOUSEACTIVATE"
int ~Ctrl::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
// TODO: Add your message handler code here and/or call default

// ADD [
OnActivateInPlace( true, NULL );
// ]

return COleControl::OnMouseActivate(pDesktopWnd, nHitTest, message);
}
// ---------------------------------------------------------------


* Screenshot *