|
Wait, pal, now is giving me another number!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Really so its a virus please destroy your computer!
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Done (I'm writing this reply from the internet cafe...).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i have written a vc++(2005) program for brightness of LCD monitor.
giving an option for the user to choose a level (out of 3).
the program works smooth on my notebook and desktop.
but on 2 other notebooks it says " video card not supported "
i am using nvidia.
and the other 2 noteboks have intel extreme and nvidia.
can some1 please guide me.
should i attach the code here?
and i have used these functions :
IOCTL_VIDEO_QUERY_DISPLAY_BRIGHTNESS
IOCTL_VIDEO_QUERY_SUPPORTED_BRIGHTNESS
IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS
here is the link to these function : http://msdn.microsoft.com/en-us/library/aa373156(VS.85).aspx[^]
|
|
|
|
|
In the documentation for these calls, I see that these functions are not supported on Windows Server 2008 and on Vista. The two notebook computers that your program did not work on, what operating system were they running?
Bob
|
|
|
|
|
I ran the program on windows xp only.
All the notebooks and desktop have xp.
Now i tried on one more desktop.and it worked there. It has ATI in it.
I am just not understanding what is happening!
|
|
|
|
|
The availability of ioctls depends on the capabilities of your hardware and its associated driver software. Some ioctls may always be available, but others may well not be. I think you've found some that are sometimes available, sometimes not.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Ok.Sir can you tell me what should i do to overcome this problem?
|
|
|
|
|
Accept that controlling the monitor brightness from the PC isn't universally possible?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
people please give me some solution.
is there any other way of reducing brightness?
|
|
|
|
|
I am currently writing an application using C++ and MFC. I would like the output of this program to include both 2D and 3D plots. I prefer not to write these plotting routines by hand. I am hoping that there is free software out there to do this. I looked at the WPF-powered 3D graphing library found on this server. It is written in C#. I am thinking that is going to be an issue for me. I also tried building it, and ran into some problems. I am thinking that there should be a similar library for C++ and MFC. However, I have been unable to find it. I am hoping somebody here can point me in the right direction.
Thanks
Bob
|
|
|
|
|
Have look at the chart controls on (drumroll) codeproject.
For example, Cedric, who frequents this forum, has written: High-speed Charting Control[^].
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Iain,
Thanks for the response. I down loaded both the library and the demo. Both built fine. However,
when I run the demo program it does not draw lines. In addition, by selecting certain options (such as changing the background) the demo program crashed. I am thinking that this library is not stable enough or well documented enough for my use.
Maybe I should consider a low cost commerical library. Any other suggestions?
Thanks
Bob
|
|
|
|
|
Well I suppose it is stable: Cedric is a smart guy and he updated the library many times. Why don't you report your troubles to him, posting in the article's message board?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I'd agree that the demo is not perfect - it doesn't redraw the chart when you make a change with any of the the lower buttons - but that's just a case of adding an Invalidate here and there. I couldn't get it to crash though.
Also a shame he doesn't put a compiled demo app on the article page, so you could then check the behaviour of that against your application.
Anyways, that's just one of the articles. If you look in that area of the site, there are others. I just know Cedric's because he gives good answers here, so I trust his programming prowess.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
My application is a modeless dialog which sits on top of the application's main window.
Within the dialog is one edit control.
My pointers are correct i.e., Window->Dialog->EditCtrl
In XP, the Alt+Tab function of the Desktop works just fine.
In Vista, the edit control does not regain focus.
I am fine with sending Focus to the edit control however I am having problems
with intercepting a WM_Message from the desktop when it brings my application to the
foreground.
Is it the Z-order, EV_WM_Message response, using GetForegroundWindow or something else?
I can utilise the EvGetFocus and EvKillFocus functions but cannot distinguish between
control from within the application and that which comes from the desktop.
This is my first time here. Assistance would make me a regular responder to questions.
|
|
|
|
|
I'm not sure what you need, does WM_ACTIVATEAPP[^] help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Tried both WM_ACTIVATE and WM_ACTIVATEAPP.
I've set up a status bar at the base of the application requesting both
functions to talk (acknowledge the message) to me.
No response.
Thanks for your response.
|
|
|
|
|
I might instantiate these functions into the dialog and
try letting it call the parent window with NotifyParent
to refresh itself.
Always good to talk to someone.
Thank You
Ric
|
|
|
|
|
Ric Ashton wrote: I've set up a status bar at the base of the application requesting both
functions to talk (acknowledge the message) to me.
How do you mean that?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Within C++ Object Windows
TStatusBar* StatusBar;
char xxx[255];
sprintf(xxx, "Keystroke C Timer = %d", RicsMasterTimer);
if (::StatusBar) {::StatusBar->SetText(xxx);}
The status bar is part of the application window.
|
|
|
|
|
Ah, you are using Object Windows (Borland, right?), i have no experience with that so i can't help you with anything specific, in VC++ i would give the WM_ACTIVATE (or WM_APPACTIVATE) message a handler in my dialog and in that handler i would set focus onto my edit control. Sorry but i don't know how that would work with OW.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I thank very much for your time.
My application is complex and I will get through the current inconsistency between
operating systems with respect to Focus and Activate.
I would like to ask one more question.
In older computers with sound cards, there is an instant termination of
sound with two direct PlaySound statements. One might hear a click of the
first sound, with the second sound being played in full.
Example
strcpy(bbb, ResidentDir);
strcat(bbb, "\\sound\\alphabet\\cfs.wav"); //changed file structure
PlaySound(bbb, NULL, SND_SYNC|SND_NODEFAULT);
strcpy(bbb, ResidentDir);
strcat(bbb, "\\sound\\alphabet\\ill.wav"); //I love lollipops
PlaySound(bbb, NULL, SND_SYNC|SND_NODEFAULT);
On newer computers with the sound card built into the motherboard, there is an accumulated
delay. If the above code were to be repeated 100 times, it would take some 10 seconds for the
computer to say "I love lollipops". I was curious as to whether there was a primacy on streaming
or an inability to interrupt in the new configurations.
Yours
Ric
|
|
|
|
|
I can't really help you there...do you mean the first PlaySound returns before the sound has been played and then when the second PlaySound kicks in it terminates the first sound with a "click" sound and then starts to play the new one?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi,
that seems correct.
If you want better sound control, the general advice is to use DirectSound. I have no experience with it though.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|