|
In my current undertaking project, i am developing a window dialog based application as player console to control a piece of hardware for tv reception. can anyone suggest me in VC++, how can i control volumn and make the player screen to full screen?
thx in advance
|
|
|
|
|
There are some good articles on this website about DirectX programming.
|
|
|
|
|
May anyone suggest me how to use Progress Bar Control to show
1) the pecentage, say, how 80 is weighted in the range from 60-100?
2) the completion of a function execution?
thx in advance...
|
|
|
|
|
jooo wrote:
1) the pecentage, say, how 80 is weighted in the range from 60-100?
Use:
m_ctrl.SetRange(60, 100);
m_ctrl.SetPos(80); Now the progress control will show 50%.
jooo wrote:
2) the completion of a function execution?
If you are executing just one function, the progress control will show either 0 or 100%. Not real useful in that situation. It would be useful if you had something to the effect of:
m_ctrl.SetRange(0, 100);
Foo1();
m_ctrl.SetPos(33);
Foo2();
m_ctrl.SetPos(66);
Foo3();
m_ctrl.SetPos(100);
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
yup, i got it, thx very much...
btw, i noticed that SetPos(int nPos), is there any alternative to accept double as parameter like SetPos(double nPos)?
|
|
|
|
|
jooo wrote:
...is there any alternative to accept double as parameter like SetPos(double nPos)?
No such method exists. What are you doing that requires one?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi All,
What are the routeable members of a class?
With Regards,
A.Ilamparithi.
|
|
|
|
|
Define "routable" in terms of C++.
Are you referring to the accessibility of the member from derived classes?
Kuphryn
|
|
|
|
|
Do you mean the TEXT name of the ID or the NUMERIC value?
Your project can automatically generate an HM file, and the help author can include that, but if you change the TEXTUAL value of the ID, then there is no autmatic checking, excpet to perhaps DIFF the two HM files and then the help author can know that the ID has changed.
Now, if the NUMERIC value of ID changes, that should not matter provided you generate the HM file and the help author uses it in the help instead of hard coding numeric values.
If this does not help, can you please be more specific about your exact problem?
|
|
|
|
|
I mean when the programmer makes a modification that changes an existing ID for a view or dialog box. For a very large project with so many elements, is there a way to track this?
Thanks for your comments.
|
|
|
|
|
Not that I am aware of.
Assuming that the 'standard' way of handling an MFC project is being followed:
I think the best you can do is to keep a Resource.H from the PREVIOUS build of project.
Then each time the project is edited, take the NEW Resource.H file and WinDiff it against the PREVIOUS Resource.H file.
If they are the same, then no changes have been made to the resources (which directly correlate with the help ID) - meaning the dialog and control ID have not changed.
|
|
|
|
|
OK - that's a good suggestion.
Thanks!
|
|
|
|
|
Is there any sample code somewhere showing how to make two listboxes (or ctrls) with two buttons in between --- one to transfer items from left box to right, and one to transfer from right box to left (we see it in windows all the time). I didnt see any thing in the articles. I didnt quite know what I would google on to find a class that does this that someone might have created.
Thanks,
sb
|
|
|
|
|
There is an example on this site
Include/Exclude List Boxes[^]
Enjoy!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
|
Hello,
Is there any way MFC programmers can automatically track when they make a change in a program that effects the ID used to call Windows Help so they can let the technical writer know when they need to change mapping in the Help project?
There's got to be an easy way to do this...
Thanks,
Ellen-
|
|
|
|
|
Hi all,
I'm trying a little bit with the malloc() and free() functions. Unfourtunatly, if alloc 256MB the malloc-function needs 10 Seconds to get the memory. That's not nice but what I'm really suprised at is that free-function needs 278 Seconds to drop the memory.
----------------------------------------------------
bufferSize = 256*1024*1024;
if((buffer = (char *) malloc(bufferSize)) == NULL)
{
cout << "Could not allocate enough memory." << endl;
exit -1;
}
p_BufferRoot = buffer;
// ... put stuff in memory ...
free(buffer);
----------------------------------------------------
Can anyone explain what happens to me free-function?!
THX
triathlet394
|
|
|
|
|
Allocating memory can be an expensive operation, especially if memory is fragmented. On low-memory machines, asking for 256MB of contigious RAM might involve a lot of paging. Freeing memory instructs the memory manager to access pages previously put on disk. That might be where the latency comes from.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
How can I resolve this problem a little bit more comfortable?
triathlet394
|
|
|
|
|
I do not know, specifically. Have you tried the new and delete operators instead?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Do you really need 256 MB?
Can you break up your data or structure into sub-elements?
You might also try VirtualAlloc instead of using malloc and free.
VirtualAlloc has some options that malloc does not give you.
|
|
|
|
|
Thanks Blake,
It works really fine. And my programm isn't look big if your looking in the Task-Manager for the memory-usage.
triathlet394
|
|
|
|
|
Try use GlobalAlloc with GMEM_MOVEABLE flag, this may be work fast.
|
|
|
|
|
Hi,
I've read that the GlobalAlloc-Function-Group come from the Win 3.x-Framework.
What's the difference between GlobalAlloc and VirtualAlloc?
triathlet394
|
|
|
|
|
Yes, you right, GlobalAlloc come from Win3.x, but hi work with whole address space, and if you have 256M free in phisical memory, hi get you memory block in phisic memory .
And if you use VirtualAlloc function, you mast manage usage of pages.
About speed : GlobalAlloc work some slower then VirtualAlloc, but i didn't think, that is critical (for 256M on Win2k diference less 1s).
|
|
|
|