Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC
Hello everyone
 
I've faced a new hindrance.(Don't judge harshly, I'm a novice in MFC)
 
The issue is how to add picture control to Main Frame in MFC project?
 
I created a new MFC project with Ribbon style and the problem is that I can't just open the Toolbox and add a picture control to the main frame just using a Form Designer. I have no opportunity to manipulate with the hole Window(like in Dialog Based option)-- only with the Ribbon.
 
My task is get the picture path from the OpenDialog(no problem with that Smile | :) )
and load the picture using ONLY OpenCV. ( I don't need any other methods like CImage.Load() or ATL functions). I red OpenCV CookBook (they use QT or directly load a picture to a separate window via cv::imshow) and browsed many other MFC books that i could find, but no use.
 
I've seen many solutions how to Draw( lines,rectangles and other things) on Frame. They do it into OnDraw(CDC* pDC) in YourProjectView class, but nothing how to do add a picture container into Main Frame. I only strive for MSPaint functionality( choose pct->and load it)
 
Maybe I should add a pictureBox or smth else in resource file(But how?? only I see there is Bitmap) or create it dynamically in the code(but how to Link it with the Main Frame ??)
 
As I mentioned before I've been searching all over the Internet and in the many MFC books, before I decided to write my question.
 

Please give me a clue. Heeelp
Posted 2-Oct-12 4:03am
Edited 2-Oct-12 11:51am
v9
Comments
JOHN 602 at 3-Oct-12 14:13pm
   
I've solved the problem. The theme is closed.
The main impediment was with the receiving the right context.
Several hours debugging led me to the working code. hurray! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 BillWoodruff 300
1 Mathew Soji 274
2 Afzaal Ahmad Zeeshan 268
3 DamithSL 225
4 Sergey Alexandrovich Kryukov 205
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 3,865


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 2 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100