|
Your question is not clear
snowheavy wrote: I have got two colors' RGB value,
Ok, you have two values representing a color
snowheavy wrote: I want to change one from the other gradually ,how should i do?
What do you mean ? You want your first value to be changed to the second gradually ? This makes non sense unless you 'draw' that on the screen (on a line or rectangle for example). But then, this is dependent of the technology you are using. More info about that is needed. What are you using ? GDI, OpenGL, DirectX, ... ?
|
|
|
|
|
sorry for my poor expression ability,I use GDI,and I want to fill a region,In
fact,I have wrote this code to test:
for (int i = 0; i < step; i++)
{
COLORREF color;
color = RGB((maxR - minR)*i/step+minR,(maxG-minG)*i/step+minG,(maxB-minB)*i/step+minB);
GetView()->dcMem.FillSolidRect(6000 * i/step+5000,-2000,6000*(i+1)/step,1000,color);
}The mapm mode I am using is MM_HIMETRIC,I found some stripes on it,
I don't know why.thanks for your reply.
-- modified at 4:26 Tuesday 25th April, 2006
|
|
|
|
|
|
|
He's how I'd do it:
COLORREF Voodoo(COLORREF from, COLORREF to, int n, int d)
{
BTYE fr = GetRValue(from);
BTYE fg = GetGValue(from);
BTYE fb = GetBValue(from);
BTYE tr = GetRValue(to);
BTYE tg = GetGValue(to);
BTYE tb = GetBValue(to);
double ri = double(tr-fr)/d;
double gi = double(tg-fg)/d;
double bi = double(tb-fb)/d;
retunr RGB(fr+n*ri, fg+n*gi, fb+n*bi);
}</code>
Where:
from - The from colour.
to - The to colour.
n - The step number.
d - The total number of steps.
NOTE: This hasn't been tested.
Steve
|
|
|
|
|
thanks ,i will have a try
|
|
|
|
|
Hi
Please suggest any article on "How to read .dbf (dbase) in VC without Database support "
thanx in advance
by
KK
|
|
|
|
|
|
Hi Maxwell Chen
Thanks for your reply
by
KK
|
|
|
|
|
I have need to open a socket to grab packets from an outside server. I have many questions about this undertaking.
The socket needs to transfer data back and forth between the client and the server.
* Is there an easy framework for this in MFC?
* Static vs. Dynamic port requests.... Should we use the same port each time we run the application? Or should we use dynamic ports?
* If we use dynamic, does that mean the Windows firewall will pop up a message saying "Hey, please verify that you want this app to access the internet?
* If we use static ports, how can we gaurantee that no other app is using the same port when we request it the first time.
* If we use static ports, how do we prevent other applications from stealing our assigned port?
* Do developers usually go to the firewall makers and try to get their applications pre-approved?
* Is there a way to be 'pre-approved' for most firewalls?
Spyware Questions (we certainly aren't spyware, we just want to make sure we're not labeled as such):
* Are there any certification programs you can go through to verify your app is not spying?
* Are these effective in terms of convincing users you're a good person?
* Same kinda question as above, is there a way to get pre approved for spyware companies and let them know who you are so they won't label you as such.
* Any other hints in terms of not being labeled this app-killing adjective?
Thanks very much in advance!
|
|
|
|
|
chasetoys wrote: Is there an easy framework for this in MFC?
CSocket
nave
|
|
|
|
|
Hi
I have set a Background image for my ActiveX ( ATL Composite Control) and it has some static text boxes. To make them transparent i did the painting of the static text controls ( in WM_PAINT). I.e after setting the image in OnEraseBkGnd(), i invalidated the static controls whose WM_PAINT is handled. This will TextOut the text above the BG image. But when i put this in web page, it seems that the OnEraseBkGnd() is calling frequently and thus the static control paint everytime, creating flickering of the static controls ( controls blink's).
Also when i call SetWindowText() to set new string in static control, I have to call Inavlidate() the whole control to make the new text display correctly. If i just call invalidate of static control, it overwrite the old text. Next painting of the window will solve this!!
How to solve these issues?
i have used this CP link to set background.
|
|
|
|
|
There is a OnCtlColor Member of CWnd, in which you can set the backmode to transparent.
Greeting from Germany
|
|
|
|
|
I did try with WM_CTLCOLORSTATIC, i could change the bgmode & color
Not able to make it transparent. I did have to draw using WM_PAINT
M_CTLCOLOR is not fired,I think it is due to ATL non MFC
anil
|
|
|
|
|
When a client using shared data from remote machine.It is very fast .But with server for same it is taking more time.
The packet transmission is 300 per share data and for server 1500 as per net stat result.
As my packet size is small i disable nagle algorithm also.but not satisfied result.So Please give some guidance.
Regards
Sabita
|
|
|
|
|
Hello all,
I have created a player using active x control in vc++ 6.0.
Once the user clicks the button to download the player,the Activex player's Dll will be installed and it will the play the video.
My problem is if i update the Dll with newer version,
1.How do i delete the older version of player from Users System
2.Can i do it Automatically.
3.Is there any way of updating older versions with newer version?how can i do that
Please help me..
Thanks in advance
cheers
sangeet
-- modified at 1:42 Tuesday 25th April, 2006
|
|
|
|
|
hi,
Register the new Activex using regsvr32 in command prompt which will look after every thing. silly question.
thanks,
uday.
uday kiran
-- modified at 1:49 Tuesday 25th April, 2006
|
|
|
|
|
Hi
I registered the new Activex.Also I changed the version number in codebase in <object> tag.And i updated this new version dll to server.
but my problem is ,
Eventhough the Iternet explorer is showing the dialog box to install new version,the new version is not installed and the player is using the older version.
Please help me ..
May be it is again a silly question for u
Thanks in advance
cheers
ramya
-- modified at 4:45 Wednesday 26th April, 2006
|
|
|
|
|
IIUC you packaged the control into a CAB and are installing it via the <object> tag? When you release a new version, update the version numbers in the DLL's version resource, and update the version numbers in the INF file (packaged inside the CAB) to match. Then on the web page, update the version field in the codebase attribute to match. IE will do the rest.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Can u answer me how you play movie? Is ur ActiveX is MFC or non MFC (ATL only?)
Using DirectX or VFW?
Which types of movie u can play?
If u can share the code, it would be helpful for me
Thanks in advance
|
|
|
|
|
Hey everyone:
I want the user to choose when they close down my application, so I listen for user input... but these pesky IM windows always interrupt my app and steal focus. I've tried not responding to the following messages.... then I tried what you'll see below.
I thought by handling them I'd be OK... but IM windows (from Gaim for instance) totally kills focus of my program. Thoughts? Thanks!
case WM_KILLFOCUS:
case WM_QUIT:
case WM_CLOSE:
case WM_DESTROY:
return(DefWindowProc(hWnd, message, wParam, lParam));
|
|
|
|
|
You can't prevent your window from losing focus to something else. Imagine if two programs did this - they would constantly be fighting over which one is the active window. What is it about your app that makes you want to prevent other windows from being active?
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I can imagine the problem you describe. However I've seen some applications deal with it, and not yield control. I'm building a simple screensaver which I think shouldn't be interrupted by such trivial things as IM windows. You still hear the noise afterall.
So I *know* there is a way, because I've seen programs that don't change focus when another window requests it.
So how do you do it? :P
|
|
|
|
|
Well, a screen saver is a special case (in NT at least). The screen saver runs on its own desktop, so it will be the only window visible no matter what, because the interactive desktop won't be visible.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I am having two listctrls. I am not using the default scrollbars of listctrls(I am just hiding it)i want to use a seperate VScroll bar which simultaneously work on both listctrls.
How can I do this?
Thanking you in advance.
Sandeep A.C
Sanc
|
|
|
|