HELPERS
directory.
All of that code is not dependent on XWorkplace and could be used in any
program. There are lots of Control Program, Presentation Manager and GPI
helper functions which might solve problems that you are having.
To use the helper funcs, simply add #include "helpers\xxx.h"
at the top of your code. See the top of the respective header for additional
#include
's which are required by the helper.
src\shared\common.c
which might be
useful to you, most notably to query some XWorkplace settings and NLS stuff.
cmnQueryGlobalSettings
will return the global settings structure,
for example, or cmnMessageBox
will display one of the pretty
XWorkplace message boxes.
Since your code should be NLS enabled, you should always use
cmnQueryLanguageCode
to find out what language is currently used.
WPAbstract
class from scratch,
including a completely new view defined by your class (like the "Class list view"),
you can take a look at xclslist.idl
and xclslist.c
,
which do exactly this. See the comments in that file for instructions.
src\shared\notebook.c
,
which does just this using callbacks, so you don't have to rewrite the same
stupid window procedures for each notebook page. This is used throughout XWorkplace's
source code whenever settings pages are inserted, and has proven to be extremely
useful.
src\shared\kernel.c
contains code which you can
extend for certain tricky situations. For one, you can extend
krnInitializeXWorkplace
to have code executed upon WPS startup;
secondly, you can add messages to krn_fnwpThread1Object
if you
need code to absolutely always execute on thread 1 of PMSHELL.EXE, which cannot
be guaranteed with open views of any kind (especially folder views).