Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
If it is relevant to add height for a header for a given list view, it
is better to override Height and do it there.
|
|
In case it is not supported. If I am not mistaken, SWI-Prolog supports
Windows 2000, so there is no reason why Episode Browser shouldn't.
|
|
The user-defined conversion function makes the interface a lot simpler
AND safer.
|
|
It seems unnecessary to throw exceptions when simply checking whether
a library exists.
|
|
|
|
One cannot use WM_LBUTTONDBLCLK here, because it relies on
WM_LBUTTONDOWN being passed to the default message handler.
|
|
Next step is to allow a double click to reset the split to be
automatically resized.
|
|
|
|
I don't hate Hungarian notation. It has some very nice qualities. But
it also adds a lot of typing.
That said, not using it feels a bit... unsafe. I might go back on this
decision. We'll see.
|
|
(When the focused episode is near the end of the list.)
|
|
|
|
|
|
|
|
|
|
|
|
The difference in speed seems to be extremely minimal: a few
microseconds.
|
|
std::basic_string is nice, but it is not very ergonomic if everything
you really need is to automatically free C strings at end of scope.
I suppose I could have used std::unique_ptr for this, but I suspect
the ergonomics would be worse.
|
|
|
|
Pl has also been refactored, so that the unnecessary throw and
catch have been removed.
|
|
This style is more compact and quicker to read once you know what the
first two member in LVITEM are (mask and iItem).
|
|
This makes it much more ergonomic and less error-prone to look up list
view items.
|
|
I find it much simpler. It is very safe, as wszf only accepts
fixed-size arrays. There is, of course, the chance that swprintf_s
fails and writes nothing into the array. This can be handled by the
caller, if desired.
|
|
|
|
|
|
The string arrays are static.
|
|
See f7534e2.
|
|
This has two benefits:
1. The for loop is avoided.
2. It is shorter.
The drawback is that it is a bit opaque. The order of the array
elements still matter, but now it is coupled to what is declared in
resource.h, a completely separate file. This makes it harder to change
resource.h.
|
|
swprintf_s excepts the NUMBER of characters, not the SIZE of the
buffer. The argument is named sizeOfBuffer in the documentation, but
don't let that fool you (like it did me).
Interestingly enough, this bug causes a crash ONLY when compiling
WITHOUT optimizations (at least on my system). The crash was
introduced in 3a133c4, where I removed the `static' attribute from
tszRating.
I guess the optimizer moves the memory around such that the memory
after the string happens to be unimportant.
|
|
|
|
Because GNU windres doesn't support UTF-16, resources.rc must be saved
as Latin-1.
|
|
|
|
|
|
Even though it is a fun challange in many ways, I think that,
realistically, it is probably not worth the complexity. The
Prolog backend isn't ANSI-compatible either.
|
|
|
|
|
|
The resource IDs have been changed such that
* the first (least significant) half byte represents the "group",
* the second half byte represents the "subgroup", and
* the third and fourth half bytes uniquely identify the resource
within the group.
Combined with the use of a few helper macros, this makes the message
handling code a lot simpler.
|
|
|
|
This version correctly finds dependencies inside dependencies.
One may wonder why I don't just use gcc -MM c/*.cpp, which produces
basically the same result. The simple reason is that gcc does it very
slowly. It would be unfeasible to run before every compilation.
|
|
|
|
See c6cd2f1.
|
|
|
|
|
|
|
|
|
|
This also fixes an off-by-one error leading to an out-of-bounds write.
|
|
|