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
D

David Fedolfi

@David Fedolfi
About
Posts
38
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Internet Reversi - I wanna win!
    D David Fedolfi

    Check out http://games.yahoo.com/games/strategy/reversi/rsbasics.html?page=rv its far from complete, but does provide some good basic strategy.

    The Lounge c++ game-dev question

  • Here they come again...
    D David Fedolfi

    Tom Archer wrote: By the way, what's wrong with #3 You should have been gone before she work up :)

    The Lounge csharp html database com tools

  • xbox? good or bad?
    D David Fedolfi

    Stefan_ Spenz wrote: and this will raise QA costs Not really. You're dealing with a fixed system here. You don't need to worry about the end user having some weird video or sound card or that they won't have the latest drivers. You can test your code on one system and pretty much be assured that it will work for every user.

    The Lounge question discussion

  • MFC:: CString & Serialize ::C++
    D David Fedolfi

    kuphryn wrote: is it perferrable to use CString over C++ STL (string, vector, list, etc.) That depends on the rest of the application. If the only part of MFC you're using is going to be CString, then its a lot of extra ovehead to carry. kuphryn wrote: Is it possible to have view draw character from a string object instead of a CString object? Yes kuphryn wrote: Does the STL container have to transfer data to a CString object first? No, just the oppsoite. If you're using the stl implementation that ships with VC then there is an overloaded << operator that converts the string to a LPCSTR. If you're like me and using a different STL implementation, then you'll need to write your own or manually cast the CString to a LPCSTR kuphryn wrote: is it a necessity to change from '0' to NULL, bool to BOOL, true to TRUE from 0 to NULL - no, but bool and BOOL are different data types. They both mena the same, but a BOOL is just a typedef for an unsigned char (I think) The opinions expressed in this post are the sole property of the writer and therefore are not guaranteed to contain any accurate statements, nor are they guaranteed to be worth the time you spent reading it.

    C / C++ / MFC c++ learning asp-net graphics design

  • Figuring out DLL APIs...
    D David Fedolfi

    Daniel Desormeaux wrote: Other than attempting to contact the author (which I've already done, I'm still waiting for a reply) how could I go about trying to figure out the interface to those exported functions? Did you consider posting some details about the DLL you are trying to use? Maye someone else here uses it and has already figured it out.

    The Lounge question csharp c++ visual-studio

  • Figuring out DLL APIs...
    D David Fedolfi

    Daniel Desormeaux wrote: it's comments like these that discourage me from trying to get help from forums. Did you ever think that reactions like these discourage people from providing help in forums?

    The Lounge question csharp c++ visual-studio

  • Noah, One Continent and about a Billion Years Too Short
    D David Fedolfi

    You need to keep in mind that these passages were written by people who probably never traveled out of their region of the world. When that region flooded, it was their whole world that was being destroyed.

    The Lounge question

  • Antrax: Maybe someone will be pissed off becoase of this post, but...
    D David Fedolfi

    The problem here is that, as a "superpower" a country has a certain obligation to try to maintain peace. If we didn't then we would receive criticism from the world for not stepping up to the plate and helping our friends and allies in their time of need. Granted, our motives in the Gulf War were affected by money - not just the oil reserves in the region, but also the boost it provided to our economy (was is good business). But that is not entirely the case. World war II started with Germany invading and conquering a single country, much like Iraq did here. Now, if the world had organized and stood up to the Nazis then, how many millions of lives would have been saved? The expression "nip it in the bud" comes to mind. Granted, Iraq may not have had the resources to start a world war, but if they had been allowed to continue what woudl have happened? What would have been next? Where would the world be today if all major oil reserves were in the hands of one nation? Maybe you're right. Maybe America should mind ts own business. Hell, let's kick out all foreign embassies, make the UN move, close our borders to all foreign people and goods, bring all of our troops back for homeland defense and border patrol, kick out all illegal immigrants, install the Star-wars defnese system (or whatever they're calling it now) and let the rest of the world do whatever the hell it wants. But what would you be saying about us then? And how will you feel when a foreign country invades yours and we don't go there to save you?

    The Lounge question help discussion

  • passing formatted string as argument???
    D David Fedolfi

    try something like: void findV (LPCSTR szFormat, int nLevel,...) { va_list argList; va_start(arglist, nLevel); CString str; str.FormatV (szFormat, argList); va_end(argList); find(str, nLevel); } you can then do for (int x =0; x<3; x++) { findV("%d=", nLevel, x); } The nLevel in there makes it kind of odd. If this is an out parameter you might want to change it to a return value.

    C / C++ / MFC help question

  • simple for statement can't work!
    D David Fedolfi

    Remove the semi-colon from the end of the for statement.

    C / C++ / MFC question

  • Way to deter flamers
    D David Fedolfi

    I was thinking the same thing. Appoint a group of firefighters that have the right to flag any posting as a flame. The little note icon to the left of the subject is currently displaying one of two states indicating a registered or unregistered user. Add in a third state indicating that this is a flame message. The posts are still there to be read, but you can tell quickly that it is a flame and don't need to bother reading it. Moderated boards always run the risk of having a "bad" moderator who simply deleted messages that disagree with his/her opinion or prove him/her wrong. Doing things this way keep the messages around, and simply flag them.

    The Lounge help question learning

  • printing data inside of a listbox
    D David Fedolfi

    hmmm...well, let's take a look in the Combo & Listbox section where we find: CPrintPreviewListBox A listbox derived class that allows printing and print preview in SDI and MDI applications Sounds like what you're looking for to me. ;)

    C / C++ / MFC question

  • Controls...
    D David Fedolfi

    Check out http://codeguru.earthweb.com/listview/change_row_height.shtml

    C / C++ / MFC question

  • Chris: No more Anonymous Posting!
    D David Fedolfi

    Also, keep in mind that die hard flamers will consider prevention schemes to be a challenge. The more schemes you put in place, the harder it will be to flame, and the more "pride" they'll get from doing it.

    The Lounge com question

  • How to communication between Windows and DOS ?
    D David Fedolfi

    Well...what protocols did you configure on your LAN, because how they communicate greatly depends on what protocols are available.

    C / C++ / MFC help tutorial question

  • Converting integers from array to integer variables
    D David Fedolfi

    Well, this is not efficient, but shoudl serve as a starting point for you: long lResult = 0; int nMult; for (int x = 0; x< nNum; x++) { nMult = 1; while (nMult <= nArray[x]) nMult *= 10; lResult *= nMult; lResult += nArray[x]; } Note though that if your array has any significant size then you will overflow the integer you're trying ot store it into.

    C / C++ / MFC question data-structures

  • ListBox??
    D David Fedolfi

    "Dosn't GetLbText belong to a combo box??" Yeah it does...and didn't I say that that post was written before morning coffee?:) And besides...what do you expect from free advice? Make that m_Games.GetText(m_Games.GetCurSel()) and it shoudl work better.

    C / C++ / MFC help tutorial question

  • database structure to XML
    D David Fedolfi

    check out http://www.codeproject.com/useritems/xmlize.asp

    C / C++ / MFC database xml help question

  • ListBox??
    D David Fedolfi

    You want it to be: void CMenuDlg::StartGame() { if (m_Games.GetLbText(m_Games.GetCurSel()) == "Tribes") { //Do Somthing } } There ia an aletrnative (and possible easier approach). Since you are obviously using this as an application launcher, you coudl store the command line you are executing as m_Games's Item data. Something like teh following; m_Games.SetItemData(m_Games.InsertItem("Tribes"), DWORD("c:\\program files\\tribes\\tribes.exe")); then your start game function woudl look like: CString strCommand = LPCSTR(m_Games.GetItemData(m_Games.GetCurSel())); then call ShellExecute (or whatever you're using to launch the application) with strCommand. Note - this post made before morning coffee and ius therefore subject to containing countless errors and typos.

    C / C++ / MFC help tutorial question

  • What is a bit mask and when it is used??
    D David Fedolfi

    bitmasking lets you use an unsigned datatype as a collection of flags. If you use an int then you get 32 flags that you can set. To set any of the flags you would use var |= FlagToSet and to check if a flag (single bit) is set you would if (var & FlagToCheck) which will check on a bit by bit basis and return the result. If the bit(s) specified in FlagToCheck are not set in var then the result will be 0. If any of the flags are set then it will be nonzero (actual result based on which bits are set).

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