The attached patch accomplishes the following:
1. Makes it possible for modeless dialogs to receive keyboard input on
Win32. Unfortunately this requires an ugly hack to xap_DialogModeless
(suggestions on a better implementation are welcome). Thanks to Hubert
Figuiere for the help in solving this little doozy.
2. Implements the Word Count dialog, with all problems I was previously
having solved (thanks mainly to #1). I believe that it's now ready to
face the Bob/Paul Egli challenge. :)
3. Fixes the Insert Symbol dialog to accept keyboard input (you can't
select the symbol via the keyboard, but at least the tab key works and you
can change the font).
On a somewhat related note, I have two questions:
1. I've noticed some odd behaviour in the way that modeles dialogs
work. If you open a modeless dialog, then go back to the document, then
select (for example) Tools | Word Count from the menu bar, the Word Count
dialog is updated but the document retains the input focus. It's
specifically coded this way in the unix version, so I mimicked it in the
Win32 version, but I have to ask: is this really the desired behaviour?
Should I have to click on the dialog with the mouse in order to give it
the input focus?
2. What's the rule for when modeless dialogs should stay on top of the
documents? The Word Count dialog, for example, falls behind the document
once it loses focus (I mimicked the unix behaviour here as well), but the
Insert Symbol dialog stays on top. Is this by design? Accidental? Is
there a rule we should be following in this regard?
In case anybody's actually read through this whole thing, I'm going to
throw out one more thought while I'm at it. I must say that I'm really
impressed with the AbiWord codebase - I'm no junior programmer, but for me
to be able to jump in and with relatively little effort implement the
stuff I have says a lot about the code that's already there and the people
who wrote it.
-Tom
Index: src/af/xap/win/xap_Win32Dlg_Insert_Symbol.h
===================================================================
RCS file: /cvsroot/abi/src/af/xap/win/xap_Win32Dlg_Insert_Symbol.h,v
retrieving revision 1.5
diff -u -r1.5 xap_Win32Dlg_Insert_Symbol.h
--- src/af/xap/win/xap_Win32Dlg_Insert_Symbol.h 2000/05/20 14:11:05 1.5
+++ src/af/xap/win/xap_Win32Dlg_Insert_Symbol.h 2000/07/01 14:15:53
@@ -72,7 +72,9 @@
static XAP_Dialog * static_constructor(XAP_DialogFactory *,
XAP_Dialog_Id id);
static BOOL CALLBACK s_dlgProc(HWND,UINT,WPARAM,LPARAM);
static int CALLBACK fontEnumProcedure(const LOGFONT *pLogFont,
const TEXTMETRIC *pTextMetric, DWORD Font_type, LPARAM lParam);
-
+
+ void * pGetWindowHandle( void ) { return
+(void*)m_hDlg; }
+
protected:
BOOL _onInitDialog(HWND hWnd, WPARAM
wParam, LPARAM lParam);
BOOL _onCommand(HWND hWnd, WPARAM wParam,
LPARAM lParam);
Index: src/af/xap/xp/xap_Dialog.h
===================================================================
RCS file: /cvsroot/abi/src/af/xap/xp/xap_Dialog.h,v
retrieving revision 1.13
diff -u -r1.13 xap_Dialog.h
--- src/af/xap/xp/xap_Dialog.h 2000/06/06 07:53:17 1.13
+++ src/af/xap/xp/xap_Dialog.h 2000/07/01 14:15:53
@@ -148,6 +148,9 @@
char * BuildWindowName( char* pWindowName,
char* pDialogName, UT_sint32 width);
static XAP_Dialog_Type s_getPersistence(void) { return
XAP_DLGT_APP_PERSISTENT; };
+ // ugly hack necessary for Win32
+ virtual void * pGetWindowHandle(void) { return NULL;
+}
+
protected:
XAP_Dialog_Modeless * m_pDialog;
};
Index: src/wp/ap/win/ap_Win32App.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32App.cpp,v
retrieving revision 1.46
diff -u -r1.46 ap_Win32App.cpp
--- src/wp/ap/win/ap_Win32App.cpp 2000/05/26 21:24:50 1.46
+++ src/wp/ap/win/ap_Win32App.cpp 2000/07/01 14:15:54
@@ -755,7 +755,10 @@
// Note: we do not call TranslateMessage() because
// Note: the keybinding mechanism is responsible
// Note: for deciding if/when to do this.
-
+
+ if( pMyWin32App->handleModelessDialogMessage( &msg ) )
+ continue;
+
DispatchMessage(&msg);
}
}
@@ -909,4 +912,29 @@
UT_Error AP_Win32App::fileOpen(XAP_Frame * pFrame, const char * pNewFile)
{
return ::fileOpen(pFrame, pNewFile, IEFT_Unknown);
+}
+
+UT_Bool AP_Win32App::handleModelessDialogMessage( MSG * msg )
+{
+ int iCounter;
+ HWND hWnd = NULL;
+
+ // Try to knock off the easy case quickly
+ if( m_IdTable[ 0 ].id == -1 )
+ return UT_FALSE;
+
+ for( iCounter = 0; iCounter <= NUM_MODELESSID; iCounter++ )
+ {
+ if( m_IdTable[ iCounter ].id != -1 )
+ {
+ hWnd = (HWND)m_IdTable[ iCounter
+].pDialog->pGetWindowHandle();
+
+ if( hWnd && IsDialogMessage( hWnd, msg ) )
+ return UT_TRUE;
+ }
+ else
+ break;
+ }
+
+ return UT_FALSE;
}
Index: src/wp/ap/win/ap_Win32App.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32App.h,v
retrieving revision 1.16
diff -u -r1.16 ap_Win32App.h
--- src/wp/ap/win/ap_Win32App.h 2000/05/26 21:24:50 1.16
+++ src/wp/ap/win/ap_Win32App.h 2000/07/01 14:15:54
@@ -63,6 +63,8 @@
virtual UT_Error
fileOpen(XAP_Frame * pFrame, const char * pNewFile);
+ UT_Bool handleModelessDialogMessage( MSG * msg );
+
protected:
XAP_StringSet * m_pStringSet;
AP_Win32Clipboard * m_pClipboard;
Index: src/wp/ap/win/ap_Win32Dialog_WordCount.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_WordCount.cpp,v
retrieving revision 1.4
diff -u -r1.4 ap_Win32Dialog_WordCount.cpp
--- src/wp/ap/win/ap_Win32Dialog_WordCount.cpp 2000/03/01 07:03:41 1.4
+++ src/wp/ap/win/ap_Win32Dialog_WordCount.cpp 2000/07/01 14:15:54
@@ -47,6 +47,8 @@
XAP_Dialog_Id id)
: AP_Dialog_WordCount(pDlgFactory,id)
{
+ m_bAutoWC = 1;
+ m_iUpdateRate = 1;
}
AP_Win32Dialog_WordCount::~AP_Win32Dialog_WordCount(void)
@@ -73,6 +75,126 @@
UT_ASSERT((result != -1));
}
+void AP_Win32Dialog_WordCount::runModeless(XAP_Frame * pFrame)
+{
+ // raise the dialog
+ int iResult;
+ XAP_Win32App * pWin32App = static_cast<XAP_Win32App *>(m_pApp);
+ XAP_Win32Frame * pWin32Frame = static_cast<XAP_Win32Frame *>(pFrame);
+
+ LPCTSTR lpTemplate = NULL;
+
+ UT_ASSERT(m_id == AP_DIALOG_ID_WORDCOUNT);
+
+ lpTemplate = MAKEINTRESOURCE(AP_RID_DIALOG_WORDCOUNT);
+
+ // Change the third argument to
+ // pWin32Frame->getTopLevelWindow(),
+ // if you want the dialog to stay on top of the Abi windows
+ HWND hResult = CreateDialogParam(pWin32App->getInstance(),lpTemplate,
+ GetDesktopWindow(),
+
+(DLGPROC)s_dlgProc,(LPARAM)this);
+
+ UT_ASSERT((hResult != NULL));
+
+ m_hWnd = hResult;
+
+ // Save dialog the ID number and pointer to the widget
+ UT_sint32 sid =(UT_sint32) getDialogId();
+ m_pApp->rememberModelessId( sid, (XAP_Dialog_Modeless *) m_pDialog);
+
+ iResult = ShowWindow( m_hWnd, SW_SHOW );
+
+ iResult = BringWindowToTop( m_hWnd );
+
+ UT_ASSERT((iResult != 0));
+}
+
+void AP_Win32Dialog_WordCount::setUpdateCounter( UT_uint32 iRate )
+{
+ UT_uint32 iFactor = 1000;
+
+ m_bDestroy_says_stopupdating = UT_FALSE;
+ m_bAutoUpdate_happening_now = UT_FALSE;
+
+ // Make a special case for 0 seconds in
+ // an attempt to reduce screen flicker
+ if( iRate == 0 )
+ iFactor = 100;
+
+ m_pAutoUpdateWC->stop();
+
+ if(m_bAutoWC == UT_TRUE)
+ m_pAutoUpdateWC->set(m_iUpdateRate * iFactor);
+}
+
+void AP_Win32Dialog_WordCount::autoupdateWC(UT_Timer * pTimer)
+{
+ UT_ASSERT(pTimer);
+
+ // this is a static callback method and does not have a 'this' pointer.
+
+ AP_Win32Dialog_WordCount * pDialog = (AP_Win32Dialog_WordCount *)
+pTimer->getInstanceData();
+
+ // Handshaking code
+
+ if( pDialog->m_bDestroy_says_stopupdating != UT_TRUE)
+ {
+ pDialog->m_bAutoUpdate_happening_now = UT_TRUE;
+ pDialog->event_Update();
+ pDialog->m_bAutoUpdate_happening_now = UT_FALSE;
+ }
+}
+
+void AP_Win32Dialog_WordCount::event_Update(void)
+{
+ setCountFromActiveFrame();
+ _updateWindowData();
+}
+
+void AP_Win32Dialog_WordCount::destroy(void)
+{
+ m_bDestroy_says_stopupdating = UT_TRUE;
+ while (m_bAutoUpdate_happening_now == UT_TRUE) ;
+ m_pAutoUpdateWC->stop();
+
+ int iResult = DestroyWindow( m_hWnd );
+
+ UT_ASSERT((iResult != 0));
+
+ modeless_cleanup();
+}
+
+void AP_Win32Dialog_WordCount::activate(void)
+{
+ int iResult;
+ XAP_Frame * pFrame = getActiveFrame();
+ XAP_Win32Frame * pWin32Frame = static_cast<XAP_Win32Frame *>(pFrame);
+
+ // Update the caption
+ ConstructWindowName();
+ SetWindowText(m_hWnd, m_WindowName);
+
+ iResult = ShowWindow( m_hWnd, SW_SHOW );
+
+ iResult = BringWindowToTop( m_hWnd );
+
+ UT_ASSERT((iResult != 0));
+
+ iResult = BringWindowToTop( pWin32Frame->getTopLevelWindow() );
+
+ UT_ASSERT((iResult != 0));
+}
+
+void AP_Win32Dialog_WordCount::notifyActiveFrame(XAP_Frame *pFrame)
+{
+ // Update the caption
+ ConstructWindowName();
+ SetWindowText(m_hWnd, m_WindowName);
+
+ event_Update();
+}
+
BOOL CALLBACK AP_Win32Dialog_WordCount::s_dlgProc(HWND hWnd,UINT msg,WPARAM
wParam,LPARAM lParam)
{
// This is a static function.
@@ -88,8 +210,17 @@
case WM_COMMAND:
pThis = (AP_Win32Dialog_WordCount *)GetWindowLong(hWnd,DWL_USER);
- return pThis->_onCommand(hWnd,wParam,lParam);
+ if (pThis)
+ return pThis->_onCommand(hWnd,wParam,lParam);
+ else
+ return 0;
+ case WM_VSCROLL:
+ pThis = (AP_Win32Dialog_WordCount *)GetWindowLong(hWnd,DWL_USER);
+ pThis->setUpdateCounter( (UT_uint32)HIWORD(wParam) );
+ pThis->event_Update();
+ return 1;
+
default:
return 0;
}
@@ -103,11 +234,32 @@
{
const XAP_StringSet * pSS = m_pApp->getStringSet();
- SetWindowText(hWnd, pSS->getValue(AP_STRING_ID_DLG_WordCount_WordCountTitle));
+ // Update the caption
+ ConstructWindowName();
+ SetWindowText(hWnd, m_WindowName);
+
+ // Set the starting rate a 1 update/second
+ SetDlgItemInt(hWnd, AP_RID_DIALOG_WORDCOUNT_EDIT_RATE, 1, FALSE );
+
+ // Set the range for auto-updating to 0-10
+
+SendMessage(GetDlgItem(hWnd,AP_RID_DIALOG_WORDCOUNT_SPIN_RATE),UDM_SETRANGE,(WPARAM)0,(WPARAM)10);
+
+
+SendMessage(GetDlgItem(hWnd,AP_RID_DIALOG_WORDCOUNT_EDIT_RATE),EM_LIMITTEXT,(WPARAM)2,(WPARAM)0);
+
+
+ EnableWindow( GetDlgItem(hWnd,AP_RID_DIALOG_WORDCOUNT_BTN_UPDATE), !m_bAutoWC
+);
+ if( m_bAutoWC )
+ CheckDlgButton(hWnd, AP_RID_DIALOG_WORDCOUNT_CHK_AUTOUPDATE,
+BST_CHECKED);
+
+ GR_Graphics * pG = NULL;
+ m_pAutoUpdateWC = UT_Timer::static_constructor(autoupdateWC,this,pG);
+ setUpdateCounter( 1 );
// localize controls
_DSX(WORDCOUNT_BTN_CLOSE, DLG_Close);
+ _DSX(WORDCOUNT_BTN_UPDATE, DLG_Update);
+ _DS(WORDCOUNT_CHK_AUTOUPDATE, DLG_WordCount_Auto_Update);
+ _DS(WORDCOUNT_TEXT_RATE, DLG_WordCount_Update_Rate);
+
_DS(WORDCOUNT_TEXT_STATS, DLG_WordCount_Statistics);
_DS(WORDCOUNT_TEXT_PAGE, DLG_WordCount_Pages);
_DS(WORDCOUNT_TEXT_WORD, DLG_WordCount_Words);
@@ -127,17 +279,46 @@
return 1; // 1 == we did
not call SetFocus()
}
+void AP_Win32Dialog_WordCount::_updateWindowData(void)
+{
+ HWND hWnd = m_hWnd;
+
+ _DSI(WORDCOUNT_VAL_PAGE, page);
+ _DSI(WORDCOUNT_VAL_WORD, word);
+ _DSI(WORDCOUNT_VAL_CH, ch_no);
+ _DSI(WORDCOUNT_VAL_CHSP, ch_sp);
+ _DSI(WORDCOUNT_VAL_PARA, para);
+ _DSI(WORDCOUNT_VAL_LINE, line);
+
+ // Update the caption in case the name of the document has changed
+ ConstructWindowName();
+ SetWindowText(hWnd, m_WindowName);
+}
+
BOOL AP_Win32Dialog_WordCount::_onCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
WORD wNotifyCode = HIWORD(wParam);
WORD wId = LOWORD(wParam);
HWND hWndCtrl = (HWND)lParam;
+ XAP_Frame * pFrame = getActiveFrame();
switch (wId)
{
case IDCANCEL: // also
AP_RID_DIALOG_WORDCOUNT_BTN_CLOSE
m_answer = a_CANCEL;
- EndDialog(hWnd,0);
+ destroy();
+ return 1;
+
+ case AP_RID_DIALOG_WORDCOUNT_BTN_UPDATE:
+ notifyActiveFrame(pFrame);
+ return 1;
+
+ case AP_RID_DIALOG_WORDCOUNT_CHK_AUTOUPDATE:
+ m_bAutoWC = !m_bAutoWC;
+ EnableWindow( GetDlgItem(m_hWnd,AP_RID_DIALOG_WORDCOUNT_BTN_UPDATE),
+!m_bAutoWC );
+ EnableWindow( GetDlgItem(m_hWnd,AP_RID_DIALOG_WORDCOUNT_EDIT_RATE),
+m_bAutoWC );
+ EnableWindow( GetDlgItem(m_hWnd,AP_RID_DIALOG_WORDCOUNT_SPIN_RATE),
+m_bAutoWC );
+ setUpdateCounter( m_iUpdateRate );
return 1;
default: // we did not
handle this notification
Index: src/wp/ap/win/ap_Win32Dialog_WordCount.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Dialog_WordCount.h,v
retrieving revision 1.4
diff -u -r1.4 ap_Win32Dialog_WordCount.h
--- src/wp/ap/win/ap_Win32Dialog_WordCount.h 2000/05/25 09:32:01 1.4
+++ src/wp/ap/win/ap_Win32Dialog_WordCount.h 2000/07/01 14:15:54
@@ -20,7 +20,10 @@
#ifndef AP_WIN32DIALOG_WORDCOUNT_H
#define AP_WIN32DIALOG_WORDCOUNT_H
+#include <commctrl.h>
#include "ap_Dialog_WordCount.h"
+#include "ut_timer.h"
+
class XAP_Win32Frame;
/*****************************************************************/
@@ -33,18 +36,32 @@
virtual void runModal(XAP_Frame * pFrame);
- virtual void runModeless(XAP_Frame * pFrame){};
- virtual void destroy(void){};
- virtual void activate(void){};
- virtual void notifyActiveFrame(XAP_Frame *pFrame) {};
+ virtual void runModeless(XAP_Frame * pFrame);
+ virtual void destroy(void);
+ virtual void activate(void);
+ virtual void notifyActiveFrame(XAP_Frame *pFrame);
virtual void notifyCloseFrame(XAP_Frame *pFrame) {};
static XAP_Dialog * static_constructor(XAP_DialogFactory *,
XAP_Dialog_Id id);
+ static void autoupdateWC(UT_Timer * pTimer);
+ virtual void setUpdateCounter( UT_uint32 );
+ virtual void event_Update(void);
static BOOL CALLBACK s_dlgProc(HWND,UINT,WPARAM,LPARAM);
+ void * pGetWindowHandle( void ) { return
+(void*)m_hWnd; }
protected:
BOOL _onInitDialog(HWND hWnd, WPARAM
wParam, LPARAM lParam);
BOOL _onCommand(HWND hWnd, WPARAM wParam,
LPARAM lParam);
+
+ void _updateWindowData(void);
+
+ HWND m_hWnd;
+ UT_Bool m_bAutoWC;
+
+ UT_Timer * m_pAutoUpdateWC;
+ UT_Bool m_bDestroy_says_stopupdating;
+ UT_Bool m_bAutoUpdate_happening_now;
+ UT_uint32 m_iUpdateRate;
};
#endif /* AP_WIN32DIALOG_WORDCOUNT_H */
Index: src/wp/ap/win/ap_Win32Res_DlgWordCount.rc2
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/win/ap_Win32Res_DlgWordCount.rc2,v
retrieving revision 1.1
diff -u -r1.1 ap_Win32Res_DlgWordCount.rc2
--- src/wp/ap/win/ap_Win32Res_DlgWordCount.rc2 2000/03/01 05:20:50 1.1
+++ src/wp/ap/win/ap_Win32Res_DlgWordCount.rc2 2000/07/01 14:16:09
@@ -40,6 +40,11 @@
#define AP_RID_DIALOG_WORDCOUNT_VAL_CHSP 1015
#define AP_RID_DIALOG_WORDCOUNT_VAL_PARA 1016
#define AP_RID_DIALOG_WORDCOUNT_VAL_LINE 1017
+#define AP_RID_DIALOG_WORDCOUNT_BTN_UPDATE 1018
+#define AP_RID_DIALOG_WORDCOUNT_CHK_AUTOUPDATE 1019
+#define AP_RID_DIALOG_WORDCOUNT_TEXT_RATE 1020
+#define AP_RID_DIALOG_WORDCOUNT_EDIT_RATE 1021
+#define AP_RID_DIALOG_WORDCOUNT_SPIN_RATE 1022
#define AP_RID_DIALOG_WORDCOUNT_BTN_CLOSE IDCANCEL
#define AP_RID_DIALOG_WORDCOUNT_BOX -1
@@ -47,28 +52,35 @@
// NOTE -- these placeholder strings get overridden at runtime
// NOTE -- they're just here to make sizing easier
-AP_RID_DIALOG_WORDCOUNT DIALOG DISCARDABLE 0, 0, 179, 110
+AP_RID_DIALOG_WORDCOUNT DIALOG DISCARDABLE 0, 0, 180, 120
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Word Count"
FONT 8, "MS Sans Serif"
BEGIN
- LTEXT "Statistics:", AP_RID_DIALOG_WORDCOUNT_TEXT_STATS,
7,7,43,8
- GROUPBOX "",
AP_RID_DIALOG_WORDCOUNT_BOX, 7,12,109,70
- LTEXT "Pages", AP_RID_DIALOG_WORDCOUNT_TEXT_PAGE,
12,20,99,8
- LTEXT "Words", AP_RID_DIALOG_WORDCOUNT_TEXT_WORD,
12,30,99,8
+ LTEXT "Statistics:", AP_RID_DIALOG_WORDCOUNT_TEXT_STATS,
+ 7,19,43,8
+ GROUPBOX "",
+AP_RID_DIALOG_WORDCOUNT_BOX, 7,24,109,70
+ LTEXT "Pages", AP_RID_DIALOG_WORDCOUNT_TEXT_PAGE,
+ 12,32,99,8
+ LTEXT "Words", AP_RID_DIALOG_WORDCOUNT_TEXT_WORD,
+ 12,42,99,8
LTEXT "Characters (no spaces)",
-
AP_RID_DIALOG_WORDCOUNT_TEXT_CH, 12,40,99,8
+
+AP_RID_DIALOG_WORDCOUNT_TEXT_CH, 12,52,99,8
LTEXT "Characters (with spaces)",
-
AP_RID_DIALOG_WORDCOUNT_TEXT_CHSP, 12,50,99,8
- LTEXT "Paragraphs", AP_RID_DIALOG_WORDCOUNT_TEXT_PARA,
12,60,99,8
- LTEXT "Lines", AP_RID_DIALOG_WORDCOUNT_TEXT_LINE,
12,70,99,8
- GROUPBOX "",
AP_RID_DIALOG_WORDCOUNT_BOX, 115,12,57,70
- RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_PAGE,
126,20,41,8
- RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_WORD,
126,30,41,8
- RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_CH,
126,40,41,8
- RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_CHSP,
126,50,41,8
- RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_PARA,
126,60,41,8
- RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_LINE,
126,70,41,8
- DEFPUSHBUTTON "Close",
AP_RID_DIALOG_WORDCOUNT_BTN_CLOSE,122,89,50,14
+
+AP_RID_DIALOG_WORDCOUNT_TEXT_CHSP, 12,62,99,8
+ LTEXT "Paragraphs", AP_RID_DIALOG_WORDCOUNT_TEXT_PARA,
+ 12,72,99,8
+ LTEXT "Lines", AP_RID_DIALOG_WORDCOUNT_TEXT_LINE,
+ 12,82,99,8
+ GROUPBOX "",
+AP_RID_DIALOG_WORDCOUNT_BOX, 115,24,57,70
+ RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_PAGE,
+ 126,32,41,8
+ RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_WORD,
+ 126,42,41,8
+ RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_CH,
+ 126,52,41,8
+ RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_CHSP,
+ 126,62,41,8
+ RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_PARA,
+ 126,72,41,8
+ RTEXT "100,000,000", AP_RID_DIALOG_WORDCOUNT_VAL_LINE,
+ 126,82,41,8
+ DEFPUSHBUTTON "&Close", AP_RID_DIALOG_WORDCOUNT_BTN_CLOSE,
+ 110,101,62,14
+ PUSHBUTTON "&Update", AP_RID_DIALOG_WORDCOUNT_BTN_UPDATE,
+ 7,101,62,14
+ AUTOCHECKBOX "&Auto Update",
+AP_RID_DIALOG_WORDCOUNT_CHK_AUTOUPDATE,7,7,55,10
+ EDITTEXT
+AP_RID_DIALOG_WORDCOUNT_EDIT_RATE,64,7,23,10, ES_LEFT | WS_BORDER | WS_TABSTOP |
+ES_READONLY
+ CONTROL "Spin",
+AP_RID_DIALOG_WORDCOUNT_SPIN_RATE,
+
+"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT |
+
+UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,89,7,8,8
+ LTEXT "Seconds between
+updates",AP_RID_DIALOG_WORDCOUNT_TEXT_RATE,88,8,99,8
END
#endif /* RC_INVOKED */