News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Fun With Console Window

Started by dedndave, March 22, 2011, 03:32:07 AM

Previous topic - Next topic

dedndave

just playing around, here
i tried this to see if it would work...



...and it does   :8)
however, i have to figure out a way to intercept the messages that go to the console window
with a little effort, you could add features and, perhaps, fix a couple console bugs

i guess i could use PeekMessage or something
any ideas ?

oh - i know.....
SetWindowLong and redirect the messages by setting WndProc   :bg
i can get the original WndProc address first, maybe ?
and use that as kind of a DefWindowProc

dedndave

got it !!!!

GetClassLong / SetClassLong

we can have all kinds of fun with this   :8)

one use i can see right off....

Copy to Clipboard with code tags
but - it's not limited to just adding a menu
there are all kinds of things we can do

hutch--

Dave,

Direct clipboard cut copy and paste into the console would be a big plus, depends how much work you want to do.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

still have an issue to work out
how to run a program inside the console - like the old TSR's
well - something along that line
it may require something like running cmd.exe in a shell - haven't figured out the details
i will ponder it for a while   :P

donkey

Hi Dave,

Reading through the thread I still can't figure out what you're trying to do. But if its to communicate with an app running in the console, couldn't you just use pipes ?
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

dedndave

hi Edgar
well - i wasn't really trying to accomplish anything to begin with - lol
but - the idea entered my mind that things can be done with the console that i hadn't thought of previously
the copy/paste bugs of the console could be fixed - and even enhanced
it is simply a matter of getting the window handle and "having your way" with it

redskull

Quote from: dedndave on March 22, 2011, 05:22:27 PM
it is simply a matter of getting the window handle and "having your way" with it

I tried having my way with console windows in the past, but found it not quite that simple.  Some things just don't work for console windows, no matter what sort of shenigans you try.  The only one I can think of off-hand is subclassing, but i remember many things just failing for no apparent reason.  But I'm very interested to see this sort of fun, so please keep posting your success stories.

-r
Strange women, lying in ponds, distributing swords, is no basis for a system of government

dedndave

that's really what it is, too, Red - just for fun   :P
but - something useful may come of it