What do I have to do to "link" the scroll bar for one edit box to another so that when I move the slider in box A up and down, the slider in box B follows????? Thank you in advance PieRRe
pblais
Posts
-
Linking scroll bars????? -
what kind of search is recommended???Welllllllllll I got side-tracked and now I am finally getting back to this. I was able to use a kind-of brute force recursive search. Using my example, it goes through and finds ABG5. I have also figured out a way to keep track of that. My question now is, how can I have it remember to go back and continue searching from ABxx to find ABN4 and eventually BFT9? Thanks in advance Pierre
-
what kind of search is recommended???Exactly what I am looking for... Something that "finds" filenames YESSSSSSSSSS
-
what kind of search is recommended???WalderMort wrote:
Sounds to me like a binary tree would do what you want. Once you have found the first node, starting with the letter "A", use that node then to find the next highest, either "B" or "AD".
The more I look at this the more I am no so sure that this is a binary-tree search. A binary-tree search implies that the tree exists and you are searching through it. In my application, I don't think the tree exists. I am creating it right????
-
what kind of search is recommended???I have to do what, seems to me, is a binary search. I have different hardware modules "out on the buss" each with its own unique 17 character ascii serial number. Initially, I don't know each's serial number and until I do, I can't communicate with them. I am going to scale down my example to 3 modules each with a 4 character wide alphanumeric (in real life each character can be any of the printable ascii characters)serial number. Here would be the 3 units and their serial numbers.. Module # Serial # 1 ABG5 2 ABN4 3 BFT9 The way the hardware and software interface works is like this. If I ask for any serial number starting with 'A', I will get a reply.. But I don't know how many yet. If I ask for any serial number starting with 'B', the same holds true. If I ask for any serial number starting with any other character other than 'A' or 'B', I don't get "a hit". Now, I can eliminate any serial numbers that don't start with the letters 'A' or 'B' Now, I ask for serial numbers starting with 'AA' through 'AZ...A9' and get "hits" for 'AB' only. I also run through any serial numbers starting with 'BA' through 'BZ...B9' and get one "hit" for 'BF' This time, I eliminate anything that doesn't start with 'AB' or 'BF' Each time I get "a hit" I don't know how many. Until I "drill" my way down through all four characters. At some point I will have only "one hit" for each of the serial numbers. Nowwwwwwwwwwwwwwwwwwwwww.... How can I do this in Visual C++????? As I mentioned above, I think this would be a binary search. But I am having a hard time figuring out how to "keep score" of the "non-hits" so that I don't waste time trying those on future iterations. Keeping in mind that each serial number is 17 characters wide and can be made up of any of the 95 printable ascii characters Are there any code snippets that I can "stitch" together to do this.... Thank you in advance Pierre
-
Callback functions????Thank you very much
-
Callback functions????Can someone explain what "callback functions" are and how they are used? Or, point me to a good "callback functions for Dummies" web-site? Thank you in advance Pierre
-
Accessing an edit box from multiple windows????led mike wrote:
Well the "easy" way is to hire an experienced skilled software developer. You know... someone that has spent years of their life studying the vast expanse of the software development world and therefore knows and understands the fundamental, complex and detailed aspects of it. or you could get the book "Learn C++ in 21 days"
I forgot to mention that I have been successfully writing and testing MFC Dialog type applications for quite a few years now, many with child windows. I have never had a reason for a child window to access any controls from any other windows so it never was an issue. Recently, that situation presented itself. To save time exploring how to do this, I posted here. My mother always said "if you can't say something nice, don't say anything at all". So please keep your condescending attitude to yourself Mike:mad:
-
Accessing an edit box from multiple windows????Thank you very much
-
Accessing an edit box from multiple windows????Thank you very much
-
Accessing an edit box from multiple windows????nope.... I really meant "hoops" I am fairly new to this and was hoping for an easy way to do this Thanks
-
Accessing an edit box from multiple windows????Is it possible to place an Edit Box on a "main window" and access it from a child window without going through all kinds of hoops????? Thanks in advance Pierre
-
Scanning the IEEE or GPIB bussThank you very much.... But, I was looking for something that I can write into my own code
-
Scanning the IEEE or GPIB bussI have written software that talks to various GPIB instruments. Since most of the instruments are Agilent (old HP), I am using their instrument drivers and everything is working just fine. My question is this..... Is there some some software out there that I can use to scan the GPIB buss to see what instruments are actually connected or not? Maybe even something that I can modify to fit my specific needs???? Thanks in advance Pierre
-
Different question....????I don't know if I understand your reply Chris. What would a MIDI sequencer do for me and my non-electronic accoustic piano? I need something similar to an electronic guitar tuner with a built-in microphone. I tried my son's and it worked fine but only in the middle range of the piano where the guitar falls in. As I mentioned previously, I recently found some free software on the internet that you can plug a guitar (or microphone) into the sound card of your computer and tune that way. That software had two problems. 1) It was designed for guitars so it had the same issue as my son's electonic tuner. 2) It was the executable only so I couldn't modify it to extend its range over the entire 88 keys of the piano. Regards Pierre
-
Different question....????I am looking for software to tune my accoustic piano. I have found free software that does that for guitars but, obviously, doesn't go low enough or high enough in frequencies to do my piano. The same holds true for my son's electronic guitar tuner. If anyone knows of "open source" software (preferably Visual C++ / MFC) that for guitars that I could mofify to extend wide enough to do pianos would be greatly appreciated. If I am able to convert it into a useful application, I will gladly post it here. Thank you in advance Pierre
-
Tired of copy/pasting code.......A long time ago, I needed a way to put information into edit boxes etc. in my MFC dialog applications "on the fly". That is, I didn't want to wait till a function terminated and the particular window was updated/repainted. I wanted to see the data change real time as it was running. I didn't want to use a timer so I came up with the following function.
void DisplayNow(int nID, LPCTSTR lpszString) { CWnd* pDISPLAY_Wnd = GetDlgItem(nID); pDISPLAY_Wnd->SetWindowText(lpszString); pDISPLAY_Wnd->UpdateWindow(); }
where nID is the ID of the edit box etc. that I want to display the data in I overloaded more versions of the same functions for integers, floats etc. I am only showing the version that does strings here. Anyways these functions have allowed me to display data on the fly and I have been quite happy with them for quite some time now. But, anytime I want to use them, I have to copy/paste them into the application's dialog file. At one point, I tried to wrap them in a class and use them that way but the compiler burped hard at that because the handle to the window (pDISPLAY_Wnd) is not known at compile/link time. So I continued copy/pasting. Recently I tried to put all the functions into a file called DisplayNow.cpp and DisplayNow.h hoping that, even though I couldn't make them into a class, this would prevent me from the copy/paste thing. So DisplayNow.cpp looks like this:#include "stdafx.h" #include "DisplayNow.h" void DisplayNow(int nID, LPCTSTR lpszString) { CWnd* pDISPLAY_Wnd = GetDlgItem(nID); pDISPLAY_Wnd->SetWindowText(lpszString); pDISPLAY_Wnd->UpdateWindow(); }
and DisplayNow.h looks like this:void DisplayNow(int nID, LPCTSTR lpszString);
Now, when I try to compile, I get this error: DisplayNow.cpp(6) : error C2660: 'GetDlgItem' : function does not take 1 parameters Am I destined to being forced to copy/paste all these functions into very new application that I create????:( Thank you in advance Pierre -
Sleep() issuesMark Salsbery wrote:
Do you do I/O with the external device you are trying to sync to? If so, is there any way you can use overlapped I/O or soething to make it a bit more event driven instead of trying to fine- tune timeslices of threads?
Yes sometimes. I am writing test software. Sometimes I have to wait for another piece of test equimpmen to go through it's boot up self test and I have no way knowing when it is done. I do know that it takes it approximately 300 mSec. So I put a Sleep(350) in my code to wait for it. I have recently found, on some newer/faster PCs that the application isn't waiting long enough...
-
Sleep() issuesled mike wrote:
Maybe the parameter for the Sleep() call or Timer event should be configurable rather than hard coded?
I like that idea... How would I make configurable?
-
Sleep() issuesMark Salsbery wrote:
So you are saying that new fast processors alter time? milliseconds are milliseconds (I thought).
Everyone likes a wise cracker