How to customize the size of a window?

2

How can I 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 very small.

    
asked by anonymous 29.07.2016 / 14:18

1 answer

2

A MessagaBox can not have its size determined directly by the programmer. The size is determined indirectly by the amount of text placed in it.

If you need to determine the same size, you must use a normal window with CreateWindow() .

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

29.07.2016 / 14:22