I have a question in regards to how HWND variables and for loops are handled.
Say I have the following code:
1 2 3 4 5
HWND handles[4];
for(int i = 0; i < 4; i++){
handles[i] = CreateWindowW( ...insert parameters here... );
}
For some reaon, this does not work.
1 2 3 4 5 6
HWND handles[4];
handles[0] = CreateWindowW( ..insert yet again more parameters...);
handles[1] = CreateWindowW( ..insert yet again more parameters...);
...
However, this does. What is the difference and why does it not work for the first one? Aren't they fundamentally the same?
Oh sorry. I guess I was remembering it wrong. I meant std::size(handles). I will edit my question to cut the confusion. (Mainly because the loop that used it in my program used a string array to determine a length that was appropiate for the loop; I am very sorry for that ;-; )
Ok I just retested my program, and I think it may have had to with some ShowWindowW functions meant to hide the windows when they were not in use. Sorry about wasting any time, but I am now able to eliminate ~600 lines of code because of this.
:)