Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

A Ms

@A Ms
About
Posts
69
Topics
33
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problems with cvSobel and cvLaplace functions under visual studio 2010
    A A Ms

    Hi, I have downloaded OpenCV 2.2.0 distribution for visual studio 2010 and as i started programming with the opencv APIs under VS 2010 I faced a terrible problem. cvSobel and cvLaplace functions always throw cv::Exceptions and also their exceptions could have not been handled with try ... catch blocks. the provided error is: Unhandled exception at 0x7463b727 in App.exe: Microsoft C++ exception: cv::Exception at memory location 0x003bfb9c. and here is my code:

    IplImage* pImage = cvLoadImage("..\\Tulips.jpg");

    IplImage\* pImage1 = cvCreateImage(
    	cvSize(pImage->width, pImage->height),
    	pImage->depth,
    	pImage->nChannels
    	);
    
    IplImage\* pImage2 = cvCreateImage(
    	cvSize(pImage->width, pImage->height),
    	pImage->depth,
    	pImage->nChannels
    	);
    	
    cvSobel(pImage, pImage1, 0, 1, 2);
    cvLaplace( pImage, pImage2);
    
    
    cvNamedWindow("Image", CV\_WINDOW\_AUTOSIZE);
    cvShowImage("Image", pImage);
    
    cvNamedWindow("Image1", CV\_WINDOW\_AUTOSIZE);
    cvShowImage("Image1", pImage1);
    
    cvNamedWindow("Image2", CV\_WINDOW\_AUTOSIZE);
    cvShowImage("Image2", pImage2);
    
    cvWaitKey(0);
    

    please, help me if I am forgetting sth.

    ATL / WTL / STL help visual-studio csharp c++ performance

  • problem with CSplitButton::SetDropDownMenu method
    A A Ms

    Hi, I have created a dialog based application in visual studio 2010 and I have added a CSplitButton Control to my dialog through resource editor, also I have made a menu in resource editorwith the ID of IDR_MENU_BUTTON_FILE and a sud menu after all, my code looks like the following code:

    BOOL CMyDialogDlg::OnInitDialog()
    {
    CSplitButton* pCtrlSpiltBtn = (CSplitButton*)this->GetDlgItem(IDC_SPLITBUTTON1);
    pCtrlSpiltBtn ->SetDropDownMenu(IDR_MENU_BUTTON_FILE, 0);
    }

    however the pCtrlSpiltBtn get initialized correctly and every thing is OK. but

    pCtrlSpiltBtn ->SetDropDownMenu(IDR_MENU_BUTTON_FILE, 0);

    fails when I trace the case I found that this line call the following methods of MFC classes.

    void CSplitButton::SetDropDownMenu(UINT nMenuId, UINT nSubMenuId)
    {
    Cleanup();
    m_nMenuId = nMenuId;
    m_nSubMenuId = nSubMenuId;
    }

    void CSplitButton::SetDropDownMenu(CMenu* pMenu)
    {
    Cleanup();
    m_pMenu = pMenu;
    }

    void CSplitButton::Cleanup()
    {
    if (m_pMenu)
    {
    delete m_pMenu;
    }
    m_pMenu = NULL;
    m_nMenuId = (UINT)-1;
    m_nSubMenuId = (UINT)-1;
    }

    and the m_pMenu pointer is always initialized and while the line

    delete m_pMenu;

    get executed all the application ruining fails. Please help me solve the case, what should I do?

    C / C++ / MFC help csharp c++ visual-studio debugging

  • typecasting in std::vector type
    A A Ms

    Thanks

    C / C++ / MFC graphics question

  • typecasting in std::vector type
    A A Ms

    Hi, I have using a source code representing a class hierarchical like the following:

    class c1
    {...};
    class c2 : public c1
    {...};

    now there is a method in another class which has argument like:

    void Func1(vector<c1*>& vC1);

    How could I pass the following vC2 to this method

    vector<c2*> vC2;

    Is there any way to typecast the vector<c2*> to vector<c1*>?

    C / C++ / MFC graphics question

  • How Could I Use a define macro identifier in an other define macro replacement list?
    A A Ms

    Thanks, It works

    C / C++ / MFC tutorial question

  • How Could I Use a define macro identifier in an other define macro replacement list?
    A A Ms

    How Could I Use a define macro identifier in an other define macro replacement list? for example in the following example:

    #define APP_TEST1 L"Test1"
    #define APP_TEST2 L"Test2"

    #define APP_TEST L"Test1 With Test2"

    I want to represent the third define macro with 2 first macro?

    C / C++ / MFC tutorial question

  • CMFCRibbonButton with custom width
    A A Ms

    It was so surprising to me when i found that actually these two methods (CMFCRibbonBaseElement::SetRect and CMFCRibbonBaseElement::GetRect) do nothing, even after creating your ribbon element and put it in the ribbon menu you can't retrieve the dimensions of your element with CMFCRibbonBaseElement::GetRect and the only thing it gives is a rect object with zero dimentions :doh:

    C / C++ / MFC

  • CMFCRibbonButton with custom width
    A A Ms

    I want to Create CMFCRibbonButton control with custom width independent of it's caption length. and even I want know if I could change their width dynamically (at running time)

    C / C++ / MFC

  • How could I change the width of a CMFCRibbonButton or CMFCRibbonLabel
    A A Ms

    Is there any way to change the width of CMFCRibbonButton or CMFCRibbonLabel

    C / C++ / MFC

  • CSpinButtonCtrl message handling to know up or down button is clicked
    A A Ms

    Thanks Your code structure seems correct but unfortunately the UDN_DELTAPOS message didn't work I also tested WM_VSCROLL with ON_NOTIFY but it didn't work too. :(

    C / C++ / MFC tutorial

  • CSpinButtonCtrl message handling to know up or down button is clicked
    A A Ms

    I have added 2 CMFCSpinButtonCtrl to my ribbon menu now I want know how could I handle a message in my view class to see which spin control and which button of that control (up/down) is pressed I know it is something related to UDN_DELTAPOS But I don't know How To implement it

    C / C++ / MFC tutorial

  • No Method for Changing CMFCRibbonPanel Control Name Dynamically
    A A Ms

    Thanks

    C / C++ / MFC question

  • No Method for Changing CMFCRibbonPanel Control Name Dynamically
    A A Ms

    CMFCRibbonPanel class do not implement any method for changing the control name at running time, I think there should be a method like CMFCRibbonPanel::SetName since there is method like CMFCRibbonPanel::GetName so How could we change the name of this control dynamically?

    C / C++ / MFC question

  • CMFCOutlookBarTabCtrl save state problem
    A A Ms

    Of course the Application is responsible for saving registry info, you could test it with running release build explicitly from Bin file and changing the application custom setting, and the registry key Name is stored in your main application class cpp file (class drived form CWinAppEx) in the CwinAppEx::::InitInstance() method in the

    SetRegistryKey(_T("Local AppWizard-Generated Applications"));

    but I have no idea of where it save the custom styles. It should be some where after whole main frame is created.

    C / C++ / MFC c++ visual-studio architecture help

  • CMFCOutlookBarTabCtrl save state problem
    A A Ms

    Thanks I found the answer the whole setting is stored in HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\%ApplicationName% and I should delete this registry.

    C / C++ / MFC c++ visual-studio architecture help

  • CMFCOutlookBarTabCtrl save state problem
    A A Ms

    Thank you for spending time to solve my problem. I could not found the CMainFrameWnd::SaveState method, But the CMainFrameWnd could implement the CMainFrameWnd::SaveBarState(..) method Which takes CWinApp::m_pszProfileName as it's Argument. But even using this method didn't solve my problem even I have searched the whole registery and Profile for value of m_pszProfileName But I did not found any result, I know It 's saved somewhere because when I compiled It in an other profile the frame look the same as it's source implement it. This problem really Bother me.

    C / C++ / MFC c++ visual-studio architecture help

  • CMFCOutlookBarTabCtrl save state problem
    A A Ms

    I think i couldn't discuss the problem clearly, I mean I have changed the application in running mode, know the application rebuilds every time in the way I have changed it in running mode and every change I have made in source code became defectiveness.

    C / C++ / MFC c++ visual-studio architecture help

  • CMFCOutlookBarTabCtrl save state problem
    A A Ms

    This is my code for CMFCOutlookBarTabCtrl:

    BOOL CMainFrame::CreateOutlookBar(CMFCOutlookBar& bar, UINT uiID, int nInitialWidth/* = 250*/)
    {

    //Outlookbar Style
    bar.SetMode2003(FALSE);
    
    
    BOOL bNameValid;
    CString strTemp;
    bNameValid = strTemp.LoadString(IDS\_SHORTCUTS);
    ASSERT(bNameValid);
    
    
    //Creating OutlookBar
    if (!bar.Create(strTemp, this, CRect(0, 0, nInitialWidth, 32000), uiID, WS\_CHILD | WS\_VISIBLE | CBRS\_LEFT))
    {
    	return FALSE; // fail to create
    }
    
    
    //retrieving OutlookBarTabCtrl pointer
    CMFCOutlookBarTabCtrl\* pOutlookBar = (CMFCOutlookBarTabCtrl\*)bar.GetUnderlyingWindow();
    
    if (pOutlookBar == NULL)
    {
    	ASSERT(FALSE);
    	return FALSE;
    }
    
    
    
    pOutlookBar->EnableInPlaceEdit(TRUE);
    
    
    //Creating Tab Panes
    
    DWORD dwPaneStyle = AFX\_DEFAULT\_TOOLBAR\_STYLE | CBRS\_FLOAT\_MULTI;
    
    // can float, can autohide, can resize, CAN NOT CLOSE
    DWORD dwStyle = AFX\_CBRS\_FLOAT | AFX\_CBRS\_AUTOHIDE | AFX\_CBRS\_RESIZE;
    
    
    static UINT uiPageID = 10;
    
    
    \_m\_OutlookPane1.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
    \_m\_OutlookPane1.SetOwner(this);
    \_m\_OutlookPane1.EnableTextLabels();
    \_m\_OutlookPane1.EnableDocking(CBRS\_ALIGN\_ANY);
    //\_m\_OutlookPane1.SetDefaultState();
    pOutlookBar->AddControl(&\_m\_OutlookPane1, \_T("Scene\*"), 0, TRUE, dwStyle);
    
    
    \_m\_OutlookPane2.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
    \_m\_OutlookPane2.SetOwner(this);
    \_m\_OutlookPane2.EnableTextLabels();
    \_m\_OutlookPane2.EnableDocking(CBRS\_ALIGN\_ANY);
    //\_m\_OutlookPane2.SetDefaultState();
    pOutlookBar->AddControl(&\_m\_OutlookPane2, \_T("Walls\*"), 1, TRUE, dwStyle);
    
    
    \_m\_OutlookPane3.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
    \_m\_OutlookPane3.SetOwner(this);
    \_m\_OutlookPane3.EnableTextLabels();
    \_m\_OutlookPane3.EnableDocking(CBRS\_ALIGN\_ANY);
    //\_m\_OutlookPane3.SetDefaultState();
    pOutlookBar->AddControl(&\_m\_OutlookPane3, \_T("Furnitures\*"), 2, TRUE, dwStyle);
    
    
    \_m\_OutlookPane4.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
    \_m\_OutlookPane4.SetOwner(this);
    \_m\_OutlookPane4.EnableTextLabels();
    \_m\_OutlookPane4.EnableDocking(CBRS\_ALIGN\_ANY);
    //\_m\_OutlookPane4.SetDefaultState();
    pOutlookBar->AddControl(&\_m\_OutlookPane4, \_T("Decorations\*"), 3, TRUE, dwStyle);
    
    
    \_m\_OutlookPane5.Create(&bar, dwPaneStyle, uiPageID++, dwStyle);
    \_m\_OutlookPane5.SetOwner(this);
    \_m\_OutlookPane5.EnableTextLabels();
    \_m\_OutlookPane5.EnableDocking(CBRS\_ALIGN\_ANY);
    //\_m\_OutlookPane5.SetDefaultState();
    pOutlookBar->AddControl(
    
    C / C++ / MFC c++ visual-studio architecture help

  • CMFCOutlookBarTabCtrl save state problem
    A A Ms

    I have Developed an application using VC++ 10 (VS 2010 RC) to create a document/view architecture with Ribbon Menus and a Outlook Bar pane with (CMFCOutlookBarTabCtrl) The First time I have created the bar it appears like what my codes were implemented it but after I have customize The bar in running Mode. I can't see changes I have made in code after rebuilding the application. It seems that It save the previous state of outlook bar. what should I do to so that I could see it in the way my code implements.

    C / C++ / MFC c++ visual-studio architecture help

  • How Add dialog and show it?
    A A Ms

    Ok Please Don't hesitate to ask any question ,But I could not promise if I could answer them all. Here is a list of update books you may like to use, How ever mostl of MFC guide books found in the net are old ones but they could be useful too because the bases are the same: http://msdn.microsoft.com/en-us/visualc/dd721903.aspx[^] By the way for those who are new to MFC, How Do I? Video Series[^] would be interesting.

    C / C++ / MFC csharp c++ hosting cloud question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups