|
ok, if I understand you correc, you want to increment the value of an edit box every 1 second, starting from 0 going to 100. If that is the case, then a timer is the way to go.
Your timer needs to be set up for 1000ms(1sec). You have set it up for 100ms only.
SetTimer(1,1000,NULL);
Now create a member variable for your edit control of type "value" and set its datatype to int. Lets call it "value".
In OnTimer:
if (nIDEvent==1)
{
if(value < 100)
{
value++;
UpdateData(FALSE);
}
}
|
|
|
|
|
|
Hello all,
i want to make a exe on a button click event. How to do this?? Is it possible to do it as we make a txt file using a object of CStdioFile. or i have to make two workspace in one project???
Thanks in advance
|
|
|
|
|
Do you want to make a exe file on your program or run an exe file when click a button.
|
|
|
|
|
I want to make a exe when i click a button on my already running exe.
|
|
|
|
|
You want to *make* an exe?
Are you writing a compiler?
Iain.
|
|
|
|
|
He explained but I dont understand he want to make exe file or run exe file?
|
|
|
|
|
If he can't understand the difference when asked, feel free to give up! I doubt he'll understand CreateProcess or ShellExecute...
Your question was perfectly well put.
Iain.
|
|
|
|
|
Hi
i have a SDI application with a CListView in report style
If i have a lot of items in my listview, when scrolling down through the list
sometimes the lines and the text become distorted, i have noticed this sometimes
when there is a lot of items in a listcontrol as well
Has anyone any ideas on how to overcome this
Thanks
Simon
|
|
|
|
|
You can always use OnScroll and call the Invalidate and UpdateWindow to force the redraw of the screen.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hi All,
Im using a application in which im loading the Spin Control at run time. This spin control will
change its value on every click of the up/down button. But number of times it can change its value
is 65536 which is defined in CSpinControl which is defined in the CSpinButtonCtrl class(SetRange32
function). I want to increase this range of spin control beyond 65536. If anyone kno about this plz
let me kno.
I tried to increase the no of elements in the list, but its giving me the performance problem.
The speed of the spin control scrolling is getting slowed down. If anyone can help me in this regard,
plz reply me ASAP.
-- modified at 8:14 Thursday 22nd November, 2007
Parag Rudrawar
|
|
|
|
|
Looking at UDM_SETRANGE32, you can set the min and max to 32 bit values which are a lot larger than 65536.
If you are talking about how big a jump it does when you click on a button, look at the UDM_SETACCEL message.
Worst come to the worst - shrink the values, and multiply them within your own software. There's no reason why you can't do...
UINT nMyValue = 100 * m_UDCtrl.GetPos ();
Iain.
|
|
|
|
|
Hi Iain,
Can u be more elaborate on hw to set max and min to 32 bit values. M not getting as UDM_SETRANGE32 is system #defined.....
Parag Rudrawar
|
|
|
|
|
Errr...
What's wrong with:
m_MySpinner.SetRange32 (0, 1234556);
int nLower, nUpper;
m_MySpinner.GetRange32 (nLower, nUpper);
ASSERT(nUpper == 1234556);
Iain.
|
|
|
|
|
I have already tried this...its not working.
Is this code working properly in ur case??
Parag Rudrawar
|
|
|
|
|
Hi all,
I want to make a self extractor application for my setup code. But i am not getting the path as where to start from.
Can anybody please tell me how to start with it...
Thanks in advance
|
|
|
|
|
If you want to make JUST a self extractor... why don't you use the Winzip self extractor tool? Is the easiest one I know, wizard steps, just make a folder with all the things you want to have in the places you want to have them and pack it up. Unpacking will use the path from where you create the selfextractor if you don't give any other command.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
neha.agarwal27 wrote: I want to make a self extractor application for my setup code.
For building setups, I use NSIS.
You can not possibly get better than those (free!) tools without just recreating them.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Use IExpress. It is easy and comes with each and every Windows. and you don't need to download anything else.
just time iexpress in Run menu and it will appear.
It also provide the facility that Run the selected file on starup.
|
|
|
|
|
hello,everybody!
Now I want to generate a wmv file through wm asf writer,I got IWMHeaderInfo from WM Asf Writer filter,then revoked SetAttribute to set aspect ratio like follow:
DWORD AspectX;<br />
DWORD AspectY;<br />
if ( m_settings.GetAspectRatio() == IOutputSettings::Aspect_16_9 )<br />
{<br />
AspectX = 16;<br />
AspectY = 9;<br />
}<br />
else<br />
{<br />
AspectX = 4;<br />
AspectY = 3;<br />
}<br />
<br />
hr = pWi->SetAttribute(0,L"AspectRatioX",WMT_TYPE_DWORD,(BYTE*)&AspectX,sizeof(DWORD));<br />
hr = pWi->SetAttribute(0,L"AspectRatioY",WMT_TYPE_DWORD,(BYTE*)&AspectY,sizeof(DWORD));
But at last it did't work,when I playbacked my wmv file,it still was rendered with 16:9.
So I change another method,I got IWMStreamConfig2 and revoked the AddDataUnitExtension like this:
DWORD dwValue = 0x0193;<br />
hr = pConfig2->AddDataUnitExtension(WM_SampleExtensionGUID_PixelAspectRatio,2,(BYTE*)&dwValue,sizeof(DWORD));
At last,it also didn't work.
I am almost crazy,does anybody know it?
Thank you very much!
Tony
|
|
|
|
|
Hello everyone,
I have a number of strings in an array,
"FILE1", "FILE2", "FILE3", ... , "FILEN"
I want to add the common prefix to all the string, like
(for example, the common prefix is "FOO")
"FOOFILE1", "FOOFILE2", "FOOFILE3", ... , "FOOFILEN".
Are there any smarter ways to use a macro to define all of them altogether?
thanks in advance,
George
|
|
|
|
|
Never heard about itarations (i.e. why do you need macros, do you want strings initialised at compile-time?)?
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.
|
|
|
|
|
Thanks CPallini,
Using other techniques are also ok if it could save my typing time,
My situation is, I have some legacy code, which is an array -- very long, and all the file names are constant values. And to save my time of typing, I want to find some smarter ways to add prefix to all file names in the aray.
Any good ideas?
regards,
George
|
|
|
|
|
What kind of string you are dealing with (e.g. CString or whatever...)?
Maybe posting a little code snippet will help.
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.
|
|
|
|
|
A TCHAR array. Any ideas?
regards,
George
|
|
|
|