mathewzhao
Technical User
(IDE: VC++ 6.0 OS: WinXP SP2 )
I looked up MSDN and found the API function'SetConsoleWindowInfo ' ,which can
resize,according to MSDN, the size and position of a console window, however,I tried
it and found it doesn't work at all.I don't understand why the API doesn't work on my PC.
Some books says the API function,SetWindowPos,can changes Z order of a child, pop-
up, or top-level window.I want to set the console window as the topmost window,so I
use the API function ,but I don't know how to get the handle of a console window,I
tried to get a console handle by the sentence, wHnd = GetStdHandle(STD_OUTPUT_HANDLE);
Unfortunately,I got the following error message:
error: argument of type "HANDLE" is incompatible with parameter of type "HWND".
Could anyone give me some suggestions? Thanx!
I looked up MSDN and found the API function'SetConsoleWindowInfo ' ,which can
resize,according to MSDN, the size and position of a console window, however,I tried
it and found it doesn't work at all.I don't understand why the API doesn't work on my PC.
Some books says the API function,SetWindowPos,can changes Z order of a child, pop-
up, or top-level window.I want to set the console window as the topmost window,so I
use the API function ,but I don't know how to get the handle of a console window,I
tried to get a console handle by the sentence, wHnd = GetStdHandle(STD_OUTPUT_HANDLE);
Unfortunately,I got the following error message:
error: argument of type "HANDLE" is incompatible with parameter of type "HWND".
Could anyone give me some suggestions? Thanx!