Hi I have to run a program in C++ and I want to make sure when the program is executed, it opens the console in a particular size/dimensions, so that the display in my program is proper. I need help as I don't know how to do it. I am using Dev C++ 5.42(Orwell). I tried using
using namespace std;
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
[Error] expected constructor, destructor, or type conversion before '(' token
That function is useless for console applications, which don't own a window (unless they create one using the
CreateWindow API, which is atypical for console apps). Instead their output is connected to csrss, which does have windows.
You should be using
There's an example at http://www.cplusplus.com/forum/windows/10731/