</i>
<li><a href="mailto:julian.smart@ukonline.co.uk">Julian Smart</a>.
<li><a href="mailto:zeitlin@dptmaths.ens-cachan.fr">Vadim Zeitlin</a>.
+<li><a href="mailto:slavik2@czn.cz">Vaclav Slavik</a>. <i>wxHTML section</i>
+<li><a href="mailto:csomor@advancedconcepts.ch">Stefan Csomor</a>. <i>the sequence of events i.e. which action provokes which event sequence,
+this is implicit for the use on MSW, but very important for other systems; and porting to new platforms</i>
+<li><a href="mailto:karsten@phy.hw.ac.uk">Karsten Ballueder</a>. <i>short tutorials on some useful
+GNU tools, like autoconf/configure/make, programming
+strategies, etc.</i>
</ul>
<hr>
Another publishing name to think of is O'Reilly. They would probably give us a lot
of guidance for style, formatting, etc.<P>
+<a href="mailto:Roald.Ribe@winlink.no">Roald Ribe</a> writes:
+"<a href="http://www.bruceeckel.com/javabook.html" target=_new>Thinking in Java</a>
+is published both as a PDF for internet (by the author) and in print by Prentice Hall."<P>
<hr>
{\small \begin{verbatim}
typedef unsigned short hourTy;
-\end{verbatim}}
-
-{\small \begin{verbatim}
typedef unsigned short minuteTy;
-\end{verbatim}}
-
-{\small \begin{verbatim}
typedef unsigned short secondTy;
-\end{verbatim}}
-
-{\small \begin{verbatim}
typedef unsigned long clockTy;
-\end{verbatim}}
-
-{\small \begin{verbatim}
enum tFormat { wx12h, wx24h };
-\end{verbatim}}
-
-{\small \begin{verbatim}
enum tPrecision { wxStdMinSec, wxStdMin };
\end{verbatim}}
extern wxChar wxMDIChildFrameClassName[];
extern wxWindow *wxWndHook; // from window.cpp
-extern wxList *wxWinHandleList;
+extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
static HWND invalidHandle = 0;
m_hWnd = (WXHWND)Return;
wxWndHook = NULL;
- wxWinHandleList->Append((long)GetHWND(), this);
+ wxAssociateWinWithHandle((HWND) GetHWND(), this);
// VZ: what's this? an act of piracy?
//SetWindowLong(GetHwnd(), 0, (long)this);
str += _T('W'); // 'W' is typically the widest letter
dc.GetTextExtent(str, (long *)pwidth, (long *)pheight);
+
+ // JACS: items still look too tightly packed, so adding 2 pixels.
+ (*pheight) = (*pheight) + 2;
+
m_nHeight = *pheight; // remember height for use in OnDrawItem
return TRUE;
// Win32 GDI functions and not wxWindows ones. Might help to whoever decides to
// port this code to X. (VZ)
+// JACS: TODO. Why does a disabled but highlighted item still
+// get drawn embossed? How can we tell DrawState that we don't want the
+// embossing?
+
#if defined(__WIN32__) && !defined(__SC__) && !defined(__TWIN32__)
#define O_DRAW_NATIVE_API // comments below explain why I use it
#endif
bool wxTaskBarIcon::PopupMenu(wxMenu *menu) //, int x, int y);
{
+ // OK, so I know this isn't thread-friendly, but
+ // what to do? We need this check.
+
+ static bool s_inPopup = FALSE;
+
+ if (s_inPopup)
+ return FALSE;
+
+ s_inPopup = TRUE;
+
bool rval = FALSE;
wxWindow* win;
int x, y;
win->PopEventHandler(FALSE);
win->Destroy();
- //delete win;
+ delete win;
+
+ s_inPopup = FALSE;
return rval;
}
// it with wxWindow stored in wxWndHook
if ( !wnd && wxWndHook )
{
+#if 0 // def __WXDEBUG__
+ char buf[512];
+ ::GetClassNameA((HWND) hWnd, buf, 512);
+ wxString className(buf);
+#endif
+
wxAssociateWinWithHandle(hWnd, wxWndHook);
wnd = wxWndHook;
wxWndHook = NULL;
return (wxWindow *)node->Data();
}
+#if 0 // def __WXDEBUG__
+static int gs_AssociationCount = 0;
+#endif
+
void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win)
{
// adding NULL hWnd is (first) surely a result of an error and
wxCHECK_RET( hWnd != (HWND)NULL,
_T("attempt to add a NULL hWnd to window list ignored") );
- if ( !wxWinHandleList->Find((long)hWnd) )
+
+ wxWindow *oldWin = wxFindWinFromHandle((WXHWND) hWnd);
+ if ( oldWin && (oldWin != win) )
+ {
+ wxString str(win->GetClassInfo()->GetClassName());
+ wxLogError("Bug! Found existing HWND %X for new window of class %s", (int) hWnd, (const char*) str);
+ }
+ else if (!oldWin)
+ {
+#if 0 // def __WXDEBUG__
+ gs_AssociationCount ++;
+ wxLogDebug("+ Association %d", gs_AssociationCount);
+#endif
+
wxWinHandleList->Append((long)hWnd, win);
+ }
}
void wxRemoveHandleAssociation(wxWindow *win)
{
+#if 0 // def __WXDEBUG__
+ if (wxWinHandleList->Member(win))
+ {
+ wxLogDebug("- Association %d", gs_AssociationCount);
+ gs_AssociationCount --;
+ }
+#endif
wxWinHandleList->DeleteObject(win);
}
}
wxWndHook = NULL;
- wxWinHandleList->Append((long)m_hWnd, this);
+#ifdef __WXDEBUG__
+ wxNode* node = wxWinHandleList->Member(this);
+ if (node)
+ {
+ HWND hWnd = (HWND) node->GetKeyInteger();
+ if (hWnd != (HWND) m_hWnd)
+ {
+ wxLogError("A second HWND association is being added for the same window!");
+ }
+ }
+#endif
+ wxAssociateWinWithHandle((HWND) m_hWnd, this);
return TRUE;
}
{
wxTheKeyboardHookProc = MakeProcInstance((FARPROC) wxKeyboardHook, wxGetInstance());
wxTheKeyboardHook = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC) wxTheKeyboardHookProc, wxGetInstance(),
+
#if defined(__WIN32__) && !defined(__TWIN32__)
GetCurrentThreadId());
// (DWORD)GetCurrentProcess()); // This is another possibility. Which is right?
#else
- GetCurrentTask());
+ GetCurrentTask());
#endif
}
else