How to customize the size of a window?

Asked

Viewed 107 times

2

How I can customize the size of a window I made using Win32?

My Code:

 #include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){
 MessageBox(NULL, "HELLO WORLD!","JANELA!", 0);
return 0;
}

But the window became too small.

1 answer

2


A MessagaBox() cannot have its size determined directly by the programmer. The size is indirectly determined by the amount of text placed on it.

If you need to determine the same size, you have to use a normal window with CreateWindow() and can create a customization to behave with ose was a MessageBox().

Each has a specific function in the UI. Do not make the choice for this reason. Think if you need a window or if you need a simple message box and accept the capacity of each one, this was thought of so purposefully.

  • OK... Thank you for the reply

  • @Drkill32 take a look at [tour], the best way to say thank you is to accept how you did and vote as well. You can vote on everything that was posted on the site (not only where you participate directly.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.