NO

Author Topic: Couple of n00b questions  (Read 2781 times)

x79

  • Guest
Couple of n00b questions
« on: September 07, 2015, 05:09:53 AM »
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 this
Code: [Select]
arrOptions[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?

Offline Bitbeisser

  • Global Moderator
  • Member
  • *****
  • Posts: 772
Re: Couple of n00b questions
« Reply #1 on: September 09, 2015, 12:40:12 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

  • Guest
Re: Couple of n00b questions
« Reply #2 on: September 09, 2015, 03:32:21 AM »
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
Code: [Select]
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.