Section 1: Start point
Section 2: Examples of WPS programs
- There are examples in Toolkit -> SAMPLES\WPS\
- XWorkPlace -- Extended classes of eComStation WPS which improve and simplify control over the operating system.
Section 3: How to compile?
Use IBM Visual Age compiler to create WPS applications and dlls.
Don't use Watcom or GCC.
Section 4: WPS Guidelines
Разработка разных WPS Setup'ов
Есть проблема:
- OK: Корзина, LMouseButton => вьювер; RMouseButton -> Свойства -> возможность настроить = ОК
- OK: Электропитание, LMouseButton => вьювер; RMouseButton -> Настройка = ОК
- ПРОБЛЕМА: Экран, LMouseButton => ?! настройка.. RMB => опять настройка
Предлагается решение:
- Все-таки LBM => вьювер. RMB -> Properties => настройки.
КРОМЕ ТОГО, делать кнопку "Настройка" в вьюверах!
- Пример: Объект "Экран" поправить,
LMB => показывать уменьшенную копию рабочего стола,
рядом кнопка "Настройка" (иначе пользователи не найдут Настройки)
- Пример: Добавить кнопку "Настройка" в вьювере Power Panel
Section 5: Tips and tricks
Advice 1:
Don't try this at home! - Adventures in WPS programming (Chris Wohlgemuth, netlabs.org)
The Workplace Shell is a fascinating framework albeit with some rough edges.
This presentation is not a
HelloWorld-WPS-class-creation-in-10-easy-steps-hands-on-workshop.
It features general hints, tips, tricks and workarounds for common
problems. When traveling WPS land every developer may come to some
obscure places where weird stuff is waiting for the innocent. Take
the information given as your personal survival guide helping to get
back home safely.
Section 6: WPS + PM
В: Как открыть на рабочем столе WPS-папку с каталогом X?
О: Используйте такой шаблон:
#define ICNL_WINWORKPLACE
#ifndef OPEN_DEFAULT
#define OPEN_DEFAULT 0
#endif
void openDownloadFolder(char *dDir)
{
HOBJECT obj;
if ( ( obj = WinQueryObject( dDir ) ) != NULLHANDLE ) {
WinOpenObject( obj , OPEN_DEFAULT , TRUE );
// Второй раз чтоб сделать открытую папку активной
WinOpenObject( obj , OPEN_DEFAULT , TRUE );
}
}
В: Использование WPS-классов из PM-приложения
Использование классов WPS из другого процесса возможно двумя способами:
- С помощью DSOM
- С помощью RWS
В: Как запустить вьювер для файла X?
A:
В принципе, можно создать в папке nowhere временный объект и запустить его.
|