OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
treeviewctrl.cpp
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Implements TTreeViewCtrl, TTreeNode, TTvItem
7//
8//----------------------------------------------------------------------------
9#include <owl/pch.h>
10
11#include <owl/treeviewctrl.h>
12#include <owl/system.h>
13#include <tchar.h>
14
15#if defined(__BORLANDC__)
16# pragma option -w-ccc // Disable "Condition is always true/false"
17#endif
18
19using namespace std;
20
21namespace owl {
22
24DIAG_DECLARE_GROUP(OwlCommCtrl); // Common controls diagnostic group
25
26namespace
27{
28
30
31} // namespace
32
33
34//
35/// Construct a new node given the node's text
36//
37/// Parameters:
38/// \arg \c \b tree A TTreeViewCtrl object to associate with the node.
39/// \arg \c \b text A text label for the node.
40///
41/// Remarks:
42/// - Initializes the TreeView data member to the address of tree.
43/// - Calls the SetText function, passing it text. In 32-bit
44/// applications, the text is not displayed in the Tree-View control until the the
45/// TTreeNode object encapsulates an item (the ItemStruct.hItem data member is
46/// valid) and the Tree-View control is updated (the SetItem function is called, for
47/// example).
48//
49TTreeNode::TTreeNode(TTreeViewCtrl& tree, LPCTSTR text)
50:
51 TreeView(&tree)
52{
53 SetText(text, false);
54}
55
56//
57/// Construct a new node given the node's text and image info
58///
59/// Parameters:
60/// \arg \c \b tree A TTreeViewCtrl object to associate with the node.
61/// \arg \c \b text A text label for the node.
62/// \arg \c \b index The index of the image in the TTreeViewCtrl image list that corresponds to
63/// the node's unselected state.
64/// \arg selIndex The index of the image in the TTreeViewCtrl image list that corresponds
65/// to the node's selected state.
66///
67/// Remarks:
68/// - Initializes the TreeView data member to the address of tree.
69/// - Calls the SetText function, passing it text. The text is not
70/// displayed in the Tree-View control until the the TTreeNode object encapsulates
71/// an item (the ItemStruct.hItem data member is valid) and the Tree-View control is
72/// updated (the SetItem function is called, for example).
73/// - Calls the SetImageIndex function, passing it index.
74/// - Calls the SetSelectedImageIndex function, passing it selIndex.
75//
76TTreeNode::TTreeNode(TTreeViewCtrl& tree, LPCTSTR text, int index,
77 int selIndex)
78:
79 TreeView(&tree)
80{
81 SetText(text, false);
82 SetImageIndex(index, false);
84}
85
86//
87/// Construct based on an item.
88///
89/// Parameters:
90/// \arg \c \b tree A TTreeViewCtrl object to associate with the node.
91/// \arg \c \b item A TVITEM object representing the item.
92///
93/// Remarks:
94/// - Initializes the TreeView data member to the address of tree.
95/// - Initializes the ItemStruct data member to item.
96/// - If the node has a valid label (if the TVIF_TEXT flag of item.mask
97/// is set), the SetText function is called (it is passed item.pszText).
98//
99TTreeNode::TTreeNode(TTreeViewCtrl& tree, TVITEM item)
100:
101 ItemStruct(item),
102 TreeView(&tree)
103{
104 if (item.mask & TVIF_TEXT) {
105 SetText(item.pszText);
106 }
107}
108
109//
110/// Parameters:
111/// \arg \c \b tree A TTreeViewCtrl object to associate with the node.
112/// \arg \c \b hItem A handle to a TVITEM object representing the item, a Tree-View Insert
113/// constant (32-bit applications), or a THowToInsert value.
114///
115/// Remarks:
116/// - Initializes the TreeView data member to the address of tree.
117/// - Displays a warning message if hItem is null.
118/// - Initializes the ItemStruct.hItem data member to hItem.
119/// - Initializes the ItemStruct.mask data member to TVIF_HANDLE.
120//
121TTreeNode::TTreeNode(TTreeViewCtrl& tw, HTREEITEM hItem)
122:
123 TreeView(&tw)
124{
125 WARNX(OwlCommCtrl, !hItem, 1, "Constructed TTreeNode passing a null hItem");
126 ItemStruct.hItem = hItem;
127 ItemStruct.mask = TVIF_HANDLE;
128}
129
130//
131/// Copy constructor: create a new node by copying another node
132/// Called implicitly by functions that return a TTreeNode by value;
133/// otherwise, shouldn't be needed.
134///
135/// Parameters
136/// \arg \c \b other A TTreeNode object to copy.
137//
138TTreeNode::TTreeNode(const TTreeNode& other)
139{
140 CopyNode(other);
141}
142
143//
144// Assignment operator
145//
147{
148 CopyNode(other);
149 return *this;
150}
151
152//
153// Reset node to make it a copy of another node
154//
156TTreeNode::CopyNode(const TTreeNode& node)
157{
158 TreeView = node.TreeView;
159 ItemStruct = node.ItemStruct;
160 FlushCache();
161
162 // can't do "n.CacheText" on a const object (TAPointer prevents it)
163 //
165 if (n.CacheText) {
166 CacheText = new tchar[::_tcslen(n.CacheText) + 1];
167 ::_tcscpy(CacheText, n.CacheText);
168 ItemStruct.pszText = CacheText;
169 }
170 return *this;
171}
172
173//
174/// Construct the node neighboring a given node. The flag indicates
175/// whether to create the next, previous, parent, or first child node.
176///
177/// Parameters:
178/// \arg node A TTreeNode object having a relationship to the TTreeNode object to be
179/// created.
180/// \arg flag A Tree-View Get Next constant (32-bit applications) or a TNextCode value
181/// specifying the relationship between node and the TTreeNode object to be created.
182///
183/// Remarks:
184/// - Initializes the TreeView data member to node.TreeView.
185/// - Initializes the ItemStruct data member to node.ItemStruct.
186/// - In 32-bit applications, determines which item in the Tree-View
187/// control to associate with the new TTreeNode object by sending a TVM_GETNEXTITEM
188/// message to the control.
189//
190TTreeNode::TTreeNode(const TTreeNode& tn, uint32 flag)
191:
192 ItemStruct(tn.ItemStruct),
193 TreeView(tn.TreeView)
194{
195 TreeView->GetNextItem(flag, *this);
196}
197
198//
199/// Inserts a new sibling item into the Tree-View (TreeView) control. (Adds the item above this item.)
200//
201/// Parameters
202/// \arg \c \b node A TTreeNode object encapsulating an item that will be a sibling of the new
203/// item.
204///
205/// Return Value
206/// Returns a TTreeNode object encapsulating the new item. Returns NULL upon
207/// failure. (In 32-bit applications, you can check for a NULL handle using the
208/// HTREEITEM() operator.)
209//
212{
213 return InsertItem(item);
214}
215
216
219{
220 return InsertItem( node );
221}
222
223//
224// Inserts a child before the passed item.
225//
226// If the function fails, the handle in object returned is NULL. Here's how
227// to check for errors:
228//
229// node = InsertChild(TTvItem("node text"), Last);
230// if (!node) // the HTREEITEM() conversion operator kicks in
231// DoErrorHandling();
232//
233// Incidentally, the node returned has only the TVIF_HANDLE mask bit
234// set, even if the item passed in contained more attributes. All the
235// attributes are correctly sent to the control, but only a handle is
236// returned.
237//
240{
242 tvis.hParent = *this;
243 tvis.hInsertAfter = (HTREEITEM)how;
244 tvis.item = (TVITEM&)item;
246 return TTreeNode(*TreeView, hItem);
247}
248
249//
250// Inserts an item before this item.
251//
254{
256 TTreeNode parent = GetParent();
257
258 tvis.hParent = parent;
259 tvis.hInsertAfter = *this;
260 tvis.item = (TVITEM&)item;
262 return TTreeNode(*TreeView, hItem);
263}
264
265//
266// Create a temporary structure to store additional information for the
267// comparison object.
268//
269struct TreeCompareThunk {
270 const TTvComparator* This;
271 LPARAM ItemData;
272};
273
274//
275//
276//
277int CALLBACK
279{
280 TreeCompareThunk* ct = reinterpret_cast<TreeCompareThunk*>(lParam);
281 return ct->This->Compare(itemData1, itemData2, ct->ItemData);
282}
283
284//
285// Recursively sort the children of the nodes.
286//
287bool
289{
290 TreeCompareThunk ct;
291 ct.This = &comparator;
292 ct.ItemData = lParam;
293 return TreeView->SortChildren(OwlTreeWindCompare, *this, recurse, reinterpret_cast<LPARAM>(&ct));
294}
295
296//
297//
298//
299bool
301{
302 PRECONDITION(ItemStruct.hItem || !getNew);
304
305 // Send a request message to the control if a) the user asked for the
306 // message to be sent, or b) the ItemStruct doesn't yet contain
307 // the state data.
308 //
309 if(getNew || (ItemStruct.mask & TVIF_STATE)==0){
310 ItemStruct.mask |= TVIF_STATE;
311 if (!GetItem()) {
312 ItemStruct.mask &= ~TVIF_STATE;
313 return false;
314 }
315 }
316
317 state = ItemStruct.state;
318 return true;
319}
320
321//
322//
323//
324bool
325TTreeNode::SetState(uint state, bool sendNow /*=true*/ )
326{
329
330 ItemStruct.state = state;
331 ItemStruct.stateMask |= state;
332 ItemStruct.mask |= TVIF_STATE;
333
334 if (sendNow)
335 if (!SetItem())
336 return false;
337
338 return true;
339}
340
341//
342// Set the node's text.
343// If sendNow is false, the text is merely cached. It will be
344// sent to the control on the next call to SetItem.
345//
346bool
348{
350
351 if( (uint)ItemStruct.cchTextMax < ::_tcslen(text) + 1 )
352 FlushCache();
353
354 if (!CacheText) {
355 CacheText = new tchar[::_tcslen(text) + 1];
356 }
357 size_t length = ::_tcslen(text) + 1;
358 _tcsncpy(CacheText, text, length);
359 ItemStruct.pszText = CacheText;
360 ItemStruct.cchTextMax = static_cast<int>(length);
361 ItemStruct.mask |= TVIF_TEXT;
362 return sendNow ? SetItem() : true;
363}
364
365//
366// Get the node's text.
367//
368// The text is copied into the "text" buffer. The caller is responsible
369// for creating and managing this buffer.
370//
371// If getNew if false, the text is simply retrieved from the cache.
372// If true, GetText queries the control for the node's current text.
373// If the TTreeNode doesn't yet have any text cached, it always ignores
374// getNew and queries the control directly.
375//
376bool
378{
379 // Update the cache if necessary
380 //
382
383 if (CacheText) {
384 _tcsncpy(text, CacheText, length);
385 }
386 return CacheText != 0;
387}
388
389// Retrieve a pointer to the node's text string. The node object
390// owns the buffer pointed to. The caller should not delete it.
391// If GetText fails, it returns 0.
392//
395{
397
398 // Send a request message to the control if a) the user asked for the
399 // message to be sent, or b) the ItemStruct hasn't yet received
400 // the text data.
401 //
402 if (getNew || !CacheText || !(ItemStruct.mask & TVIF_TEXT)) {
403 FlushCache();
404 CacheText = new tchar[NodeTextCacheSize];
405 ItemStruct.mask |= TVIF_TEXT;
406 ItemStruct.pszText = CacheText;
407 ItemStruct.cchTextMax = NodeTextCacheSize;
408 if (!GetItem()) {
409 ItemStruct.mask &= ~TVIF_TEXT;
410 return 0;
411 }
412 }
413 return CacheText;
414}
415
416//
417// Set the node's image indexes.
418//
419bool
420TTreeNode::SetImageIndex(int index, bool sendNow /*=true*/)
421{
423 ItemStruct.mask |= TVIF_IMAGE;
424 ItemStruct.iImage = index;
425 return sendNow ? SetItem() : true;
426}
427
428//
429//
430//
431bool
433{
436 ItemStruct.iSelectedImage = index;
437 return sendNow ? SetItem() : true;
438}
439
440//
441// Set and Get the user-defined node data.
442//
443
444bool
446{
448 ItemStruct.mask |= TVIF_PARAM;
449 ItemStruct.lParam = data;
450 return sendNow ? SetItem() : true;
451}
452
453//
454//
455//
456bool
458{
459 PRECONDITION(ItemStruct.hItem || !getNew);
461
462 // Send a request message to the control if a) the user asked for the
463 // message to be sent, or b) the ItemStruct doesn't yet contain
464 // the lParam data.
465 //
466 if (getNew || (ItemStruct.mask & TVIF_PARAM)==0) {
467 ItemStruct.mask |= TVIF_PARAM;
468 if (!GetItem()) {
469 ItemStruct.mask &= ~TVIF_PARAM;
470 return false;
471 }
472 }
473
474 data = ItemStruct.lParam;
475 return true;
476}
477
478//
479// Set and Get the node's HasChildren info (TVITEM.cChildren).
480//
481
482bool
484{
485 PRECONDITION(ItemStruct.hItem || !getNew);
487
488 // Send a request message to the control if a) the user asked for the
489 // message to be sent, or b) the ItemStruct doesn't yet contain
490 // the cChildren data.
491 //
492 if(getNew || (ItemStruct.mask & TVIF_CHILDREN)==0){
494 if(!GetItem()){
496 return false;
497 }
498 }
499
500 hasChildren = ItemStruct.cChildren;
501 return true;
502}
503
504//
505//
506//
507bool
509{
512 ItemStruct.cChildren = count;
513 return sendNow ? SetItem(&ItemStruct) : true;
514}
515
516//
517// Return the selected node.
518//
524
525//
526// Return the drop target node.
527//
533
534//
535// Return the first visible node.
536//
542
543//
544// Retrieve an item's bounding rectangle
545//
546bool
548{
551
552 // The control expects to receive the HTREEITEM in the LPARAM
553 //
554
555// Expanded by Val Ovechkin 12:50 PM 6/3/98
556 void *p = &rect;
557 *(REINTERPRET_CAST(HTREEITEM*, p)) = ItemStruct.hItem;
558
559// *(REINTERPRET_CAST(HTREEITEM*, &rect)) = ItemStruct.hItem;
560
562}
563
564//
565/// Sets the node's checked state.
566/// Assumes that the tree has the TVS_CHECKBOXES style, or has state images manually implemented
567/// in a similar manner to represent checked state.
568//
569void
571{
574 WARNX(OwlCommCtrl, !TreeView->HasStyle(TVS_CHECKBOXES), 1, "Check called for tree without the TVS_CHECKBOXES style.");
575
577}
578
579//
580/// Retrieves the node's checked state.
581/// Assumes that the tree has the TVS_CHECKBOXES style, or has state images manually implemented
582/// in a similar manner to represent checked state.
583//
584bool
586{
589 WARNX(OwlCommCtrl, !TreeView->HasStyle(TVS_CHECKBOXES), 1, "IsChecked called for tree without the TVS_CHECKBOXES style.");
590
592 WARNX(OwlCommCtrl, state > 1, 0, "IsChecked: State not in [0, 1].");
593 return state == 1;
594}
595
596//
597// Empty the node's text cache
598//
599void
601{
602 CacheText = 0; // CacheText is a smart pointer
603}
604
605//
606// Delete the item from the control.
607//
608bool
610{
612 if (TreeView->Delete(*this)) {
613 ItemStruct.hItem = 0;
614 ItemStruct.mask &= ~TVIF_HANDLE;
615 return true;
616 }
617 else
618 return false;
619}
620
621//----------------------------------------------------------------------------
622// TTreeViewCtrl
623
628
629//
630// Dynamically create the window.
631//
632TTreeViewCtrl::TTreeViewCtrl(TWindow* parent, int id, int x, int y, int w, int h,
633 uint32 style, TModule* module)
634:
635 TControl(parent, id, nullptr, x, y, w, h, module)
636{
638 SetStyle(WS_CHILD | WS_VISIBLE | style);
639
640 uint32 exStyle = GetExStyle();
641 SetExStyle(exStyle |= WS_EX_CLIENTEDGE);
642}
643
644//
645// Create the TTreeViewCtrl object from a resource.
646//
653
654//
655// Destructor
656//
658{
659/*
660+ // GWC mods begin
661+ // If we do not call DeleteAllItems() here, then the application tries
662+ // to delete them at shutdown. That causes a crash because there is no HWND.
663+ DeleteAllItems();
664+ // GWC mods end
665*/
666}
667
668//
669// Sets the style of the control.
670//
671void
676
677//
678// Returns true if a particular style is set.
679//
680bool
682{
683 return (GetStyle() & style) ? true : false;
684}
685
686//
687// Returns the common control class name WC_TREEVIEW
688//
693
694//
695// Recursively sort the children nodes.
696//
697bool
699{
701 cb.hParent = parent;
702 cb.lpfnCompare = func;
703 cb.lParam = lParam;
704
706}
707//
708uint
709TTreeViewCtrl::Transfer(void* /*buffer*/, TTransferDirection /*direction*/)
710{
711 return 0;
712}
713
714//
715// Overrides unwanted behaviour; for a tree with the TVS_CHECKBOXES style, the toggle key (space)
716// enables the display of checkboxes for tree nodes that explicitly have checkboxes turned off
717// (i.e. have a state image index of 0). We want the the toggle key to be ignored in this case.
718//
719void
721{
722 if (HasStyle(TVS_CHECKBOXES) && key == VK_SPACE) // Toggle key?
723 {
724 uint s = 0;
725 bool r = GetSelection().GetState(s, false);
726 CHECK(r); InUse(r);
727 if ((s & TVIS_STATEIMAGEMASK) == 0) // No checkbox?
728 return; // Don't process the toggle key for this node.
729 }
730 TControl::EvKeyDown(key, repeatCount, flags);
731}
732
733//
734// Overrides unwanted behaviour; for a tree with the TVS_CHECKBOXES style, the control interprets
735// the system key Alt+Space as a checkbox toggle command. We want Alt+Space to be ignored by the
736// control and processed by the frame window in the normal way (i.e. open the system menu).
737//
738void
740{
741 if (HasStyle(TVS_CHECKBOXES) && key == VK_SPACE) // Alt+Space?
742 return; // Don't process this system key as a checkbox toggle request.
744}
745
746//
747// Private Init function to zero out the data members.
748//
749void
751{
752 memset(this, 0, sizeof(TVITEM));
753}
754
755//
756// Default constructor.
757//
759{
760 Init();
761}
762
763//
764// Initialize based on an existing item.
765//
767{
768 Init();
769 *(TVITEM*)this = item;
770}
771
772//
773// Construct using only text.
774//
776{
777 Init();
778 SetText(text, len);
779}
780
781//
782// Construct based on text, an image index, and a selected index.
783//
785{
786 Init();
787 SetText(text);
788 SetImageIndex(index);
790}
791
792//
793// Sets the text of the item.
794//
795void
802
803//
804// Returns the text of the item.
805//
806void
808{
809 if (mask & TVIF_TEXT) {
810 _tcsncpy(buffer, pszText, size);
811 }
812}
813
814//
815// Sets the magic cookie for the item.
816//
817void
819{
820 mask |= TVIF_HANDLE;
821 hItem = item;
822}
823
824//
825// Returns the magic cookie of the item.
826//
829{
830 return (mask & TVIF_HANDLE) ? hItem : 0;
831}
832
833//
834// Sets the extra data of the item.
835//
836void
842
843//
844// Sets the image index of the item.
845//
846void
848{
849 mask |= TVIF_IMAGE;
850 iImage = index;
851}
852
853//
854// Sets the selected image index of the item.
855//
856void
862
863//
864// Returns the extra data.
865//
866LPARAM
868{
869 return (mask & TVIF_PARAM) ? lParam : 0;
870}
871
872
873#if OWL_PERSISTENT_STREAMS
874
876
877//
878// Reads an instance of TTreeViewCtrl from the passed ipstream
879//
880void*
881TTreeViewCtrl::Streamer::Read(ipstream& is, uint32 /*version*/) const
882{
883 ReadBaseObject((TControl*)GetObject(), is);
884 return GetObject();
885}
886
887//
888// Writes the TTreeViewCtrl to the passed opstream
889//
890void
891TTreeViewCtrl::Streamer::Write(opstream& os) const
892{
893 WriteBaseObject((TControl*)GetObject(), os);
894}
895
896#endif
897
898} // OWL namespace
899/* ========================================================================== */
900
#define CHECK(condition)
Definition checks.h:239
#define WARNX(group, condition, level, message)
Definition checks.h:277
#define PRECONDITION(condition)
Definition checks.h:227
#define DIAG_DECLARE_GROUP(group)
Definition checks.h:404
TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton.
Definition control.h:38
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
Use this class to navigate the TTreeViewCtrl.
TTreeNode InsertChild(const TTreeNode &node, THowToInsert how) const
bool Delete(void)
bool SetSelectedImageIndex(int index, bool sendNow=true)
TTreeViewCtrl * TreeView
wrapper for item of this tree
bool GetItemData(LPARAM &data, bool getNew=true)
TTvItem ItemStruct
contains a TVITEM with HTREEITEM
THowToInsert
Specifies how to insert a new item into a Tree-View control.
bool IsChecked() const
Retrieves the node's checked state.
bool SetItemData(LPARAM data, bool sendNow=true)
bool GetItem(void)
Update the item information in the node.
TTreeNode AddSibling(const TTreeNode &node) const
bool GetText(TCHAR *text, uint length, bool getNew=false)
bool SetItem(void)
bool SetText(LPCTSTR text, bool sendNow=true)
bool SortChildren(bool recurse=false)
Sort the children of this node.
bool GetHasChildren(int &hasChildren, bool getNew=true)
bool SetHasChildren(int hasChildren, bool sendNow=true)
bool SetImageIndex(int index, bool sendNow=true)
bool GetItemRect(TRect &rect, bool textOnly=true) const
void FlushCache(void)
TTreeNode GetNextItem(uint32 flag) const
Return the next item.
@ Caret
Get the item with the caret.
@ FirstVisible
Get the first visible item.
@ DropHilite
Get the item that is the drop target.
void Check(bool state=true)
Sets the node's checked state.
HTREEITEM GetHTreeItem() const
bool GetState(uint &state, bool getNew=true)
TTreeNode & operator=(const TTreeNode &other)
bool SetState(uint state, bool sendNow=true)
TTreeNode GetParent() const
Return the parent of the current node.
TTreeNode InsertItem(const TTreeNode &node) const
Encapsulates the TreeView common control.
HTREEITEM GetNextItem(uint32 nc, HTREEITEM)
Return the next item.
HTREEITEM InsertItem(TV_INSERTSTRUCT *)
Insert an item.
void EvSysKeyDown(uint key, uint repeatCount, uint flags)
bool Delete(HTREEITEM)
Delete the item.
bool HasStyle(uint32 style)
TTreeViewCtrl(TWindow *parent, int id, int x, int y, int w, int h, uint32 style=0, TModule *module=0)
~TTreeViewCtrl() override
TTreeNode GetDropHilite()
auto Transfer(void *buffer, TTransferDirection) -> uint override
void SetStyle(uint32 style)
TTreeNode GetRoot()
Return the root node.
TTreeNode GetSelection()
TTreeNode GetFirstVisible()
auto GetWindowClassName() -> TWindowClassName override
void EvKeyDown(uint key, uint repeatCount, uint flags)
bool SortChildren(PFNTVCOMPARE, HTREEITEM parent, bool recurse=false, LPARAM lParam=0)
Base class for comparing tree nodes.
Used to represent the data to be stored in the TTreeViewCtrl.
void SetText(LPCTSTR, int len=-1)
Initialize the text.
void SetItemData(LPARAM)
Store additional information.
void SetHTreeItem(HTREEITEM hItem)
TTvItem()
this is called by some TTreeNode constructors
void GetText(TCHAR *, int len)
LPARAM GetItemData() const
void SetSelectedImageIndex(int index)
Set the selected image index.
void SetImageIndex(int index)
Set the imagelist index.
HTREEITEM GetHTreeitem() const
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
Definition module.h:47
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
void EvKeyDown(uint key, uint repeatCount, uint flags)
The default message handler for WM_KEYDOWN.
Definition window.h:3771
void EvSysKeyDown(uint key, uint repeatCount, uint flags)
The default message handler for WM_SYSKEYDOWN.
Definition window.h:4157
uint32 SetExStyle(uint32 style)
Sets the extra style bits of the window.
Definition window.cpp:3583
uint32 GetExStyle() const
Gets the extra style bits of the window.
Definition window.cpp:3575
uint32 GetStyle() const
Gets the style bits of the underlying window or the 'Style' member of the attribute structure associa...
Definition window.cpp:3558
uint32 SetStyle(uint32 style)
Sets the style bits of the underlying window or the 'Style' member of the attribute structure associa...
Definition window.cpp:3567
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
Definition window.cpp:3288
HWND GetHandle() const
Returns the handle of the window.
Definition window.h:2020
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition objstrm.h:391
#define _tcscpy
Definition cygwin.h:79
#define _tcsncpy
Definition cygwin.h:80
#define _MAX_PATH
Definition cygwin.h:97
#define _tcslen
Definition cygwin.h:74
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition eventhan.h:492
void ReadBaseObject(Base *base, ipstream &in)
Definition objstrm.h:1159
#define IMPLEMENT_STREAMABLE1(cls, base1)
Definition objstrm.h:1725
void WriteBaseObject(Base *base, opstream &out)
Definition objstrm.h:1150
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Definition window.h:92
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
void InitializeCommonControls(uint controlFlags)
Wrapper for the Windows API function InitCommmonControlsEx.
Definition commctrl.cpp:19
int CALLBACK OwlTreeWindCompare(LPARAM itemData1, LPARAM itemData2, LPARAM lParam)
EV_WM_KEYDOWN
Definition edit.cpp:82
void InUse(const T &arg)
Handy utility to avoid compiler warnings about unused parameters.
Definition defs.h:299
LPARAM TParam2
Second parameter type.
Definition dispatch.h:55
bool ToBool(const T &t)
Definition defs.h:291
WPARAM TParam1
First parameter type.
Definition dispatch.h:54
OWL_DIAGINFO
Definition animctrl.cpp:14
END_RESPONSE_TABLE
Definition button.cpp:26
unsigned int uint
Definition number.h:25
#define CONST_CAST(targetType, object)
Definition defs.h:273
#define REINTERPRET_CAST(targetType, object)
Definition defs.h:275
Definition of TSystem, a system information provider class.
Declares TTreeViewCtrl, TTreeNode, and TTvItem.
#define WS_EX_CLIENTEDGE
Definition wsysinc.h:33