|
|
Please don't post the same question multiple times, once is enough and in some cases more than enough.
|
|
|
|
|
If you know the file format of the respective image files, you could very well extract RGB compnoents of the pixel.
Regards,
Paresh.
|
|
|
|
|
How can I extract the RGB components of Images with formats
MNG,PNG,TIFF.Kindly tell me where I could find some sample codes
|
|
|
|
|
|
Thank u,
but all the Zip files downloaded are corrupted.
they are .htm files renamed as .zip
|
|
|
|
|
I am sorry. I am not sure about that.
But here I could download it... I just did download the full source code now.
- NS -
|
|
|
|
|
For png and I think tiff you can use of CImage class.
|
|
|
|
|
Hi
Nowadays I am learning MFC and i have a problem with CMainFrame.
I am looking codes which VS2005 MFC wizard create, something different.
When i write a MFC App, i create a class which is derived from CWinApp and then create a CFrameWnd.
I handle menu messages in FrameWnd's message map.
But in VS 2005 codes. There is message map in Application class and menu messages are associated with application class message map.
For example:
MFCSingle.exe -> MFCSingle.cpp
BEGIN_MESSAGE_MAP(CMFCSingleApp, CWinApp)<br />
ON_COMMAND(ID_APP_ABOUT, &CMFCSingleApp::OnAppAbout)<br />
ON_COMMAND(ID_FILE_NEW, &CWinApp::OnFileNew)<br />
ON_COMMAND(ID_FILE_OPEN, &CWinApp::OnFileOpen)<br />
ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinApp::OnFilePrintSetup)<br />
END_MESSAGE_MAP()
So where is CMainFrame?
Isn't menu control belong to CMAinFrame?
|
|
|
|
|
You probably made a Dialog based Application or did unselect Doc/View.
Failure is not an option - it's built right in.
|
|
|
|
|
in a standard MFC Project CMainFrame will be in files called MAINFRM.H and MAINFRM.CPP
For the MSDN description of Command Routing see here[^]
|
|
|
|
|
Hi All,
I use this code to change the color of some words in the text, using GDI+ (it based on the example from MSDN). I want to change the color of words in range specified by the charRanges. But the result is kind of weird, the words are not displayed as specified by the range, and the position is moving to right-bottom a little bit.
--edit--
I think I know the problem. The text displayed in the new region is trimmed and positioned based on the region's size. So, I wonder if there any other way to do this?
Below is some of the code... If you have any experience with GDI+ pls help me...
Thank you!
...<br />
int p[3] = {4,17,39};<br />
int q[3] = {5,3,13};<br />
CharacterRange charRanges[3] = { CharacterRange(4, 5),<br />
CharacterRange(17, 3),<br />
CharacterRange(39, 13), };<br />
<br />
Font myFont(L"Times New Roman", 12);<br />
StringFormat strFormat;<br />
StringFormat stringFormat;<br />
<br />
Region* pCharRangeRegions;
short i;
int count;
CString strMsg = "The quick, brown fox easily jumps over the lazy dog.";<br />
LPWSTR string;<br />
string = CStringToWchar(strMsg);<br />
strFormat.SetMeasurableCharacterRanges(3, charRanges);<br />
<br />
count = strFormat.GetMeasurableCharacterRangeCount();<br />
pCharRangeRegions = new Region[count];<br />
<br />
graphics.MeasureCharacterRanges(string, -1,<br />
&myFont, layoutRect, &strFormat, count, pCharRangeRegions);<br />
RectF *enclosingRect;<br />
enclosingRect = new RectF[count];<br />
graphics.DrawString(string, -1,&myFont, layoutRect, &strFormat, &blueBrush);<br />
<br />
for ( i = 0; i < count; i++)<br />
{<br />
string = CStringToWchar(strMsg.Mid(p[i],q[i]));<br />
graphics.SetClip(&pCharRangeRegions[i]);<br />
graphics.GetClipBounds(&enclosingRect[i]);<br />
graphics.DrawString(string, -1, &myFont, enclosingRect[i], &stringFormat, &redBrush);<br />
}
-- modified at 4:28 Thursday 26th July, 2007
-Houari
|
|
|
|
|
LINK : fatal error LNK1104: cannot open file "mfc42u.lib"
I am getting this error...How to resolve this error??
Thanks in advance
|
|
|
|
|
What respose did you get when you tried google for this error ?
It's looking for a unicode MFC library, did you change your applications UNICODE settings ?
|
|
|
|
|
It says that it cannot find the specified library file, which is a MFC library from VC6.
So what did you do exactly do get this error ? Did you convert a VC6 project to another visual Studio ? Did you create a new project ? ...
Could you give more informations ?
|
|
|
|
|
It seems to be that you didnt specified the unicode libraries at the time of VC installation
- NS -
|
|
|
|
|
Do you have this file on your system?
|
|
|
|
|
hello
my project is mouse control through hand gestures in which i connected Matlab7 with VC++ 6.0.Matlab and VC connected successfully and the project also run sucessfully but i got a prolem in running the project which is
"server busy: this action cannot be completed because
the other program is busy.choose 'switch to' activate
the busy program and correct the problem"
please give me replay. i am waiting
good bye.
azeema anees
|
|
|
|
|
Sound like a endless loop, and your application is not reacting on reveived messages.
Stop your program with the debugger and look at the call stack. Something you recognize? Is there an error somewhere.
If not, try inserting a Breakpoint in the InitInstance of your application and step through it.
Failure is not an option - it's built right in.
|
|
|
|
|
I want to create a CFont object with facetype "Arial" and size 12.
I dont know the height and width of the font.
Can anyone help me.
Thanks in advance.
|
|
|
|
|
Here's one way, ripped right from the docs:
CClientDC dc(this);
CFont font;
VERIFY(font.CreatePointFont(120, "Arial", &dc));
// Do something with the font just created...
CFont* def_font = dc.SelectObject(&font);
dc.TextOut(5, 5, "Hello", 5);
dc.SelectObject(def_font);
// Done with the font. Delete the font object.
font.DeleteObject();
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
See CFont Help in MSDN. you first approach to Any should MSDN, then Google afterthat any Programming Board!.. this will help u in future dude!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
Long time no see. You're too busy with work?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
You can use of CreateFont .
|
|
|
|
|
Hi,
In MDI application,child windows are appear in cascade mode..and im using it.
My problem is: I can minimize and restore the child window. But when i maximize the window it get maximized and the window has small mini,maxi and close buttons.IT will come like tht only.But after maximizing i cannot restore,minimize and close the window.
Whats the problem in it.I posted the same problem few days back.I get response but wiht that i cannot solve teh problem.Pls help me out .
Anu
|
|
|
|