windows.h's MoveWindow() function wont resize window #20628

Closed
opened 2026-01-31 07:19:34 +00:00 by claunia · 4 comments
Owner

Originally created by @edgvrl on GitHub (Oct 5, 2023).

Windows Terminal version

1.17.11461.0

Windows build number

10.0.22621.1992

Other Software

A simple c programm using windows.h

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

int main(){

    SetConsoleTitle("  - c2048 -  ");

    HWND wh = GetConsoleWindow();
    MoveWindow(wh, 0, 0, 340, 180, TRUE);

    return 0;

}

Steps to reproduce

call the MoveWindow() function and it wont change the size

Expected Behavior

when i call the MoveWindow() function, i obviously want it to change the window size and move the window

Actual Behavior

it didn't change the window size

Originally created by @edgvrl on GitHub (Oct 5, 2023). ### Windows Terminal version 1.17.11461.0 ### Windows build number 10.0.22621.1992 ### Other Software A simple c programm using windows.h ```c #include <stdio.h> #include <stdlib.h> #include <windows.h> int main(){ SetConsoleTitle(" - c2048 - "); HWND wh = GetConsoleWindow(); MoveWindow(wh, 0, 0, 340, 180, TRUE); return 0; } ``` ### Steps to reproduce call the MoveWindow() function and it wont change the size ### Expected Behavior when i call the MoveWindow() function, i obviously want it to change the window size and move the window ### Actual Behavior it didn't change the window size
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:19:35 +00:00
Author
Owner

@lhecker commented on GitHub (Oct 5, 2023):

I believe this issue could be considered a duplicate of #5094 and so I'll close it if you don't mind. /dup #5094
If you can, please leave an upvote on #5094. This helps us set our priorities.

@lhecker commented on GitHub (Oct 5, 2023): I believe this issue could be considered a duplicate of #5094 and so I'll close it if you don't mind. /dup #5094 If you can, please leave an upvote on #5094. This helps us set our priorities.
Author
Owner

@zadjii-msft commented on GitHub (Oct 5, 2023):

It might actually be more specifically /dup #13525

We really should have a list of "GetConsoleWindow considered harmful" somewhere 😝

@zadjii-msft commented on GitHub (Oct 5, 2023): It might actually be more specifically /dup #13525 We really should have a list of "`GetConsoleWindow` considered harmful" somewhere 😝
Author
Owner

@zadjii-msft commented on GitHub (Oct 5, 2023):

(apparently the bot is acting up)

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@zadjii-msft commented on GitHub (Oct 5, 2023): (apparently the bot is acting up) Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Oct 5, 2023):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Oct 5, 2023): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20628