|
|
HELLO all,
I have visual c++ code for opening images of type jpeg,gif,bmp etc.Now, I can load pictures into that window.But i want to draw the histrogram of the loaded image.
Can please anyone tell me how to do this?
I would be really thamkful for this information.It would be great if someone could provide my code snippet.
Thanks
|
|
|
|
|
|
thanks for replying.
actually , i am very much new to vc++.I do not know how to use it.thats why i am asking about some code snippet.
can you please provide me with such a clue?I would be really thankful to you for this.
|
|
|
|
|
No problem Im here for answer to questions of course if I could.You can use of GetPixel or CImage::GetPixel it returns RGB of each pixel at image that its between 0 to 255 see this example
CImage m_Image;
COLORREF color;
BYTE m_Intensity;
m_Image.Load(_T("c:\\123.jpg"));
color=m_Image.GetPixel(10,10);
m_Intensity=GetRValue(color);
m_Intensity=GetGValue(color);
m_Intensity=GetBValue(color);
m_Image.Destroy();
|
|
|
|
|
can you help me to ident a radar cross section??
|
|
|
|
|
Good Morning all..........
I am loading a bitmap on a push button control. After loading, the corners of button are still visible. I want to hide those corners. Please help me.
Thanks in advance
sai
|
|
|
|
|
Did you customize Button class?
|
|
|
|
|
|
Can you derived of CButton class and use of ownerdraw on your project?
|
|
|
|
|
|
Is there way to create a WM_COMMAND message from within my code?
In constructing a menu under SDI or MDI, one can:
1. Create a menu item.
2. Assign an ID to the menu item
3. Use Wizard to assign the ID to function in a class.
I want to create my own WM_MESSAGE in my own code, assign an ID to it, and use Wizard to assign that ID to a particular function in a class.
Is there a way to do this? Is there a way to do something similar to this?
Thanks.
|
|
|
|
|
Are you looking for RegisterWindowsMessage() ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Oliver123 wrote: I want to create my own WM_MESSAGE in my own code, assign an ID to it, and use Wizard to assign that ID to a particular function in a class.
look at WM_APP and WM_USER in your local copy of MSDN or you could refer this article[^] by Mr Joseph M. Newcomer
"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
|
|
|
|
|
I want to get a usb device's firmware serial number.
I know,want there is a new disk was plug into the computer,regedit would report such event:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk\Enum
Count would tell me how many disk devices is present.
A sequence item name 0,1,... would hold the device,which are all REG_SZ value.I can get the usb device firmware serial number from the string.
But the problem is,if there are more than one usb disk device present,how should i map the regedit item to its real device(or its disk-letter)?
Thanks.
GOOD LUCK
|
|
|
|
|
Hello,
i was making applition(single document/view application), but i dont know to know attach a control on it, can somebody help me please?
|
|
|
|
|
did you try to create a dynamic control?
for example, CEdit edit1;
edit1.Create(....);
like that.
i donot remember the exact syntax, but if you want it, then i can work it out and guide u.
|
|
|
|
|
Hello,
Can I attach a dialog to Document/view?
is there a way?
|
|
|
|
|
what is your exact question?
1.if you want to create butons on your view, then you can do the same by creating dynamic controls.
2.if you want to load your dialog on clicking any menu item then it is posible using domodal. (i donot think you are not aware of it).
3.by default, if you want your dialog to be displayed in the place of hte view, then i shall work it out and guide you.
but out of the above three, i feel you can prefer the first one.
good luck.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Hello,
what i was going to do is the third part of post
3.by default, if you want your dialog to be displayed in the place of hte view, then i shall work it out and guide you.
I hope we will find out very soon how!!!.
thanks
|
|
|
|
|
How do you want to make them Visual or writting code?
|
|
|
|
|
Hello,
I have a dialog,
i want to attach to Document/view?
is there a way?
|
|
|
|
|
Why you dont use of CFormView instead CView on the CForView you can make your control or insert of Toolbox to Form.
|
|
|
|
|
Hi there. I created an application that on ending it displays:
Program '[2788] Application.exe: Native' has exited with Code 2 (0x2).
Now, from my research it said that the successful exit code should be 0. Has anyone had their programs exit with Code 2? Just want to ask so that I would have some clue on where to start finding the cause of this, if this does affect the application in the first place.
thank you!
|
|
|
|
|
It's up to the application to return whatever value is appropriate for
the application.
It's long been conventional to use 0 as a success return value (since it worked
well with DOS batch files, I suppose).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|