| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | UICL ICommandHandler |
Hallo Henrik!
Replying to a message of Henrik Falk to All:
HF> I'm new in the UICL code!
HF> The source below is the normal way to attach your commandhandler
HF> to your Window Class:
HF> ---------------------------------------------------------------
HF> class TestWindow : public IFrameWindow, public ICommandHandler
HF> {
HF> public:
HF> TestWindow(unsigned long windowId);
HF> protected:
HF> Boolean command(ICommandEvent& cmdEvent);
HF> };
HF> ---------------------------------------------------------------
HF> I've would like to have a generic ACommandHandler Class that I can
HF> attach to the framewindow class.
HF> But how do I get a handle to the clientwindow in my
HF> ACOMMANDHANDLER.CPP ?
There are two simple ways to attach a handler to a window.
IHandler::handleEventsFor( IWindow *);
IWindow::addHandler( IHandler *);
As far as I know, both have the same result, more commonly used is handleEventsFor.
HF> The samples in the book 'OS/2 C++ Class Library' by Kevin Leong are
HF> fine. But none of the samles do much about the framewindow class.
As a starter, I recommend the UICL Users Guide and the sample Applications.
These use a more chronological order to introduce you to the UICL. The C++
Class Library book often goes in too deep for beginners.
Leif [Team OS/2]
Certified LAN Administrator
--- FleetStreet 1.00 NR
* Origin: (2:240/5200.13)SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430 SEEN-BY: 711/807 808 809 934 942 949 712/353 515 713/888 800/1 7877/2809 @PATH: 240/5200 5400 5500 396/1 3615/50 229/2 12/2442 711/409 808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.