Couple of n00b questions

Started by x79, September 07, 2015, 05:09:53 AM

Previous topic - Next topic

x79

First, I started with the win32 gui wizard so I have a modal dialog resource with a bunch of checkboxes. Can I use/convert them as an array of checkboxes? I hope to use something like thisarrOptions[intIndex] = IsDlgButtonChecked(hwnd, ckFlags[intIndex]);

Second, I don't know how to describe what I believe to be a common scenario. I am including zopfli in my project. Can't I put the zopfli project folder in my project folder and have the lib built automagically when I build my project?

Bitbeisser

Quote from: x79 on September 07, 2015, 05:09:53 AM
Second, I don't know how to describe what I believe to be a common scenario. I am including zopfli in my project. Can't I put the zopfli project folder in my project folder and have the lib built automagically when I build my project?
Well, why would you have to build a library over and over again in a project?

You should properly created a library for this first, then just add the resulting .lib file path to the linker options for your project...

Ralf

x79

Thank you both. For my first Q, I realized it would be just as easy to renumber my resources to the same order as the corresponding options and use two int variables in my loop
uint iOptions = 0;
int x = 1;
int y = 4001;
while (x <= 9) {
    if (IsDlgButtonChecked(hwnd, y))
        iOptions &= x;
    x++;
    y *= 2;
}


@Bitbeisser: I don't know if building the lib is the best or standard way to do this. I have seen something like this in other projects but I don't know if it was built as a lib or if the imported project was added to the primary project somehow.