|
|
Urgent
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
URGENT!
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the letter Z
|
|
|
|
|
how do we use the progress bar. for example if u are copying something from an external storge to the hardisk it shows a progress bar and the time left. how is the time calculated and how is it implemented in the system???
Chandrasrkharan P
|
|
|
|
|
If you search the articles here for "progress control" or "progress bar" you'll find lots of
articles about using the progress bar control.
The MSDN reference is here: Progress Bar Control Reference[^]
You can calculate time however you want. For example, using percent-done is simple.
Set the range of the progress bar to 0-100. Periodically during a lengthy operation, calculate
the percent-done (amountdonesofar * 100 / totaltodo) and use that value to set the progress bar's
position.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the letter Z
|
|
|
|
|
|
Here is one such example.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Does anybody know how to using Windows API, disable the sound for a single application only?
Thanks,
Nate
|
|
|
|
|
Can you more explain what programs?
|
|
|
|
|
It doesn't matter what program. Any program. I want to be able to disable all sound originating from any application of my choosing programmatically. I don't want to disable sound for all applications. I only want to selectively disable sound.
|
|
|
|
|
Do you have access to the code of said application? If not, then using Vista is the only solution that I'm aware of.
Another "possibility" would be to create some sort of monitoring application that simply monitored all created processes and if a process was created that should have no sound, act accordingly.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
LRESULT OnTest(HWND hMetin, WPARAM wParam, LPARAM lParam)
{
hMetin = FindWindow(NULL, "metin");
Sleep(5000);
//Mouse move
SetCursorPos(100, 200);
Sleep(500);
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, GetMessageExtraInfo());
Sleep(500);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, GetMessageExtraInfo());
Sleep(500);
//This code is Keybd source of send Message
SendMessage(hMetin, WM_CHAR, 'd', 0); Sleep(100);
SendMessage(hMetin, WM_KEYDOWN, 'd', 0); Sleep(100);
SendMessage(hMetin, WM_KEYUP, 'd', 0); Sleep(100);
SendMessage(hMetin, WM_KEYDOWN, 'd', 0); Sleep(100);
SendMessage(hMetin, WM_CHAR, 'd', 0); Sleep(100);
SendMessage(hMetin, WM_KEYUP, 'd', 0); Sleep(100);
return 0;
}
------
Hi..
I am working Macro-Program of a online game.all function is success,but keymessage can't.But Text type is possible.In the online game is impossible to send the keyboard message.It maybe different the keymessage that send a device
and C++.
Ah..and To work the Network game,It's very a difficult problem.
Thanks in advance
and Now i am living in Korea ^^
Hi..
I like a C++
|
|
|
|
|
Please read the forum guidelines. Your message titles should not contain words like "help" or "urgent."
Also, do no repost your question. You must be patient for an answer.
______________________
stuff + cats = awesome
|
|
|
|
|
Maybe look into the SendInput Function[^] or the keybd_event Function[^].
I'm not sure how all those Sleep() calls effect your user interface. You're on your own there
Mark
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the letter Z
|
|
|
|
|
I have an MFC app, developed on windows XP, that makes use of the alpha blending features of comctl32.dll version 6.0. I now need to make that app back compatible to Windows 2000, which only supports version 5.8.
Is there some way to install comctl32.dll version 6.0 onto Windows 2000? My app specifies the comctrl version through a manifest (see below), but as far as I can see Windows 2000 doesn't have a GAC.
<dependency>
<dependentassembly>
<assemblyidentity
type="win32"
="" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorarchitecture="X86" publickeytoken="6595b64144ccf1df" language="*">
Aaron Stibich
|
|
|
|
|
astibich2 wrote: Is there some way to install comctl32.dll version 6.0 onto Windows 2000?
I don't think so.
Shell and Common Controls Versions[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the letter Z
|
|
|
|
|
Hello all
I have a C program that basically functions as a control loop for a DC motor. Right now, the program is two threads, one that forms a user interface where I can change parameters, and the other runs a loop to update the command to the motor. Parameters are stored in global variables accessable to both threads.
I would like now to make MATLAB able to modify these global variables or otherwise communicate with the control loop thread. Does anyone have an idea of how to open a communication channel like this? The first thing that came to my mind was just using a simple UDP socket, but I lack the proper toolbox to implement that.
Thanks in advance,
Greg
|
|
|
|
|
|
gregdachs wrote: I would like now to make MATLAB able to modify these global variables or otherwise communicate with the control loop thread
I think MATLAB has a good COM interface.
|
|
|
|
|
I have a Linker problem in VCPP600.
after migrating the Source code to a new directory, the linker insits in linking with nafxcwd.lib, as well as mfc42d.lib, which of course leads to conflicts. The Manifest Constant _AFXDLL is set, and have an #ifndef _AFXDLL/n #error 'Gotcha' implicidly or expilcitly in each file associated with the project. None of these fire!
the DSP File does not mention 'nafxcwd.dll' anywhere. Where do I go from here.
LateNightsInNewry
|
|
|
|
|
Hi,
I know that a constructer is not suppoused to return value, however what if my object is dependent on certin data and the constructer which lets say takes a string
as paramter finds that the data is in error is there anyway to tell this to the user of the object and maybe not create the object
Thankx
|
|
|
|
|
I think u can throw a exception in your constructor
|
|
|
|
|
|
If you throw an exception in the constructor the object will not be constructed and thus will not be usable.
Steve
|
|
|
|
|
Constructors do not return values, but can throw exceptions. (If constructors could give an error return value, by logical extension you would have to test every constructor, which would include declarations like 'int i=0')
The YACC concept would be that the effective return value of a costructor is the object it constructs. The constructor cannot return a 'Non'object, and proceed from there, it can only succeed or fail.
So, if the string data is in error, throw an exception.
An easier method is, to separate the Construction and Initialisation process, and write a method such as Init() which CAN return Value!
LateNightsInNewry
|
|
|
|