summaryrefslogtreecommitdiffabout
path: root/PumpKINDlg.cpp
Side-by-side diff
Diffstat (limited to 'PumpKINDlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r--PumpKINDlg.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
index 0b3bf41..fc24596 100644
--- a/PumpKINDlg.cpp
+++ b/PumpKINDlg.cpp
@@ -306,48 +306,49 @@ void CPumpKINDlg::OnPaint()
GetClientRect(&rc);
for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth)
for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight)
pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY);
bmpDC.DeleteDC();
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CPumpKINDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
int CPumpKINDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
m_Listener.m_Daddy=this;
if(!m_Listener.Create(m_ListenPort,SOCK_DGRAM)){
TRACE0("Failed to create socket\n");
+ AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
return -1;
}
if(!m_Trayer->Create(NULL,"PumpKIN TrayIcon",WS_CHILD,CRect(0,0,0,0),this,0)){
TRACE0("Failed to create trayer\n");
return -1;
}
NOTIFYICONDATA nid;
memset(&nid,0,sizeof(nid));
nid.cbSize=sizeof(nid);
nid.hWnd=m_Trayer->m_hWnd;
nid.uID=IDC_TRAYICON;
nid.uFlags=NIF_MESSAGE|NIF_ICON|NIF_TIP;
nid.uCallbackMessage=WM_TRAYICON;
nid.hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME);
// *** Load from resource
strcpy(nid.szTip,"PumpKIN");
VERIFY(Shell_NotifyIcon(NIM_ADD,&nid));
return 0;
}
void CListenSocket::OnReceive(int nErrorCode)