Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

89 lines
2.2 KiB

//----------------------------------------------------------------------------
// Laser Guard Ltd.
// Copyright © 2000-2002. All Rights Reserved.
// Version 1.0 19/04/2000
// Last modification: 08/10/2003
// Project Intruder Position Indicator
// SUBSYSTEM: MessageDlg
// FILE: MessageDlg.cpp
// AUTHOR: Chizhevskiy Sergey
// OVERVIEW
// ~~~~~~~~
// Source file of class CMessageDlg
//----------------------------------------------------------------------------
#include "stdafx.h"
#include "..\LgLib\Version.h"
#include "MessageDlg.h"
CMessageDlg::CMessageDlg()
{
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CMessageDlg::CMessageDlg" );
}
CMessageDlg::~CMessageDlg()
{
LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, "CMessageDlg::~CMessageDlg" );
}
BOOL CALLBACK WndProcMessageDlg(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static CMessageDlg *self = NULL;
switch(uMsg)
{
case WM_INITDIALOG:
self = (CMessageDlg*)lParam;
break;
default:
if(self)
return self->OnMessage(hwndDlg, uMsg, wParam, lParam);
}
return FALSE;
}
BOOL CMessageDlg::Create(HWND hParentWnd, LPPOINT pPoint, LPSIZE pSize)
{
m_hWnd = ::CreateDialogParam((HINSTANCE)::GetWindowLong(hParentWnd, GWL_HINSTANCE),
MAKEINTRESOURCE(IDD_MESSAGE_DLG), hParentWnd,
WndProcMessageDlg, (LPARAM)this);
POINT p = { 10, 533 };
if (pPoint)
p = *pPoint;
SIZE s = { 384, 200 };
if (pSize)
s = *pSize;
// ::SetWindowPos(m_hWnd, HWND_TOP, p.x, p.y, s.cx, s.cy, SWP_SHOWWINDOW | SWP_NOSIZE);
::SetWindowPos(m_hWnd, HWND_TOP, p.x, p.y, s.cx, s.cy, SWP_HIDEWINDOW | SWP_NOSIZE);
return TRUE;
}
HWND CMessageDlg::GetItemHWND() const // 23/04/2001
{
return GetDlgItem(m_hWnd, IDC_STATIC_CONNECTION);
}
BOOL CMessageDlg::OnMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
return FALSE;
}
void CMessageDlg::SetWindowText(LPCTSTR pStr )
{
::SendDlgItemMessage(m_hWnd, IDC_STATIC_MESSAGE_TEXT, WM_SETTEXT, 0, (LPARAM)pStr);
}
void CMessageDlg::SetTimeText(LPCTSTR pStr) const
{
::SendDlgItemMessage(m_hWnd, IDC_STATIC_MESSAGE_TIME, WM_SETTEXT, 0, (LPARAM)pStr);
}