From 5f552506513653f08acc6921b8c158489a7ebbbb Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 03 Nov 2004 21:50:28 +0000 Subject: Added dialog box in case we can't bind listening socket. git-svn-id: http://svn.klever.net/kin/pumpkin/trunk@47 fe716a7a-6dde-0310-88d9-d003556173a8 --- diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp index 0b3bf41..fc24596 100644 --- a/PumpKINDlg.cpp +++ b/PumpKINDlg.cpp @@ -327,6 +327,7 @@ int CPumpKINDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) 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; } diff --git a/pumpkin.rc b/pumpkin.rc index 7380e12..7f3bbde 100644 --- a/pumpkin.rc +++ b/pumpkin.rc @@ -82,9 +82,10 @@ CAPTION "About PumpKIN" FONT 8, "MS Sans Serif" BEGIN ICON IDR_MAINFRAME,IDC_STATIC,7,17,18,20 - LTEXT "PumpKIN, Version 2.5.1-trunk",IDC_STATIC,40,15,119,8,SS_NOPREFIX - LTEXT "Copyright © 1997-2004 Klever Group",IDC_STATIC,40,30,170, - 8 + LTEXT "PumpKIN, Version 2.5.1-trunk",IDC_STATIC,40,15,119,8, + SS_NOPREFIX + LTEXT "Copyright © 1997-2004 Klever Group",IDC_STATIC,40,30, + 170,8 DEFPUSHBUTTON "OK",IDOK,178,7,32,14,WS_GROUP PUSHBUTTON "http://www.klever.net/",IDC_KLEVERNET,124,53,86,14 END @@ -570,6 +571,7 @@ BEGIN IDS_SELECT_TFTPROOT "Select TFTP filesystem root.." IDS_FILTER_WAV "Sound Files (*.wav)|*.wav||" IDS_TITLE_WAV "Select sound.." + IDS_BOX_CANTBIND "Failed to create listening socket. The port may be in use by another application." END STRINGTABLE DISCARDABLE @@ -597,7 +599,7 @@ END LANGUAGE 9, 1 #pragma code_page(1252) #endif -#include "res\pumpkin.rc2" // non-Microsoft Visual C++ edited resources +#include "res\PumpKIN.rc2" // non-Microsoft Visual C++ edited resources #include "afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// diff --git a/resource.h b/resource.h index fcdda9c..8755a55 100644 --- a/resource.h +++ b/resource.h @@ -78,6 +78,7 @@ #define IDS_SELECT_TFTPROOT 153 #define IDS_FILTER_WAV 154 #define IDS_TITLE_WAV 155 +#define IDS_BOX_CANTBIND 156 #define IDC_KLEVERNET 1000 #define IDC_CONNECTIONS 1001 #define IDC_LOG 1003 -- cgit v0.9.0.2