Sie sind auf Seite 1von 3

winfile development documentation -

this file contains notes on the conventions used while developing winfile.exe.
it is broken into several sections:

o window definitions
o window relationships
o message conventions
o variable conventions
o utility functions
o source file organization
o segmentation
o etc.

window definitions -

window relationships -

message conventions -

fs_changedisplay:
this message causes the window to alter the contents of what it's
displaying. it is valid for directory and search results windows.
there isn't a return value.

wparam - indicates the type of change being made:


cd_path - changes the path directory window
displays including a filespec
with wildcards. valid only for
directory windows. lparam points
to the new path. if lparam is
null, this is the refresh command.

cd_view - loword(lparam) contains the new


set of view flags. valid only for
directory windows.

cd_sort - loword(lparam) contains the new


sort flags.

lparam - depends upon the setting of wparam.

fs_getdirectory:
this message stores the window's current directory in the buffer
pointed to by lparam. it is valid for the tree and directory mdi
windows. the path is returned in upper case and always ends with
a backslash.

ex.: "e:\pre\", "c:\"

wparam - maximum length of string


lparam - lptstr to buffer will contain the directory path

fs_getdrive:
this message returns the single letter designation of the window's
current drive. it is valid for tree and directory mdi windows.
the letter is returned in upper case.

ex.: 'c', 'a'

wparam - unused
lparam - unused

fs_getselection:
this messages returns a near pointer to a string containing the
names of the window's selected file(s seperated by spaces. the
string is returned upper case. no path info in included unless
a directory is selected. the directories includes full path info
and not terminated with backslash.

the hiword of the return is a bool indicating if the last selected


item is a directory or not.

ex.: "foo.txt loo.loo e:\dir"

wparam - true if only the latest file selected should be


returned
lparam - unused

note: the sender is responsible for localfree()ing the returned


string.

variable conventions -

window words -
each mdi child window has the following extra bytes allocated with it:

gww_view - the "current" view flags for the window


gww_sort - the "current" sort flags for the window
gww_attribs - the "current" attributes to display

note: the tree window contains the "system wide" versions


of these flags. the search window is hard coded
to view_nameonly, idm_byname, and attr_default.

in addition, mdi children have the following extra bytes which are
specific to them:

gww_hwndlb - (directory) the hwnd of the window's list box


gww_hdta - (directory) the handle of the directories dta list

utility functions -
source file organization -

segmentation -

Das könnte Ihnen auch gefallen