03-22-2023, 08:05 PM
(This post was last modified: 03-22-2023, 08:11 PM by SpriggsySpriggs.)
It looks like this is because you defined "hw" as LONG but CreateWindowEx returns an OFFSET. Make sure all your handles are OFFSETs.
As for the underscore vs not.... I usually code with $NOPREFIX turned on and I just copied and pasted from code I had opened. Oops. Also, your declaration for CreateWindowEx has some variable type mismatches. Copy the declaration I gave you (but fix the underscores) and also replace DECLARE DYNAMIC LIBRARY "user32" in your code with DECLARE CUSTOMTYPE LIBRARY. Otherwise, you're going to need the "A" at the end of CreateWindowEx. If you don't change either the library declaration or the name of the function, then you will hit a runtime error saying that function doesn't exist in the library.
As for the underscore vs not.... I usually code with $NOPREFIX turned on and I just copied and pasted from code I had opened. Oops. Also, your declaration for CreateWindowEx has some variable type mismatches. Copy the declaration I gave you (but fix the underscores) and also replace DECLARE DYNAMIC LIBRARY "user32" in your code with DECLARE CUSTOMTYPE LIBRARY. Otherwise, you're going to need the "A" at the end of CreateWindowEx. If you don't change either the library declaration or the name of the function, then you will hit a runtime error saying that function doesn't exist in the library.
Tread on those who tread on you