mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 2
D
Bowl of petunias
OP Offline
Bowl of petunias
D
Joined: Jan 2003
Posts: 2
Anyone knows how mIRC windows are working? I mean the window that everyone's sentences are being read... How it is being created and how we are able to select text in that window and how can we paint it? How does Khaled mardam bey puts text in color to that window?

I just want to create windows as needed for channel or for privmsgs.. And i want to be able to write text to that window like PrivMSGQUERY windows in mIRC..

How can i create windows like in mIRC and how can i assign scrollbars or write text in different colors to that window? ( Also how can i make the window's texts selectable? )

Thank you very much.

Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
This is your lucky day squire...

Open mIRC and type this:

/help /window

It will show you everything there is to know about mIRC windows blush

Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
You would /echo whatever text you want into the window you want it in.

/echo -s echos to the Status Window
/echo -a echos to the currently active window.
/echo #mIRC echo's to #mIRC

You also have th option to set a base line color when you use /echo N <target>

//echo $color(JOIN) -ti2 #mIRC * Joins: $nick uses the color you have selected for your JOIN color in Alt-K (Color dialog).

/help /echo


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Joined: Jan 2003
Posts: 2
D
Bowl of petunias
OP Offline
Bowl of petunias
D
Joined: Jan 2003
Posts: 2
I mean with win32 API

......
h = CreateWindow
(
"Static",
"",
WS_OVERLAPPEDWINDOW+WS_CLIPCHILDREN+ES_AUTOVSCROLL+WS_VSCROLL+WS_VISIBLE,
this->Left, this->Top,
300, 200,
NULL,
NULL,
HInstance,
NULL
);
.......
Something like this.
But also i want to be able to print out text in to that window.
I'm a bit new to WIN32 API.. I'm reading tutorials. I wonder if i can learn the exact system of mIRC windows.. frown

Joined: Dec 2002
Posts: 89
N
Babel fish
Offline
Babel fish
N
Joined: Dec 2002
Posts: 89
I believe that mIRC windows are "custom drawn". K. had to draw everything himself, because 16bit Windows didn't provide the RichEdit control capable of displaying colours.

You can order mIRC to create a window - /help SendMessage. You won't have direct access to it, although subclassing usually works.


Sincerely,
Necroman, #mIRC @ Undernet
Joined: Jan 2003
Posts: 14
B
Pikka bird
Offline
Pikka bird
B
Joined: Jan 2003
Posts: 14
I actually figured you were thinking of the way to do it in the Win32 API...
Necroman; Also the RichEdit control is a bit crap at displaying certain fonts as you probably know(?).
And you're not mistaken about mIRC drawing everything itself.

I'd use that static window and some things to look up would be;

WM_DRAWITEM
GetTextMetrics
SetBkColor
SetTextColor
CreateFont
FillRect
TextOut

And of course other things.. (scrollbar control etc.)
Be prepared to do some calculating on this if you're up to it..
Alot of string manipulations and a bit of logical thinking.

I like how Khaled did this, this thing is one of the things that I admire most about mIRC.. it's nicely executed.
I would also recommend you to draw a character at a time too.. and I am guessing Mardam-Bey does that.
That means of course you'll have to take care of wordwrapping and what else yourself too.
Maybe even Khaled will notice this thread and give you some pointers on how to start with this? smile

Hope it all works out for you smirk


Sincerely,
babyorphan, #Lobby @ geekIRC
-------
bOS2 - IRC client
version; 1.07
Joined: Jan 2003
Posts: 2
M
Bowl of petunias
Offline
Bowl of petunias
M
Joined: Jan 2003
Posts: 2
If you know how to use create dialog tables and dialogs (/help /dialog for more information) i offer you to use some dlls that can help you create the dialogs you want. You need just 2 - 3 dlls:
- mdx.dll - to change the style of dialogs, text, textcolors, border, and so on. try to find and help file for that dll.
- demid.dll - to attach it into any mirc window(@custom,channel, query,nicklist or status window). Also with this dll you can make the dialog transparent using a .png image or make just a part of the dialog transparent; remove the dialog table,...
- colors.dll and font.dll (you may not use them).
If you decide to use these dlls all you have to do is to write the names into any search engine or visit these pages
www.mircsripts.org
or
mircscripters.net or .org


Link Copied to Clipboard