Valhalla Legends Forums Archive | Battle.net Bot Development | Another Question

AuthorMessageTime
ChR0NiC
I was told that it is possible to make the text in a MsgBox "linked" to go to a URL. Could anyone possibly tell me how to do that???
October 6, 2003, 6:52 AM
iago
Yes, and it's been answered at least 3 times on this forum.
October 6, 2003, 7:14 AM
ChR0NiC
I searched and I can't seem to find it.......
October 6, 2003, 8:19 AM
Soul Taker
Try searching for "EM_AUTOURLDETECT", either here or on MSDN.
October 6, 2003, 12:49 PM
Adron
[quote author=Soul Taker link=board=17;threadid=2973;start=0#msg23163 date=1065444588]
Try searching for "EM_AUTOURLDETECT", either here or on MSDN.
[/quote]

That seems to find it for rich text boxes, not for msgboxes?
October 6, 2003, 4:18 PM
Soul Taker
[quote author=Adron link=board=17;threadid=2973;start=0#msg23172 date=1065457090]
[quote author=Soul Taker link=board=17;threadid=2973;start=0#msg23163 date=1065444588]
Try searching for "EM_AUTOURLDETECT", either here or on MSDN.
[/quote]

That seems to find it for rich text boxes, not for msgboxes?
[/quote]
That will teach me to pay attention when I first wake up!
October 6, 2003, 5:07 PM
iago
I assumed that's what he meant.

Besides, you can fake it with a RTB and a small form.
October 6, 2003, 8:16 PM
UserLoser
This is a crappy thread, it's non bot related in bot dev thread.
October 6, 2003, 9:10 PM
Adron
Yours is a crappy post, it's a non bot related rant in a non bot related thread on the bot dev board. How about finding out how to make those message boxes?
October 6, 2003, 9:44 PM
ChR0NiC
Yeah Im interested in msgbox's not anything else
October 6, 2003, 11:35 PM
St0rm.iD
Have no idea if this works, just throwing it out there...

Could get the hwnd of the message box (do message boxes have hwnds?) and use GDI to draw blue text to it. Then you could hax0r its wndproc and wait for mouseclick events and check if its within that rect.
October 7, 2003, 12:32 AM
Yoni
[quote author=St0rm.iD link=board=17;threadid=2973;start=0#msg23243 date=1065486756]
Have no idea if this works, just throwing it out there...

Could get the hwnd of the message box (do message boxes have hwnds?) and use GDI to draw blue text to it. Then you could hax0r its wndproc and wait for mouseclick events and check if its within that rect.
[/quote]

Hax0ring messageboxes is possible, I've done it before.
In almost all cases, it's easier to make a dialog of your own instead of using a message box for special purposes.
October 7, 2003, 12:47 AM
Adron
The "Messagebox" that appears when a terminal server is not in add/remove programs mode, is that a dialog box?
October 7, 2003, 4:49 PM
Skywing
[quote author=Adron link=board=17;threadid=2973;start=0#msg23302 date=1065545374]
The "Messagebox" that appears when a terminal server is not in add/remove programs mode, is that a dialog box?
[/quote]
Everything generated by MessageBox (or MessageBoxEx, SoftModalMessageBox, or MessageBoxTimeout) is actually a dialog, and uses the WC_DIALOG window class.
October 7, 2003, 6:09 PM
Adron
Ah. How interesting! I never checked that. Nothing wrong in making your own message boxes with dialogs then. It just uses some tight message loop that doesn't retrieve messages for other windows?
October 8, 2003, 3:32 PM
Skywing
[quote author=Adron link=board=17;threadid=2973;start=0#msg23398 date=1065627173]
Ah. How interesting! I never checked that. Nothing wrong in making your own message boxes with dialogs then. It just uses some tight message loop that doesn't retrieve messages for other windows?
[/quote]
It uses the standard modal dialog message loop, like you see with DialogBox(). I was wondering just how it worked, yesterday, but I didn't have time to fully investigate. I'm pretty sure that it does take a look at messages for other windows, though, and if those messages would cause the dialog to lose focus, it beeps at you and flashes the title bar (presumably instead of passing it on to the other window procedure). Of course, there could be some special support for modal message loops in win32k.sys; like I said, I'm not entirely certain. Try using Spy++ to see what the parent hwnd receives message-wise when a modal dialog owned by it is up.
October 8, 2003, 4:42 PM
Adron
Maybe this is different, but I have a feeling that in VB, showing a form modally still lets timer events occur on the parent form, but showing a message box does not. I'm not 100% certain though.
October 8, 2003, 5:30 PM
Skywing
[quote author=Adron link=board=17;threadid=2973;start=15#msg23418 date=1065634214]
Maybe this is different, but I have a feeling that in VB, showing a form modally still lets timer events occur on the parent form, but showing a message box does not. I'm not 100% certain though.
[/quote]
Do VB timers actually use WM_TIMER, though, or something else?
October 8, 2003, 7:23 PM
Adron
Test application: Two forms, form1 having two command buttons, a timer and a label, the timer being set for 100 ms interval.

form1:
[code]
Option Explicit

Private Sub Command1_Click()
Form2.Show 1
End Sub

Private Sub Command2_Click()
MsgBox "test"
End Sub

Private Sub Timer1_Timer()
Label1.Caption = Now
End Sub
[/code]

Clicking Command2 pauses the clock, clicking Command1 doesn't.
October 8, 2003, 7:43 PM
Adron
[quote author=Skywing link=board=17;threadid=2973;start=15#msg23425 date=1065641011]
[quote author=Adron link=board=17;threadid=2973;start=15#msg23418 date=1065634214]
Maybe this is different, but I have a feeling that in VB, showing a form modally still lets timer events occur on the parent form, but showing a message box does not. I'm not 100% certain though.
[/quote]
Do VB timers actually use WM_TIMER, though, or something else?
[/quote]

They do use WM_TIMER.
October 8, 2003, 7:46 PM
Skywing
[quote author=Adron link=board=17;threadid=2973;start=15#msg23429 date=1065642402]
[quote author=Skywing link=board=17;threadid=2973;start=15#msg23425 date=1065641011]
[quote author=Adron link=board=17;threadid=2973;start=15#msg23418 date=1065634214]
Maybe this is different, but I have a feeling that in VB, showing a form modally still lets timer events occur on the parent form, but showing a message box does not. I'm not 100% certain though.
[/quote]
Do VB timers actually use WM_TIMER, though, or something else?
[/quote]

They do use WM_TIMER.
[/quote]
I noticed something interesting. You can run a modal dialog box in a different thread from the owner, and it still seems to have the same magic block-interaction-with-owner properties. Thus, it's message loop really can't be just filtering messages from the owner window, because it's in the wrong thread, and the owner window is still running it's own, normal message loop.
October 8, 2003, 8:56 PM
Kp
[quote author=Skywing link=board=17;threadid=2973;start=15#msg23433 date=1065646572]
I noticed something interesting. You can run a modal dialog box in a different thread from the owner, and it still seems to have the same magic block-interaction-with-owner properties. Thus, it's message loop really can't be just filtering messages from the owner window, because it's in the wrong thread, and the owner window is still running it's own, normal message loop.[/quote]I can't tell for sure from the documentation, but perhaps AttachThreadInput would allow the message box to bypass this limitation and receive the requisite input?
October 8, 2003, 9:14 PM
iago
[quote author=Skywing link=board=17;threadid=2973;start=15#msg23433 date=1065646572]
[quote author=Adron link=board=17;threadid=2973;start=15#msg23429 date=1065642402]
[quote author=Skywing link=board=17;threadid=2973;start=15#msg23425 date=1065641011]
[quote author=Adron link=board=17;threadid=2973;start=15#msg23418 date=1065634214]
Maybe this is different, but I have a feeling that in VB, showing a form modally still lets timer events occur on the parent form, but showing a message box does not. I'm not 100% certain though.
[/quote]
Do VB timers actually use WM_TIMER, though, or something else?
[/quote]

They do use WM_TIMER.
[/quote]
I noticed something interesting. You can run a modal dialog box in a different thread from the owner, and it still seems to have the same magic block-interaction-with-owner properties. Thus, it's message loop really can't be just filtering messages from the owner window, because it's in the wrong thread, and the owner window is still running it's own, normal message loop.
[/quote]

In Richter's book (Programming applications in microsoft windows 3rd edition), there's a demo program that had a messagebox display a countdown message, and if the countdown reaches 0 it's automatically closed. I know this is done from a different thread, but I'm not too sure beyond that.
October 8, 2003, 9:24 PM
Adron
From the topic Modal Dialog Boxes: (note that the forum breaks the link, you will have to fix it if you want to follow it)

[quote]
When the owner window is not already disabled, the system automatically disables the window and any child windows belonging to it when it creates the modal dialog box. The owner window remains disabled until the dialog box is destroyed. Although a dialog box procedure could potentially enable the owner window at any time, enabling the owner defeats the purpose of the modal dialog box and is not recommended. When the dialog box procedure is destroyed, the system enables the owner window again, but only if the modal dialog box caused the owner to be disabled.

As the system creates the modal dialog box, it sends the WM_CANCELMODE message to the window (if any) currently capturing mouse input. An application that receives this message should release the mouse capture so that the user can move the mouse in the modal dialog box. Because the system disables the owner window, all mouse input is lost if the owner fails to release the mouse upon receiving this message.

To process messages for the modal dialog box, the system starts its own message loop, taking temporary control of the message queue for the entire application. When the system retrieves a message that is not explicitly for the dialog box, it dispatches the message to the appropriate window. If it retrieves a WM_QUIT message, it posts the message back to the application message queue so that the application's main message loop can eventually retrieve the message.
[/quote]


October 8, 2003, 10:24 PM
Hitmen
I'm not sure what http://ms-help:// is but it doesn't look like a valid domain to me :P
October 8, 2003, 11:02 PM
Yoni
Yes,

[quote author=Adron link=board=17;threadid=2973;start=15#msg23460 date=1065651888]
(note that the forum breaks the link, you will have to fix it if you want to follow it)
[/quote]

ms-help:// URLs are MSDN links, you need MSDN installed to follow them (in IE or in Document Explorer).
October 8, 2003, 11:42 PM
Zakath
In case anyone is wondering, this is what it should look like.
October 9, 2003, 4:43 AM

Search