yes, that works when you know the name of the control.
I apologise if the question wasn't clear. (blame it on my english, not me )
But suppose, i want to use the code for every dialog.
So i need to know the names of the controls dynamicaly.
And get all captions (GetWindowText()) of all static controls.
well, i needed to get the WindowText of some controls. You can assign a member variable to it.
But the idea was not to do anything special, but just getting some kind of collection of all resources in the form. Then i would get that collection, check the type of resource (button, ...)
Why do i want to achieve this:
The program runs in about 3 languages. For easy translation, i want to be able to get all 3 translations of the text that is on the button for example.
Of course, i can type it over .. but because i'm a bit lazy it's alot of work.
I thought it would be easier to programmicaly do this.
I need to implement a chart control (from custom control) that will display real time data (I receive a point every 13 msec), in a normal line mode (e.g. something like an oscilloscope).
But I'm really really new to "graphical programmation". I found some examples here and I based my work on them (using memory bitmap we draw in, then "push" it to the display). I draw just once the "background" of the object (axes, grid, ...) on a bitmap and when I need to plot a new point, I add it to the bitmap.
I was wondering if this method will support high speed ?? If not, what can I do for it ?? A better solution is perhaps to invalidate just the region from the old point to the new point ??
Just a last thing to say: I program in embedded visual C++ (so for Pocket PC, ...) but I posted my question here cause the language is almost the same (some functions are not in embedded) and there's much more people oon this forum ! So, that's also a reasoon why I want to do it myself: I didn't found any chart that fits my needs!
All suggestions are welcome (as I said before, I'm newbie in this domain).
For my application i used the CGraph Class from Brian Converey (http://home.attbi.com/~bconvery3/dev/cgraph4.html). But I must modified it for draw real time data. I can send you my changed code. Send me an email.
I am accessing Files, folders, drives over network. Through SHBrowseForFolder I get the path over network. The problem arises when I check the path for validity with CFileFind.
Assume that there is a pc with name PCabc over the network, and it has a folder in one of it's drive with name FOLDER1, which is sharable, with the same name.
The path I recieve is \\PCabc\FOLDER1, Now when I pass it through CFileFind::FindFile() and CFileFind::FindNextFile(), the path is rejected. However if I take a folder say SUBFOLDER1 in the share FOLDER1 (which is also the exact name of the folder), I get no problem, ie, the path \\PCabc\FOLDER1\SUBFOLDER1 gives me no errors. It is accepted by CFileFind.
Can you suggest me what should I do to get the path for the shares which will be accepted by CFileFind.
1) Expose the SQL server to the internet and connect via the IPAddress as usual (Security NIGHTMARE)
2) Use RemoteDataAccess (requires IIS server and code changes)
3) Write your own Web server service that will authenticate the client and pass the SQL Statements on to the database behind the firewall.
I guess this question will be easy for the windows expert on the CP, but I'm stuck with it.
Basically I enumerated all the processes on the system with PSAPI.dll's EnumProcesses.
Now from each process's HANDLE, I'd like to get a handle to its main window's HWND, in order to send messages using SendMessage.
How can I do that?
I'm pretty new to multimedia programming, have a task here that need expert guidance from you all .
What I'm trying to do is to embed a mpeg 4 player into a MFC program I'm doing.
I'm pretty lost as to how to get started, I've read that DirectX is pretty useful for multimedia application in VC++. Should I focus on DirectX? Does it support Mpeg 4?
bankman wrote: Should I focus on DirectX? Does it support Mpeg 4?
Probably not and No. I would do a search for ActiveX controls that serve that purpose. There are a couple of direct show media applications that will play your format provided you install a mpeg4 codec. A quick search on the internet and I found one at http://ffmpeg.sourceforge.net/[^]
yes, i'm agreed the above's suggestion, but here
i'll give you suggestion that you should learn the
skills and technologies that were existed from current
all around world resources, so we all shoule learn 'get something'
behaviour to build our other more important projections,
these are bricks!!
Use GetSel to retrieve the caracter number.
Make a loop on LineFromChar with parameter the character number, which you decrement until LineFromChar changes.
Then, the first number minus the final one should give you the pos.
i=(i<j?i:j); //our start point (this gets the current char index)
longint counter=m_RichEditCtrl.LineFromChar(-1); // gets the line
while(m_RichEditCtrl.LineFromChar(i)==counter) // reverse parse until line changes
longint pos=counter-i; // that's your pos.
Got used that Microsoft Word underlines the errors in red?
Nice isn't it?
Well, when editing my C programs, the editor didn't do that. What a bore.
So, I decided to add that feature to the editor. It is very simple:
After some period of time has elapsed since the last key was pressed, save the text in a temporary file, and call the compiler to compile that file. Save the output of the compiler and parse it.
Do messages like "undefined symbol "xxx" appear?
If yes, store the line and position of the offending symbol, and when that line is displayed in the editor, underline the symbol with red.
Want to see it in action?
Download the editor with the associated compiler (no charge, no registration, no questionnaire to fill, no popups) from:
It is a nice feature, that doesn't hide the fact that it is not Visual Studio of course. Maybe because of its small size this algorithm is at all doable. The compiler is small and very fast. So fast that can be used as a background compiler, running most of the time behind you when you type.
Is C outmoded?
Yes, of course. C will be always outmoded because it is not fashionable. As languages come and go away, C remains. If you write in C there is a bigger chance that your code will run in the unknown machines of the future.
You probably know C. It has be cloned a thousand times, in all tones, even in the C Sharp scale.
The whole download is 3.5 MB. And there is packed a system with all the headers and import libs to use the full Win32 API. The editor, including the debugger, the project generation facility, a versioning system, a software metrics module, an object code analyzer, etc, is 700K.
Including a spell checker for C.
I noticed that the latest versions of Visual Studio show the current function at the top right corner of the window. Lcc-win32 has been offering this since 1999 but it shows it at the bottom right corner.
But this is publicity, and is therefore biased. Look for yourself, and tell me if you like it.
If you want to provide a tool, write an article and post it under the "Free Tools" section. This forum is for asking questions.
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
Yes. As the above poster suggested, please write an article and post it in the free tools section. That way your article will get seen by more users. A post in a forum will only be good for a few days because no one will scroll ahead more than a few pages of posts.
I want to add the flexibility to my application to allow the user to write and use custom functions within the application. The functions would be added to a library. I don't want to write an interpreter. One thought I had was to let the user write C functions and write them to a dll source file, then my application could shellexecute a compiler and linker to generate the dll. The application could then turn around and call the dll function. All of this would be transparent to the user.
Now for the question. Can the VS C command line compiler and linker be shipped with my app?...I think I already know the answer, it would have to be licensed.
Is there a suitable free-ware compiler and linker that I could use?
Is there another way to skin this cat?...I don't want to try a VBA interface, but that might accomondate the largest audience.
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
The lcc-win32 compiler system does just that. Many people use it exactly for that. Their users type a function, then it is compiled to a dll and loaded into the system.
Lcc-win32 has also the possibility of loading an object file "on the fly", not a Dll. This eliminates a lengthy link step, and links the code "live" to the system. But that algorithm has other drawbacks. The dll way is more portable and is not so much longer to perform.
The interesting thing is that your users will say they want to debug their functions. The lcc-win32 system features a debugger too.
No, the VC compiler cannot be shipped with your product, unless you bundle in a copy (license) of VC.
A few options include:
1) gcc compilers (free)
3) embed your own macro language (I have done this in the past and you will want to avoid this if at all possible!)
4) programmatically post the user-entered code to a service on your web site, compile it and return the DLL as the result (or error page)
Neville Franks wrote: Can't say I much like the idea of "end-users" running compilers etc. unless they are technically competant, and even then this doesn't sound right
I would be interested in your reasons why. The app would take care of setting the proper compiler and linker switches and report any errors generated by either. how is this functionally different than running an interpreter? I am not arguing with you, I never miss an opportunity to learn new things.
Neville Franks wrote: Have a look at UnderC
Thanks for the link...looks interesting, but I am worried about speed. my program, among other things is doing rather large monte carlo dispersions. I have the same concern about the scripting host
Thanks for your reply
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
Gary Kirkham wrote: I would be interested in your reasons why. The app would take care of setting the proper compiler and linker switches and report any errors generated by either.
It seems like a lot of extra baggage and effort to distribute compilers and linkers. And potentially more difficult for the end user. Interpreters offer several advantages, one being there is no edit, compile, link, run cycle.
Interpreted code can also typically access all functions in your app. Conpiled code in DLL couldn't easilly do that.
Gary Kirkham wrote: but I am worried about speed. my program, among other things is doing rather large monte carlo dispersions. I have the same concern about the scripting host
Scripted code is typically used for UI stuff, not CPU intensive operations. It can always call compiled code to perform such tasks.
A large part of ED (see sig) is written in its C Extension Language. This is compiled into virtual machine code which is interpreted at run time. The compiler is called on demand whenever a source file is edited, so the user doesn't even know about having to run a compiler. The Under C code is a pure interpreter with no separate compile phase that the user sees.
I think you need a clear idea of the functionality you want to provide, and how that can interact with your application code and then work out what will work for you.
To whom it may concern,
I know people dont like to help out students. But I am a student and I the reason I am coming here to ask my question is not because I'm lazy, but because I dont know where to go to get the right information. For school, I was asked to write a database management system in C++, or in any other language of choice. I was wondering if anybody could tell me in what language it would be easier to write such system. And if so, how I could start, and if there is a helpful library that I could use to help myself, because I dont want to have to reinvent the wheel either! I would like some helpful information that helps me out to start out. Thanks everyone!!;P
Ps. can anyone else give me ideas as to how to start. And... by reinventing the wheel, I mean, whether I have to design a way to store my records in arrays or something...
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving her *c.* and Deb scoffing chocolates in the corner.
I guess I dont understand what you meant by "reinvent the wheel". The whole exercise of writing DBMS is actually to do it from scratch so students will know the hurdles of writing good DBMS. Anyway, I believe C++ is good for you especially in doing DBMS, especially it will reinforce the OO programming that, believe me, you will actually use at workplace; at least in my company we do. If you want speed over good OO design, you can always go with C. To parse SQL, unfortunately you'll have to do C (using yacc and bison). The core engine can still be in C++ though. If you dont want to use SQL, you can always go with procedural calls too. I did a simple DBMS system with SQL interface for my last semester project using C++, group of 2. It wasnt that hard at all, kinda fun actually. Just go slowly but surely; dont expect you'll get Oracle out of it. Good luck!
Generally speaking the number of bytes that a particular type uses can vary depending on the platform and the language. Some languages, like Java, define the size of specific types.
If you want to evaluate the number of bytes something is using then I suggest trying the sizeof[^] operator in C. Do a search on sizeof and you will find references for other languages such as the .NET framework.
"The money power of the country will endeavor to prolong its rule by preying upon the prejudices of the people until all wealth is concentrated in a few hands and the Republic destroyed."
-- Abraham Lincoln
Of course you can output audio that's different from what you get from audio in. However, to "playback something that is different from the input [to line in]" seems impossible unless you're willing to bring out the soldering iron.
Yes, just about every sound device these days support simultaneous record and playback.
There are two things:
1. You might have to record and playback at the same rate. Probably not, but best to play safe.
2. On the mixer control panel, make sure on the output mixer you disable 'Line in' or that will get mixed into the output.
I linked a file type with my program, such that if you double click on a file in explorer, it opens the file using my program. The only problem is if there's an instance of the program already open I want that instance to open the file rather than starting a new instance. (for example, if you double click a .doc file, you do not want start a new Word session if one is already open. Instead you want the existing word session to open the document).
We use the sinstance evrsion here at work. With a mod to the MMF structure such that if another instance starts up, it can copy the command line across into the object, send a registered message across to the other instance to tell it to open it and then kill itself. Works very well, just need to be careful about access to the MMF object. Need to avoid those race conditions, as you can open multiple docs at once in explorer.
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
Last Visit: 31-Dec-99 18:00 Last Update: 25-Aug-16 10:36