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
U

User 10924543

@User 10924543
About
Posts
11
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What MFC class applies to the listbox control in VS2010 resource editor?
    U User 10924543

    I can't possibly be ClistCtrl because if I do (ClistCtrl *)GetDlgItem(...) and then try to insert items and columns (via the documented member functions of CListCtrl, absolutely nothing happens. The list box control remains resolutely blank.

    C / C++ / MFC c++ com question learning

  • Can some one please tell me how to insert items into a friggin CListCtrl
    U User 10924543

    I have been reading the documentation - where else do you think I obtained those methods that I have been trying. This is what I have tried precisely. And function

    int InsertItem(
    int nItem,
    LPCTSTR lpszItem

    ,as described here (http://msdn.microsoft.com/en-us/library/8b9s12fc.aspx[^]), DOES NOT WORK The function does nothing. WHY? Can you only add items to a CListCtrl via

    int InsertItem(
    const LVITEM* pItem
    );

    and the function that I have been using is in fact defunct?

    **void CImageDialog::DDX_List(CDataExchange* pDX, UINT uListCtrlID, CStringArray& rarrayOtherImgFiles)
    {
    CListCtrl* pListCtrl = (CListCtrl*)GetDlgItem(uListCtrlID);
    int nI = 0;
    CString strItem;

    ASSERT\_VALID(pListCtrl);
    
    if (pDX->m\_bSaveAndValidate)
    {
    	m\_arrayOtherImageFiles.RemoveAll();
    	for (nI = 0; nI < pListCtrl->GetItemCount(); nI++)
    	{
    		strItem = pListCtrl->GetItemText(nI, 0);
    		m\_arrayOtherImageFiles.Add(strItem);
    	}
    }
    else
    {
    	pListCtrl->DeleteAllItems();
    	for (nI = m\_arrayOtherImageFiles.GetCount() - 1; nI >= 0; nI--)
    	{
    		pListCtrl->InsertItem(1, m\_arrayOtherImageFiles.GetAt(nI));
    	}
    }
    

    }**

    void CImageDialog::DoDataExchange(CDataExchange* pDX)
    {
    CMyDialog::DoDataExchange(pDX);
    DDX_Text(pDX, IDC_EDIT_HEADER_IMG, m_strHeaderImageFile);
    DDX_Text(pDX, IDC_EDIT_NAV_IMG1, m_strNavImg1File);
    DDX_Text(pDX, IDC_EDIT_NAV_IMG2, m_strNavImg2File);
    DDX_Text(pDX, IDC_EDIT_OTHER_IMG_FILES, m_strOtherImgFiles);
    DDX_List(pDX, IDC_LIST_OTHER_IMG_FILES, m_arrayOtherImageFiles);
    }

    C / C++ / MFC tutorial

  • Can some one please tell me how to insert items into a friggin CListCtrl
    U User 10924543

    This method does not work:

    // Insert item for col 0
    lvi.mask = LVIF_TEXT;
    lvi.pszText = "one";
    m_ListCtrl.InsertItem(&lvi);
    // Insert subitem for col 1
    lvi.pszText = "two";
    lvi.iSubItem = 1;
    m_ListCtrl.InsertItem(&lvi);

    This method does not work:

    	for (int nI = 0; nI < m\_strarrayOtherImgFiles.GetCount(); nI++)
    	{
    		pOtherImgsList->SetItemText(nI, 0, m\_strarrayOtherImgFiles.GetAt(nI));
    	}
    

    Nothing seems to work.

    C / C++ / MFC tutorial

  • Visual studio 2010 - class wizard
    U User 10924543

    With visual studio 6 you were able to delete the .clw file to re-build the class wizard if you made a lot of changes in the source files and that were not showing in the class wizard. How do you do this with VS 2010 - there is no longer a .clw file.

    C / C++ / MFC visual-studio csharp

  • How do you do data exchange (as in DDX_ functions/macros)....
    U User 10924543

    If you have a CMFCShellListCtrl..........CListCtrl with multiple selections?

    C / C++ / MFC question

  • Using CMFCShellListCtrl
    U User 10924543

    Accident.

    C / C++ / MFC question

  • Using CMFCShellListCtrl
    U User 10924543

    I know the functions you use to get the current working directory in the control, but how do you get a list of selected files from it? I can't find any examples of this.

    C / C++ / MFC question

  • Visual studio 2010 compile error - I don't understand how to fix it
    U User 10924543

    It turned out that I was looking in the wrong file. The problem as the App definition file not the dialog definition file.

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

  • Visual studio 2010 compile error - I don't understand how to fix it
    U User 10924543

    It turned out that I was looking in the wrong file. The problem as the App definition file not the dialog defionition file.

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

  • Using CMFCShellListCtrl
    U User 10924543

    I have found the functions that you use to obtain the current working directory in the control, but how do you get a list of selected files (or other objects) from it. I have not been able to find an example any where thus far. Can you point me in the direction of such a code example?

    C / C++ / MFC tutorial question

  • Visual studio 2010 compile error - I don't understand how to fix it
    U User 10924543

    Error 1 error C2504: 'CMyDialog' : base class undefined c:\greg\easywebstoreuploader\easywebstoreuploaderdlg.h 9

    In the source file I have included the MyDialog.h above the header file containing the class definition for CEasyWebStoreUploaderDlg but I can't pi$$ this compiler error off and I don't understand why. Can any one help me?

    #include "stdafx.h";
    #include "INI.h"
    #include #include #include "MyDialog.h"
    //#include "ServerDialog.h"
    //#include "ImageDialog.h"
    #include "EasyWebStoreUploaderDlg.h"
    #include "EasyWebStoreUploader.h"

    Header file

    / EasyWebStoreUploaderDlg.h : header file
    //

    #pragma once

    // CEasyWebStoreUploaderDlg dialog
    class CEasyWebStoreUploaderDlg : public CMyDialog
    {
    // Construction
    public:
    CEasyWebStoreUploaderDlg(CWnd* pParent = NULL); // standard constructor
    ~CEasyWebStoreUploaderDlg();

    	// Dialog Data
    	enum { IDD = IDD\_EASYWEBSTOREUPLOADER\_DIALOG };
    
    protected:
    	virtual void DoDataExchange(CDataExchange\* pDX);	// DDX/DDV support
    
    // Implementation
    protected:
    	HICON m\_hIcon;
    	//CServerDialog m\_dialogServer;
    
    	// Generated message map functions
    	virtual BOOL OnInitDialog();
    	afx\_msg void OnSysCommand(UINT nID, LPARAM lParam);
    	afx\_msg void OnPaint();
    	afx\_msg HCURSOR OnQueryDragIcon();
    	DECLARE\_MESSAGE\_MAP()
    
    public:
    	afx\_msg void OnClickConnect();
    	afx\_msg void OnClickUploadAll();
    
    	afx\_msg void OnChangeTab(NMHDR \*pNMHDR, LRESULT \*pResult);
    	CTabCtrl m\_tabCtrl;
    

    };

    Source file

    // EasyWebStoreUploaderDlg.cpp : implementation file
    //

    #include "stdafx.h"
    #include "INI.h"
    #include
    #include "afxcmn.h"
    #include "MyDialog.h"
    //#include "ServerDialog.h"
    //#include "ImageDialog.h"
    #include "EasyWebStoreUploaderDlg.h"
    #include "EasyWebStoreUploader.h"

    #ifdef _DEBUG
    #define new DEBUG_NEW
    #endif

    // CAboutDlg dialog used for App About

    class CAboutDlg : public CDialogEx
    {
    public:
    CAboutDlg();

    // Dialog Data
    	enum { IDD = IDD\_ABOUTBOX };
    
    	protected:
    	virtual void DoDataExchange(CDataExchange\* pDX);    // DDX/DDV support
    
    // Implementation
    protected:
    	DECLARE\_MESSAGE\_MAP()
    

    };

    CAboutDlg::CAboutDlg() : CDialogEx(CAboutDlg::IDD)
    {
    }

    void CAboutDlg::DoDataExchange(CDataExchange* pDX)
    {
    CDialogEx::DoDataExchange(pDX);
    }

    BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
    END_MESSAGE_MAP()

    // CEasyWebStoreUploaderDlg dialog

    CEasyWebStoreUploaderDlg:

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

  • Don't have an account? Register

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