|
Hi Everybody, I want to change the color of selecting text in an edit control and I ran out of ideas.
I am totally confused, please anyone guide.
It is a WIN32 C++ Application.
Regards,
Vishal
|
|
|
|
|
That's a Windows setting. You can change it via code, but that may end up irritating the user. In any case, see SetSysColors() and COLOR_HIGHLIGHT .
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
SetSysColors() works, but it had changed the default COLOR_HIGHLIGHT color to BLACK,
I had used RGB(0,0,0)
This function changes the global highlight color, I want to change highlight color of my edit control only.
How to achieve this.
Regards,
Vishal
|
|
|
|
|
vishalgpt wrote: I want to change highlight color of my edit control only. How to achieve this.
Custom control.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hi, I was guessing the same, but i am creating a win32 application,
1) Sould i go with MFC
2) Or Subclass existing edit control in win32 c++
Or some other way if exists:...
Regards,
Vishal
|
|
|
|
|
SOLVED
Adding MJPEG driver to my box solved the problem.
Now I need to clean up the test mess I have added to my app!
Moral of the story - when working with OpenCV beware of lack of commnets in the code and always check the logic, it is not the best. I actually feel this is a (logical ) bug and has been in OpenCV since 1.1 and it is still in 2.4.0.
Thanks for all your help.
vaclav
I am trying to display image from USB connected camera.
I know the camera works – I can get a nice image using MS Scanner and Camera wizard.
My problem is that capGetVideoFormat fills the BITMAPINFO biCompression with a value I have no idea what it represents. MSDN is no help in defining this in video frame.
If it is a decompressor info it does not match any of 15 decompression installed on the system.
So
<b>how do I KNOW for sure the USB video is compressed and
how do I use this biCompression value for further processing?</b>
Here is the offending snippet from OpenCV library
BITMAPINFO vfmt;
memset( &vfmt, 0, sizeof(vfmt));
BITMAPINFOHEADER& vfmt0 = vfmt.bmiHeader; // input header
int sz, prevWidth, prevHeight;
if( !capWnd )
return 0;
this fills the biCompression value in question
sz = capGetVideoFormat( capWnd, &vfmt, sizeof(vfmt));
…..............
And this is where attempt to locate the decompressor driver fails
hic = ICLocate (ICTYPE_VIDEO, 0L, (LPBITMAPINFOHEADER) &vfmt,
NULL, ICMODE_DECOMPRESS);
Any suggestions are as always appreciated.
PS I need to stay with capAVI and OpenCV.
Thanks
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: My problem is that capGetVideoFormat fills the BITMAPINFO biCompression with a value I have no idea what it represents.
What is its value?
Veni, vidi, vici.
|
|
|
|
|
|
If you convert that to hex you get 47504A4D - the characters "MJPG" backwards. So it looks like you need to use a motion JPEG codec.
|
|
|
|
|
As already suggested, is M-JPEG (in particular Pinnacle M-JPEG ).
Veni, vidi, vici.
|
|
|
|
|
Ok, that is not one of the drivers in the system.
I hope is is no brainer to find it and add to the system.
I sure would like to know where did you find out how to decode this diCompressor value.
And of course how did MS determine that - where is it "advertized".
I did not see anything like that in device driver properties.
Thanks
Vaclav
|
|
|
|
|
I found this under FOURCC, I guess I just answered my own question.
Next time I'll test for the FOURCC code!
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd375802(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/dd375802(v=vs.85).aspx</a>[<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd375802(v=vs.85).aspx" target="_blank" title="New Window">^</a>]
|
|
|
|
|
How to draw an image excepting balck pixel color using gdi DrawImage function?
|
|
|
|
|
|
u can select other pixel color when u create the CPen,
CPen(int nPenStyle,int nWidth,COLORREF crColor);
|
|
|
|
|
We have migrated our workspace from VC6.0 to VS2010. There is a CreateControl api which is returning 0 after converting to VS2010. Before conversion this was working fine.
What could be the reason for failure.
|
|
|
|
|
V K 2 wrote: What could be the reason for failure.
At a guess, there is a bug in your code. Assuming you mean this function[^] then you can use your debugger to see what is happening. You could also check the value of GetLastError() on failures.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
|
See here[^] for example.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
|
Have a look at this[^] also.
|
|
|
|
|
Malli_S
|
|
|
|
|
void main()
{
const int i = 10;
int& j = (int&)i;
cout << "i= " << i << endl;
cout << "j= " << j << endl;
cout << "&i= " << &i << endl;
cout << "&j= " << &j << endl;
j++;
cout << "j= " << j << endl;
cout << "i= " << i << endl;
}
//output
i= 10
j= 10
&i= 0012FF60
&j= 0012FF60
j= 11
i= 10
Hi,
the code declares a const integer and a reference to it. incrementing a reference adds 1 to j and outputs as 11, that is fine. i was expecting "i" to get modified, since "i" and "j", both having a same memory address, as i print "i", it outputs 10 (or compiler should not allow to increment j). i could not understand the behavior. Could anybody explains me what is going on behind the scene?
regards
Abid
|
|
|
|
|
Which compiler are you using is it VS or something else?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|