No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
NPI Engineer
- Interests
- computers, guitar, drums, French
- PC Specs
- Acer, Centrino Dual, 1.83GHz, 17"
12 Posted Topics
I'm trying to read a com port. I can create it, change the dcb, set the timeouts and see the input buffer using ClearCommError. But I can not read it. When the program hits the ReadFile() statement it never comes back. Here is some of the code: [ICODE] char CMyClass::EIA232_Open(HANDLE* … | |
Re: Tryst, Maybe the string2char() call should include the reference operator & for len: string2char(input, inputArray, &len); | |
Re: Kevin, I have highlighed the problem in red. Move the first buffer = fileread.get() to after you open the file. [code] int Readchar(ifstream& fileread) { char buffer, compare, ch; int count, spacesaved; buffer = '\0'; compare = '\0'; count = 0; compare = '\0'; spacesaved = 0; [COLOR=red] //buffer = … | |
Re: I've had trouble with memset with structures before. So I used calloc instead. [code] cdDB = (CdRecords*) calloc(datasize, sizeof(CdRecords)) [/code] This should set everything to 0. Ancient Dragon might be able to shed some light on this. | |
Re: nabil, You forgot the braces for your while(C!=5) loop. That's where it goes into an infinite loop. | |
Re: Tim, I only time to look at one file. In Sequence.cpp I found this function. I believe this may cause a problem if the index is not valid. [code] SeqItemType Sequence::retrieve(int index) { if ((index < 1) || (index > size())){ // can't delete something that isn't there } ListNode … | |
Re: I think the line of code: [code] for (int j = 6; j < 0; j--) [/code] should be [code] for (int j = 6; j > 0; j--) [/code] | |
I would like to change the font in a static text box. But I want it to be that size until I change it again. I put the following code in the OnInitDialog() function: [code] CWnd* pWndControl = GetDlgItem(IDC_PROGRESS_INDICATOR); pWndControl->MoveWindow(((MyRect.right - MyRect.left)/2) - 100/2, MyRect.top + 100/2, 100, 100, TRUE); … | |
I'm trying to get the coordinates for the client section and the whole window. This is the code, but it gives me the same top, bottom, left and right for both the client and the window. The files are: T1NIU.h T1NIU.cpp T1NIUDlg.h T1NIUDlg.cpp This code is in the T1NIUDlg.cpp [code] … | |
Re: It appears that the program will compile with multiple variables in the return statement. However, all I got back was the last variable. So, with [code] return(d, w, s); [/code] only the "s" was returned. I used Visual Studio 6. | |
I'm trying to put a status bar on a dialog based app. I have the following code in the OnInitDialog(): [code] if (!m_wndStatusBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_BOTTOM) || !m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))) { TRACE0("Failed to create status bar\n"); return -1; // fail to create } else MessageBox("Status bar created", "Debug"); // … |
The End.