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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
C

cppcook

@cppcook
About
Posts
14
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Serial Communication with a Garmin Device
    C cppcook

    hey man, why do you want to do this? Garmin products have features other than navigation? btw, I have a garmin streetpilot i5 and it works very well.:)

    C / C++ / MFC help c++ sharepoint tutorial

  • Edit Box alignment problem
    C cppcook

    Yes. The text file has newline characters in it. The edit box will jump to a new line after a limited length of characters even if it doesn't meet a CR or LF character. While this is not what I want. thanks anyway. gavin

    C / C++ / MFC help question

  • Problem with the pow( ) function [modified]
    C cppcook

    If you couldn't figure out the problem, why don't you write your own pow() function? It's simple...

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

  • Edit Box alignment problem
    C cppcook

    Thanks David, I checked all the four scroll properties, Horizontal scroll, Auto Hscroll, Vertical Scroll, Auto Vscroll. But it didn't help. Gavin

    C / C++ / MFC help question

  • Edit Box alignment problem
    C cppcook

    Hi everyone, I have an Edit box in a dialog with multiline property and four scroll bar properties checked. A text file is read into the edit box. The file is tab spaced structured data file (40 rows, but with thousands of columns). The problem is the edit box will break the row in the original file into several rows and display it. This makes the data looks unstructured and disordered. I know this is because the row is too long so the Edit box wraps words automatically. But can we avoid this? thanks, gavin

    C / C++ / MFC help question

  • Passing data between tabs in a tab control [modified]
    C cppcook

    Thanks WhiteSky, No special reason. I just want to use an overrided function of CDialog class because I don't know which child dialog class is run at run time.

    C / C++ / MFC help question tutorial announcement

  • Passing data between tabs in a tab control [modified]
    C cppcook

    thanks eusto, Yes. I know I shouldn't use OnInitDialog(). I am just wondering which message or function of CDialog Class should I use. I couldn't find the OnDisplay event in Class Wizard. which one of the following should I use? WM_PAINT WM_DRAWITEM WM_COPYDATA WM_CAPTURECHANGE thanks, Gavin

    C / C++ / MFC help question tutorial announcement

  • Passing data between tabs in a tab control [modified]
    C cppcook

    Hi all, I have a tab control in a dialog. There are 5 tabs in total, with each tab associated with a child dialog. I wanna exchange information between these tabs. I store and update all information in a global structure. When I switch between these tabs, I want to update data in these tabs. How can I do that? Currently I am using: CMyTabCtrl::OnSelchange(NMHDR* pNMHDR, LRESULT* pResult) { int nSel = GetCurSel(); if(m_Dialog[nSel]->m_hWnd) m_Dialog[nSel]->ShowWindow(SW_HIDE); //hide window ............ //hide all tabs and show the selected tab for(int nCount=0; nCount < m_nPageCount; nCount++){ m_Dialog[nCount]->SetWindowPos(&wndTop, l_rectClient.left,l_rectClient.top,l_rectClient.Width(),l_rectClient.Height(),SWP_HIDEWINDOW); } m_Dialog[nSel]->SetWindowPos(&wndTop,l_rectClient.left,l_rectClient.top,l_rectClient.Width(),l_rectClient.Height(),SWP_SHOWWINDOW); m_Dialog[nSel]->ShowWindow(SW_SHOW); //show selected tab **m_Dialog[nSel]->OnInitDialog();** //update information for each dialog } I placed all updating code in each child dialog's OnInitDialog() function. The problem is this function will be called twice so some controls like ListView have double items. How to fix this problem? Do I need to use SendMessage(), PostMessage()? thanks, Gavin

    C / C++ / MFC help question tutorial announcement

  • any Idea for a Project?
    C cppcook

    Agree. A better idea is to find a project and finish it. Like design a simple calculator?

    C / C++ / MFC c++ question code-review

  • Problems of Updating contents in an Edit box in vc6
    C cppcook

    Thanks a lot Zac and David!

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

  • Problems of Updating contents in an Edit box in vc6
    C cppcook

    Hi all, I am writing a VC++6.0 application. I need to read from a text file and display the file content in an Edit Box. I use the following codes: CEdit m_fileContent; CFile pFile; m_fileContent.SetWindowText(""); //clear pFile.open(.....); int length = pFile.GetLength(); CString* strContent = new CString(""); pFile.Read(strContent->GetBuffer(0),length); m_fileContent.SetWindowText(strContent->GetBuffer(0)); //update file content strContent->ReleaseBuffer(0); delete strContent; pFile.Close(); Now the problem is: When I first opened a file, it's fine. But When I opened a second file, if the length of the first file is longer than that of the second file, the content is not cleared. Any ideas? thanks, Gavin

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

  • How to pass data to scanf() without entering in the console?
    C cppcook

    Thanks Jun and led. Best, Gavin

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

  • Static unsigned int
    C cppcook

    The key here is 'static'. It tells system to allocate memory for the static variable in heap, rather than stack. So the value of the variable can be retrieved globally.

    C / C++ / MFC algorithms

  • How to pass data to scanf() without entering in the console?
    C cppcook

    Hi Everybody, I need to run a command driven program in a MFC application. Then I include "WinExec("commandprogram param1 param2",SW_HIDE)" in the MFC application. The problem is the command driven program has a scanf() function, but I know the value needs to be entered and I don't want to input the value manually again. How can I pass the value to scanf() without inputing any value in the keyboard? I don't want to rewrite the function in the command driven program. Thank you very much. Gavin

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

  • Don't have an account? Register

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