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
M

Madhu Nair 0

@Madhu Nair 0
About
Posts
155
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • I have problem with codecvt<>
    M Madhu Nair 0

    Cold_Fearing_Bird wrote:

    char origin[] = "追求追求";

    You are trying to set a unicode/wide string to ANSI buffer.

    ATL / WTL / STL help question

  • To ask the user information via keyboard
    M Madhu Nair 0

    +5 for the answer!

    C / C++ / MFC c++ help

  • MFC - how to get an edit box text from another dialog?? (Constructor)
    M Madhu Nair 0

    Keep a public CString member variable in Child dialog class, set the member variable before calling the DoModal() or Create function of child dialog. Call SetWindowText of edit control in InitDialog. for. eg If CMainDlg is your Main dialog class and CChildDialog be the child. in header of CChildDialog you declare a public member variable to hold the string

    class CChildDialog : public CDialog
    {
    public :
    CString m_strText;
    }

    and in your button click function of CMainDlg do this

    void CMainDlg::OnClick_Button()
    {

    CChildDialog oChildDlg;
    oChildDlg.m_strText = strText; // This should be the edit box value
    oChildDlg.DoModal();
    }

    Set the variable value in CChildDialog's OnInitDialog as

    CChildDialog::OnInitDialog()
    {
    SetDlgItemText(ID_OF_YOUR_EDIT, m_strText);
    }

    You can also set the text by modifying your constructor of CChildDialog, such as

    CChildDialog::CChildDialog(CString strText)

    C / C++ / MFC question c++ help tutorial

  • how to write/read in text file with mfc project??
    M Madhu Nair 0

    antonio343 wrote:

    , I get a error that it said:
    You dont have acces to this file.

    Open the file using

    CFile::modeReadWrite OR CFile::modeWrite

    it seems you don't have permission to write.

    C / C++ / MFC c++ com help tutorial question

  • How to get list of COM Ports in Win32
    M Madhu Nair 0

    @Albert,thanks!

    C / C++ / MFC com json tutorial

  • How to get list of COM Ports in Win32
    M Madhu Nair 0

    pandit84 wrote:

    Is there any API which gives me list of Seial Ports available on system.

    SerialPort.GetPortNames Method[^] is available as a.Net library method. You could also try Another serial port enumerator[^] which uses a different approach to find serial ports by enumerating registry keys. -OR- Enumerating serial ports - W2K style [^]- Enumerating the serial ports using the SetupDi* API provided with Win2K and later

    pandit84 wrote:

    QueryDosDevice () but its failed to provide any result .

    I have also found this support page [^] on why QueryDosDevice fails.

    C / C++ / MFC com json tutorial

  • Application getting carshed in release mode not in debug, in the follwing scenario
    M Madhu Nair 0

    Validate the pointers and HTREEITEM

    CTreeCtrl* pTreeCtrl = (CTreeCtrl*)GetDlgItem(pNMHDR->idFrom);
    //add this checking
    if(!pTreeCtrl)
    {
    // Some message and return
    }

    also

    HTREEITEM ht = pTreeCtrl->HitTest(point, &uiFlags);
    // add this checking
    if (ht != NULL)
    {
    pTreeCtrl->Select(ht, TVGN_CARET);
    }
    else
    {
    // Show some error message/return
    }

    C / C++ / MFC help algorithms data-structures debugging announcement

  • Show information in the same dialog after press diferent button
    M Madhu Nair 0

    antonio343 wrote:

    I need, to show text from other class in the same dialog

    How about making the ShowText function as public and pass a CString variable ;

    void CEjemplo::ShowText(CString strText)
    {
    //CString cadena= _T("Hi, it is a example");
    m_Edit.SetWindowTextW(strText);
    //Add this to invoke DDX updation
    UpdateData(FALSE);
    }

    call the public function of CEjemplo object as,

    void CSomeOtherClass::ShowText()
    {
    CEjemplo oEjemplo;
    CSting strText(_T("Some text from other class"));
    oEjemplo.ShowText(strText);
    }

    C / C++ / MFC c++ help tutorial question

  • Rookie Alert! Need Help Learning C
    M Madhu Nair 0

    A little googling may help you to find some tutorial sites - like this link[^]

    C / C++ / MFC help question learning

  • How can I Move a memory pointer in FILE?
    M Madhu Nair 0

    Try ofstream[^] for serializing the objects in C++ way. Here[^] is an example. Check this[^] site if you are interested to learn how to serialize in MFC.

    C / C++ / MFC question performance

  • Loading ICON
    M Madhu Nair 0

    Or insert a PictureControl and change the "Type" property of PictureControl to "Icon", then assign an ICON resource to "Image" property of PictureControl.

    C / C++ / MFC tutorial

  • how to unzip bytes in memory
    M Madhu Nair 0

    Using managed GZipStream[^] class. For unmanaged apps check CGzip[^] class found in codeproject.

    C / C++ / MFC performance tutorial question

  • call to 'another program from C code
    M Madhu Nair 0

    The WINDOWS API replacement of system[^] are ShellExecute[^] / ShellExecuteEx[^] or CreateProcess[^]

    C / C++ / MFC question help

  • index of HTREEITEM item?
    M Madhu Nair 0

    The index concept is not applicable for a TreeItem. The HTREEITEM itself is an index identifier for the item. Loop through each items and store the index values and HTREEITEM in a map for future use.

    zon_cpp wrote:

    user selects 3th item of CTreeCtrl.

    If your issue is to get the exact item when the user clicks on a treeitem - I have a suggestion, to use CTreeCtrl's HitTest[^] to get the item from selected point.

    C / C++ / MFC question database help tutorial

  • CRichEditCtrl Flickring
    M Madhu Nair 0

    How about adding a CString member variable[^] for your CRichEditCtrl and updating the data using UpdateData[^]

    C / C++ / MFC question

  • Is there any library which can detect the faulty statement at runtime?
    M Madhu Nair 0

    Yes - the MiniDumpWriteDump[^] function.

    C / C++ / MFC question announcement

  • Erranous behavouir in Modless Dialog
    M Madhu Nair 0

    Figure out what are the main difference with 'working' and 'not working' buttons. Is it a sub-classed button or OWNER DRAW true in styles.

    C / C++ / MFC help question

  • ::__argv ist NULL, but ::__argc is correct, why?
    M Madhu Nair 0

    You should use CommandLineToArgvW[^] along with GetCommandLine[^] for UNICODE applications.

    C / C++ / MFC c++ visual-studio question

  • Managing PushButton notifications under MFC
    M Madhu Nair 0

    Check your PUSHBUTTON is not disabled.For a BN_CLICKED message, The parent window is notified through WM_COMMAND with control ID and handler. wParam The LOWORD contains the button's control identifier. The HIWORD specifies the notification code. lParam A handle to the button

    C / C++ / MFC question c++ help

  • How to compile a file using unicode charset
    M Madhu Nair 0

    /D "_UNICODE" /D "UNICODE"

    C / C++ / MFC c++ help tutorial 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