codevania
codevania

Reputation: 505

How to enable scrollable console?

In Visual C++, I Created console using AllocConsole function. But I could not control its scroll bar using mouse wheel. Only way to control scroll bar is dragging it. It is too uncomfortable.

Is there any way to control scroll bar using mouse wheel?

Upvotes: 2

Views: 2400

Answers (1)

J-16 SDiZ
J-16 SDiZ

Reputation: 26910

Try SetConsoleMode and disable ENABLE_MOUSE_INPUT and use ENABLE_PROCESSED_INPUT.

something like

GetConsoleMode(hConsoleHandle, &lpMode);
SetConsoleMode(hConsoleHandle, lpMode & ~ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT);

Upvotes: 3

Related Questions