|
GetCurrentHwProfile()
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
How can I change the text color of an edit control? I want it to change to red when its contents aren't correct.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
See CWnd::OnCtlColor [^].
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]
|
|
|
|
|
How do I trigger this message to be sent? Should the code be something like
bool m_bRedColorFlag [= false];
...
void OnCtlColor()
{
if (m_bRedColorFlag){
}
else {
}
}
...
m_bRedColorFlag = true;
GetDlgItem(IDC_EDIT)->InvalidateRect(NULL);
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi Friends,
I made a desktop and audio(mike) capture GRF in graphedit.
On some systems audio recording stops after 30 sec but video recording has no issue.
I did all things in source code(c++ application) tracked IMediaEvent, but as audio recording stopeed in between no error event is fired.
Note: problem occur only on some laptop pc till now it has not occured in any desktop PC
Laptop "qasf.dll" version is 10.0.03802
I tried with differnt versions of same dll but all in vain on the laptop.
System configuartion is below:
RAM - 1790MB
CPU - Intel(R) Core (TM)2 duo CPU 1.83Ghz(2 CPU)
GRF file is stored at below link
http://www.fileflyer.com/view/uiqJXB1[^]
Thanks,
Subhash
|
|
|
|
|
What controls the hovering expansion of MFC menus?
Or what controls which choices are shown before hovering on the little arrow to expand the rest of the menu?
A. The feature is called Personalized Menu Behavior.
The wizard code for it is in CMainFrame::OnCreate()
modified on Friday, October 9, 2009 6:48 PM
|
|
|
|
|
See here[^]
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks. Really though I know this is a stupid question or maybe its just me but I haven't been able to find it in the help because I can't think what the feature is called to be able to search for it in the MFC docs or code. When I google "Menu Expansion" I get 7500 hits that all seem to have to do with web development, java, of C#.
|
|
|
|
|
It's all right there in the help. There is a link to a sub page about menu programming considerations which has a section on menu messages, creating menus and modifying menus. It really is too big a topic to fully explain in a forum post.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Personalized Menu Behavior
|
|
|
|
|
Hello,
I'm new to C++. I grasp it, having read through a number of articles and chapters of books
and done a bunch of console examples.
I have my Visual C++ and the latest Windows SDK for Windows 7.
So, I want to skip ahead and start creating simple GUI's using png, jpeg or gif files as well as vector drawing.
So, If anyone can offer some guidance, I will appreciate it.
What is the most CPU efficient, smallest file size method to create a GUI incorporating png files? Cross platform or windows. A WYSIWYG editor would be nice, but most important to me is to have solid, professional code, so I want to focus my research on methods that develop good GUI's, even if it requires more time.
I have used software with GUI's that load in a clumsy fashion and are buggy. That is what I want to avoid. I want my apps to run smoothely.
So any programmers willing to point me in the right direction?
Thanks,
-Matt
|
|
|
|
|
Bitmap Basics - A GDI tutorial[^], is a good place to start; fairly basic but makes it easy to grasp the concepts. You should always take a look at Microsoft's GDI+[^] for the latest functionality. And when you feel comfortable with all that, then this article[^] teaches some really cool stuff.
Good luck!
|
|
|
|
|
Thanks,
So I'm looking at Win 32 development, and I need to work with the libraries there.
Windows GDI and GDI+, and maybe others like Direct 2D, I guess. Thats plenty to learn about for awhile.
|
|
|
|
|
Hi. Well... I'am trying to develop some simple game. This game has map of CButton objects and a marine that is a CButton object too. I have to make someway that marine go over other button. But as soon as i draw them marine is left behind the map. I tryed to make another transparent window and collocate marine there. It worked, but... in OnInitDialog i write:
MarineDlg.Create(IDD_MARINEDIALOG,this);
theApp.CreateLvl(this, STARTPIXELX, STARTPIXELY, FIELDSIZE);
and it's all cool, BUT if i write
theApp.CreateLvl(this, STARTPIXELX, STARTPIXELY, FIELDSIZE);
MarineDlg.Create(IDD_MARINEDIALOG,this);
marine is left behind and i need to create level first because my marine use it's properties.
Any hint? Some way to solution?
Pls. I already lost 1 day in it with no result.
|
|
|
|
|
I found the answer. Function SetWindowPos change Z-pos of an object in the dialog, but... it dosen't work. When you create CButton.Create(bla-bla-bla,pParentWindow,WS_CHILD) it dosen't matter. Later you have to put CButton.SetParent(pParentWindow). Only after that it starts to work. Cool.. i love vc++ i lost 2 days... in nothing.
|
|
|
|
|
Suppose something like this:
[code]
<span class="gugugug">1</span>
<span class="krakaka">enchanted</span><span class="gagaga">chocolate bar</span>
<span class="gugugug">2</span>
<span class="krakaka">very remarkable</span><span class="gagaga">flavored cookies</span>
<span class="gugugug">3</span>
<span class="krakaka">fascinating</span><span class="gagaga">strawberries</span>
(...)
<span class="gugugug">254</span>
<span class="krakaka">amazing</span><span class="gagaga">pineapples</span>
(...)
[/code]
And it goes on.
I need to extract the numbers and words between the <span> and </span> tags ("1", "enchanted", "chocolate bar", "2", "very remarkable", and so on) and put it in a bidimensional array. But what piece of code do I need in order to extract from between the tags?
I'm imagining it's something easy, but I'm completely new, whereas you guys are extremely good, so please help. 
|
|
|
|
|
Have you checked out MSXML? It will parse the xml and let you deal with through an object model.
|
|
|
|
|
I do not know what language you are using, but since it is posted under C/C++/MFC tab, I assume that it is....Pardon me, I just came here through a google search so I found the post under C/C++/MFC tab. Now as said by the previous reply u got, you can use MSXML. Or if you have an option of using .NET (C# or VB.NET), then you can just make use of HTMLDocument, HTMLElement, HTMLElementCollection classes, and get the tags and the info inside them. Then use .NET interop to bring them to native C++. Or you can just use /clr option that VC++ compiler provides u and write managed code in C++ application as well...Other than that, I am also waiting for a good method or previous code that has been posted on the net to do it. I had hoped to find some information about this on MSDN, but in vain. Eventually, I hope something in this regards is posted some where...
Bhushan
|
|
|
|
|
In this message board the correct assumption is native C/C++. There are seperate message boards for .net, C#, and managed C++. So the best answer is MSXML and there are plenty of examples available by googling MSXML Examples.
|
|
|
|
|
There is also this[^] and I am sure many more like it. MSXML is not the only option.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
hi anybody.
i have tried the wait function in the forum .
it works fine in taking pictures with cameras like :
<pre>camera1.release();
wait(1);
camera2.release();</pre>
but when i try showing images in picture box with time interval and the same wait function , the program freezes and only shows the last image after all of waits.
i mean if we have 6 images in program and 10 seconds waiting interval , the last image shown after 10 seconds.
my yahoo id is :mshankayi@yahoo.com
mail :mohd109@gmail.com
i really need to know where is the problem
if anyone wants all the code for helping please just email me.
thanks in advance
sincerely
Mohammad Shankayi
|
|
|
|
|
I'm not sure what wait() is but if it behaves like Sleep() does, the primary thread will be blocked until that function returns. When the primary thread is blocked, it's not going to be processing any messages.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
great
that's it
and one question : what class in .net can do what i want
because it's a simple function.
not to sleep just do sth in time intervals.
thanks a lot
sincerely
Mohammad Shankayi
|
|
|
|
|
If you want to display a picture roughly every 10 seconds, call SetTimer(10000). Draw the picture in/from the WM_TIMER handler function.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
If you're doing this in .net, then this is not the best forum to come for help.
There's a C# and a C++/CLI one.
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|