Conditions for execution; boolean
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 00:50, xxxxxxxx wrote:
hi, if id==IDC_TYPE then IDC_TYPE==IDC_SELECT???. Maybe thats not what you want, is it?
Bye.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 00:58, xxxxxxxx wrote:
shawni,
no. here is a clearer scenario:
-->click on checkbox
-->click on button
-->only then execute next line of codethe line of code should be executed ONLY when both the checkbox AND button have been (checked/clicked)
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 02:19, xxxxxxxx wrote:
Where are you checking for the IDC_SELECT button? Remember that a button has no state. It just triggers a message.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 03:16, xxxxxxxx wrote:
understood. but isn't the button action recorded, detected? So, i thought that if one clicks on a button, that must be TRUE or something like that. you're saying it is not.
so, if i want the ability for someone to be able to select items using checkboxes then click on a button that executes the items of the checkboxes, what does one use?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 03:47, xxxxxxxx wrote:
You simply catch the button click in the dialogs Command() method.
Somthing like this:
>
\> Bool MyDialog::Command(LONG id, const BaseContainer &msg;) \> { \> if(id == IDC_SELECT) \> { \> GePrint("button"); \> } \> \> return TRUE; \> } \>
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 04:13, xxxxxxxx wrote:
matthias,
i understand, but i think i'm not making myself clear enough. the above example shows how to get code to execute by clicking the button. what i want to know is how to get it to execute ONLY the code that corresponds to a selected menu item or checkbox item.
does that make any sense?
STEP 1: I click on the checkbox next to the item "Apples"
STEP 2: I then click on the button labeled "Create"after clicking on the button, an apple is created...
which leads to my next scenario:
I have 3 items with a checkbox next to each...
Apples
Bananas
GrapesI check all of the items. I would then like to click on the "Create" button to create all of the items selected. How do I create such a mechanism?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 04:39, xxxxxxxx wrote:
Same thing, you check for your button in Command() and if any of the checkboxes has been checked. If so you create your items.
Example:
>
\> Bool MyDialog::Command(LONG id, const BaseContainer &msg;) \> { \> if(id == IDC_SELECT) \> { \> Bool chkbox; \> \> if(GetBool(IDC_APPLE, chkbox) && chkbox) \> { \> //do something \> GePrint("create apple"); \> } \> } \> \> return TRUE; \> } \>
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 05:41, xxxxxxxx wrote:
matthias,
thank you again! this is exciting!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 08:02, xxxxxxxx wrote:
Howdy,
Just to clarify why your line of code:
>
if(id==IDC_TYPE && id==IDC_SELECT)
... will always return FALSE, is that "id" is a single variable with a single value, and assuming that both IDC_TYPE and IDC_SELECT are members of an enumeration and have different constant values, "id" could only equal IDC_TYPE or it could only equal IDC_SELECT, but it couldn't equal both. ;o)
Adios,
Cactus Dan -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/01/2009 at 08:16, xxxxxxxx wrote:
CD,
understood. it makes sense...