flat assembler
Message board for the users of flat assembler.
Index
> Windows > How do you create multiple DialogParambox's? |
Author |
|
shism2 30 Dec 2005, 23:40
anyone give me a hand?
|
|||
30 Dec 2005, 23:40 |
|
SDragon 31 Dec 2005, 02:54
Create an array with contol ID values, then make a loop that retrieves values from this array and calls DialogBoxParam.
|
|||
31 Dec 2005, 02:54 |
|
shism2 31 Dec 2005, 03:44
SIGH thats I didnt want to do...
|
|||
31 Dec 2005, 03:44 |
|
comrade 31 Dec 2005, 04:02
What is it that you have against calling DialogBoxParam twice?
|
|||
31 Dec 2005, 04:02 |
|
shism2 31 Dec 2005, 04:59
wont i have to setup another loop?
|
|||
31 Dec 2005, 04:59 |
|
comrade 31 Dec 2005, 06:12
You don't need a message loop at all for DialogBoxParam... its is a modal window (the function returns when the dialog box is closed)
|
|||
31 Dec 2005, 06:12 |
|
Reverend 31 Dec 2005, 14:21
And you can always point to the same DlgProc (message handling) for all your windows. But then you must remember that ids have to be different in every window.
|
|||
31 Dec 2005, 14:21 |
|
shism2 31 Dec 2005, 14:58
HMMMMM..... You just gave me a good idea Reverend... I'll have to use polymorphism.
So,Instead of having to make a whole new loop to handle the new window. I'll use polymorphism to do changes the the current loop, to increase performance. |
|||
31 Dec 2005, 14:58 |
|
Reverend 04 Jan 2006, 00:33
Nice but rather error-prone solution
I'd rather suggest sth like this: Code: ; let's say we have two dialogs of ids 1 and 2 ; both have two buttons (100, 101) and (200, 201) proc DlgProc hwnd, umsg, wparam, lparam cmp [umsg], WM_INITDIALOG jz ... cmp [umsg], WM_CLOSE jz ... cmp [umsg], WM_COMMAND jnz @F cmp [wparam], 100 jz ... cmp [wparam], 101 jz ... cmp [wparam], 200 jz ... cmp [wparam], 201 jz ... @@: endp |
|||
04 Jan 2006, 00:33 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.