version 1.2, 2002/07/30 03:06:20 |
version 1.5, 2002/10/03 03:05:44 |
|
|
#include "ca.h" |
#include "ca.h" |
#include "ifplot.h" |
#include "ifplot.h" |
|
|
|
extern HANDLE hCanvasCreated; |
|
extern HANDLE hMainThreadReady; |
extern HANDLE hStreamNotify; |
extern HANDLE hStreamNotify; |
extern HANDLE hStreamNotify_Ack; |
extern HANDLE hStreamNotify_Ack; |
extern DWORD MainThread; |
extern DWORD MainThread; |
Line 85 BOOL COx_plotApp::InitInstance() |
|
Line 87 BOOL COx_plotApp::InitInstance() |
|
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, |
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, |
NULL); |
NULL); |
MainThread = m_nThreadID; |
MainThread = m_nThreadID; |
|
SetEvent(hMainThreadReady); |
|
|
// メイン ウィンドウが初期化されたので、表示と更新を行います。 |
// メイン ウィンドウが初期化されたので、表示と更新を行います。 |
// pFrame->ShowWindow(SW_SHOW); |
// pFrame->ShowWindow(SW_SHOW); |
Line 160 BOOL COx_plotApp::PreTranslateMessage(MSG* pMsg) |
|
Line 163 BOOL COx_plotApp::PreTranslateMessage(MSG* pMsg) |
|
{ |
{ |
// TODO: この位置に固有の処理を追加するか、または基本クラスを呼び出してください |
// TODO: この位置に固有の処理を追加するか、または基本クラスを呼び出してください |
CMainFrame *pFrame; |
CMainFrame *pFrame; |
struct canvas *can; |
|
|
|
switch ( pMsg->message ) { |
if ( pMsg->message == WM_APP ) { |
case WM_APP: // copy to canvas |
struct canvas *can; |
can = canvas[pMsg->wParam]; |
|
if ( !can->window ) { |
|
pFrame = new CMainFrame; |
|
/* XXX */ |
|
pFrame->m_pWindowName = |
|
(char *)malloc(MAX(strlen(can->wname),strlen("ox_plot"))+10); |
|
sprintf(pFrame->m_pWindowName,"%s : %d", |
|
strlen(can->wname)?can->wname:"ox_plot",can->index); |
|
|
|
pFrame->m_cansize.cx = can->width; |
can = canvas[pMsg->wParam]; |
pFrame->m_cansize.cy = can->height; |
if ( !can->window ) { |
pFrame->LoadFrame(IDR_MAINFRAME, |
pFrame = new CMainFrame; |
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL); |
/* XXX */ |
can->window = (void *)pFrame; |
pFrame->m_pWindowName = (char *)malloc(MAX(strlen(can->wname),strlen("ox_plot"))+10); |
pFrame->m_wndView.can = can; |
sprintf(pFrame->m_pWindowName,"%s : %d", |
pFrame->ShowWindow(SW_SHOW); |
strlen(can->wname)?can->wname:"ox_plot",can->index); |
pFrame->UpdateWindow(); |
|
pFrame->BringWindowToTop(); |
pFrame->m_cansize.cx = can->width; |
can->hwnd = pFrame->m_wndView.m_hWnd; |
pFrame->m_cansize.cy = can->height; |
} else |
pFrame->LoadFrame(IDR_MAINFRAME, |
pFrame = (CMainFrame *)can->window; |
WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, |
pFrame->RedrawWindow(); |
NULL); |
break; |
can->window = (void *)pFrame; |
case WM_APP+1: // popup |
pFrame->m_wndView.can = can; |
can = canvas[pMsg->wParam]; |
pFrame->ShowWindow(SW_SHOW); |
pFrame = (CMainFrame *)can->window; |
pFrame->UpdateWindow(); |
pFrame->ShowWindow(SW_SHOW); |
pFrame->BringWindowToTop(); |
break; |
can->hwnd = pFrame->m_wndView.m_hWnd; |
case WM_APP+2: // popdown |
} else |
can = canvas[pMsg->wParam]; |
pFrame = (CMainFrame *)can->window; |
pFrame = (CMainFrame *)can->window; |
pFrame->RedrawWindow(); |
pFrame->ShowWindow(SW_HIDE); |
SetEvent(hCanvasCreated); |
closed_canvas[pMsg->wParam] = can; |
} |
canvas[pMsg->wParam] = 0; |
|
break; |
|
default: |
|
break; |
|
} |
|
return CWinApp::PreTranslateMessage(pMsg); |
return CWinApp::PreTranslateMessage(pMsg); |
} |
} |
|
|