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
K

KRowe

@KRowe
About
Posts
10
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Registering a file type
    K KRowe

    I'm not exactly sure what you are trying to say. If you are trying to say that technically MFC is C++ then yes you are correct but the MFC library is I think about 1.5 megs that I really have no use for until this little problem. So by straight C++ I meant C++ without additional huge libraries (I know that my includes add some extra baggage but it is still far less than MFC and I'm trying to minimize them as well). I guess that does sound a little too much like the common term "straight C" that is used to differentiate C from C++ but that is not what I meant. I would have to argue with you about weather MFC would have made it much easier to do what I am doing however. All my program does is read a file and output it to the screen with some additional formating that requires me to output a single character at a time. This make the CString class almost useless for this. Additionally, I have no controls and only 2 very simple dialogs in the app (plus a Common Dialog). I guess it's what you're used to but, aside from the CString class and couple other handy features, MFC seems to be more of a hastle than it is worth. I can't tell you how much time I have spent trying to get MFC to not do something or other. True, it is the way to go for medium to very large apps, but for the smaller stuff (like my little text viewer) I prefer not to use it.

    C / C++ / MFC tutorial

  • ? about wav files
    K KRowe

    My guess is that you are wanting to create an alogrithm that creates a wav file. This will be MUCH harder than making a standard recording due to the number patterns you will need to make in order to get the sound you want. In fact this would be a guessing game that may never produce the intended results. But to answer your question you will first need to create a program that creates the correct file structure. Here is a link to a place that describes this: http://www.daubnet.com/formats/RIFF.html Wav files are just a form of riff files (which were originally called iff files and were made by electronics arts for video games). For the ID section you will want to put "wav " and the data will consist of pairs of signed bytes. The byte pairs correspond to the push and pull that the speaker magnet will produce when the file is played. Good luck :)

    C / C++ / MFC question

  • Registering a file type
    K KRowe

    Now that I think about it...I guess there is nothing wrong with that. It will work fairly nicely like that. I was wanting to give a more descriptive message but that should be good enough. The registry API looks like it is a huge hassle to work with IMO so I am trying to avoid it or find it already encapsulated. I have found a few MFC classes but apparently nobody uses straight C++ for Windows programming anymore. Ohh well, thanks for the help.

    C / C++ / MFC tutorial

  • Registering a file type
    K KRowe

    Sorry, I am not using MFC. My intention is to make the app as small as possible and a single file. I suppose I would be able to output this to a temp file then run some command to merge it into the registry. Do you know how I would go about merging it into the registry without the messagebox that says "Are you sure you want to add this to the registry?" appearing?

    C / C++ / MFC tutorial

  • How to read a character at a time from file??
    K KRowe

    look in the help for getch(); you will need to include stdio.h.

    C / C++ / MFC c++ csharp data-structures help tutorial

  • Downloader and Install files from the WEB (Like the Windows Updates)
    K KRowe

    I would suggest that you abandon the idea of doing it from your browser (the way that win update does). Just a few of the reasons that this is a bad idea are: * Most network admins have disabled installation of the applet you would need for this. * In order for the applet to install securely you would need to purchase a certificate from a certificate authority (a fairly expensive proposition considering the alternative is free) * C++ is completely incapable of doing this unless you develop it using a plug-in (which is a very difficult way of doing such a simple thing). C# and Java are both too limited when ran as applets to make the possibly needed registry changes. * Even if you got past all of this, it is still far more inconvienent for the user to go find your download section of the website than it is for them to select an option in the menu of the prog they are already using. * An application can be setup to automaticaly check for newer versions without the user needing to bother with it. The better way to handle this problem is by using either C# or C++ to write a seperate app that simply downloads the files into the correct directories and makes any registry changes needed. This application will follow this basic program flow: 1. Check FTP server for newer version of the installation file. A good way to do this is to use a specific file naming convention and comparing that to a set of variables in the main app (in .NET apps this is already availible through the App object). These can be sent to the updater app via the command line, DDE or OLE (whatever you are most comfortable with). 2. If newer file is found, then download. 3. After download completes close any running instances of the main app and run the install app you just downloaded. If you don't want the user to see an installation wizard each update...you could make your own installation routines that does the same things as an instalation wizard but this will be more difficult for you and only save the user a few occasional clicks. Technically, you should have it first uninstall the old version before installing the new but if you don't do that, it shouldn't cause too many problems as long as you don't register the prog each update. Depending on which installer you are using their should be some way to set that.

    C / C++ / MFC csharp c++ sales tutorial

  • Registering a file type
    K KRowe

    I am writing a simple NFO file viewer and I need additional information on how to create the file association. Does anyone know any good tutorials on this. Additionally, since the NFO file type is set for the MSInfo application by default in Win it may have special considerations. Any information about additional concerns I should have would also be useful.

    C / C++ / MFC tutorial

  • A executable file which has compiled, How to insert it into IE?
    K KRowe

    To do that you would need to create a plug-in for each browser that you would like to support. This is not a small task. Unless you absolutely need a plug-in (which isn't very likely) I would recommend making an applet. If you really want to make a plug-in for IE try this link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch\_webdev.asp If you want to play music from a browser you can do that with an applet. In fact their are some already made that are very customizable and easy to use and free that may give you an idea of what is possible with an applet as far as Javas' audio capability. Here is a link to one that I use on one of my sites: http://www.freedomaudio.com/

    C / C++ / MFC help tutorial question

  • Some help of how i can send files remotely in network.
    K KRowe

    This is actually impossible. Net cards (or any other piece of hardware) do not have the ability to create files (yes drives can make files but this is actually because the OS tells them how to). Fortunately any OS that is capable of networking also includes programs to convert data sent over the network into files (this is called an abstraction layer) that makes it as simple to do as saving any other file. This means that to save a file in a shared network directory all you need to do is save it to a network path. The source directory must have read permissions and the destination directory must have write permissions and be shared on the network as such. Different OSes have different ways to set these options. After you have the permissions setup you can use any file operation you want to do this. For example, to copy the file C:\dat.txt to //sysb/inc/dat.txt you could use the API function CopyFile like so: CopyFile("c:\dat.txt", "//sysB/inc/dat.txt", FALSE); sysb would be the name of the other computer and inc would be the shared directory.

    C / C++ / MFC sysadmin security help

  • A executable file which has compiled, How to insert it into IE?
    K KRowe

    I believe your asking how to run an true exe (machine code) inside a browser. This is impossible for two reasons: A) Browsers are not OSes they only display the contents of HTML pages and a few other formats. Additionally, a browser is not going to translate your code into code compatible with the visitors system. B) Some plug-ins and scripts do allow for functionality similar to a program but they are intentionally made restrictive so that web authors cannot attack web surfers with malicious programs. That being said, their are ways to write programs for browsers that are not true machine code. The most popular by far is Java code. This can be done through what are called Java Applets. The limitation to this is that each user will need to install your applet and accept it through a dialog that pops up when they go to your page if it contains code that could possibly harm the users computer. For a detailed explaination check out this site: http://java.sun.com/sfaq/

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