Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Color Dialog

Author
Message
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 4th Jan 2008 23:29
Well, this is the second API call I wrote. I made it different threads because it would be handier to find when someone searched for it on the forums.



It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 5th Jan 2008 05:43
Nifty! Only problem I found is that the dialog box leaves an image of itself behind if you drag it around...I tried adding a sync to refresh the screen and prevent this, but I couldn't figure out where to put it , as the program doesn't really loop while in the dialog box.

Do you know if there is a way to have stuff continue to happen in the background while the user was selecting the color?


"Ok, so that wasn't funny. I don' have any good Christmas jokes."
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 5th Jan 2008 10:39
It doesn't leave a trail behind in my example program... Maybe because I'm running Vista?

On second try, I can't recreate your problem. I tried every possible combination using cls, sync/sync on or just nothing.

The color dialog is just called like any other dialog. Like the OpenFileDialog/SaveFileDialog from JessT. Also the Font Dialog is just called from comdlg.dll.

Quote: "Do you know if there is a way to have stuff continue to happen in the background while the user was selecting the color?"

It's not something I can control... I don't think there's a single dialog box that won't freeze the program...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 5th Jan 2008 16:09
See attached screenshot.

Quote: "I don't think there's a single dialog box that won't freeze the program"

That's a shame..oh well, there are still many, many things it can be used for


"Ok, so that wasn't funny. I don' have any good Christmas jokes."

Attachments

Login to view attachments
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 7th Jan 2008 06:19 Edited at: 7th Jan 2008 07:53
Quote: "It's not something I can control... I don't think there's a single dialog box that won't freeze the program..."

That is correct, however with a little bit of magic and a couple of hours of coding one can work around this. Behold:



I would have modified your code to use these functions I have written, but when I tried I couldn't seem to get it working.

Tempest (DBP/DBCe)
Multisync V1 (DBP/DBCe)

Login to post a reply

Server time is: 2024-11-22 13:44:20
Your offset time is: 2024-11-22 13:44:20