Watch out for memory alignment issues if you are going to use these keys (I'm assume they will be crypto keys) with raw memory access. You can change the way the object is laid out in memory with the #pragma pack directive. It may not be a problem though, depends on how you'll use your struct (Actually it would show not so great design if you'd need this, but there may be performance reasons).
roel_
Posts
-
structure questions -
CMFCOutlookBarTabCtrl redrawing issuesSo I'm using the CMFCOutlookBarTabCtrl control from the VC Feature pack. In it, I'm putting a couple of custom controls. Problem is that the controls aren't being redraw properly: after resizing the CMFCOutlookBarTabCtrl, they are white. I have trace messages in my OnPaint I know that that function is called. I watch the messages with Spy++, all goes well. When I put another control in the CMFCOutlookBarTabCtrl it works fine (standard windows control like a button but also for other custom controls). When I show the custom control outside of the CMFCOutlookBarTabCtrl it works fine, too. So it looks like my control is being drawn over after its WM_PAINT handler has been called. Oh, when I put in a WM_MOUSEMOVE handler and do an Invalidate() in there, it works too. Anyone who is still with me after this description and who has an idea on how I could go about debugging this? Thanks.
-
MFC update: how to disable loading pane docking state from registryWorked great, thanks!
-
MFC update: how to disable loading pane docking state from registryI'm playing with the new mfc features from the mfc update. I have a new wizard-generated application. Somehow the state of the docking panes is stored in the registry (I can find it there) but for the life of me i can't figure out where in the code this functionality is implemented or more importantly how to turn it off. Any ideas?
-
Hello, just back from a family trip...I'm going to China next friday on a vacation, I hope it'll cool down a bit before then but I'm not too hopeful :) My girlfriend is already there for business and when she called me yesterday she already warned me about the weather... I'm not going to pack too many sweaters :) Does your family live in Shanghai? I hope they didn't have any troubles with the typhoon?
-
What to get Bill for XmasYou can get him what you can always get for everybody who already has everything: a box of aspirin.
-
Localizing an applicationYes, especially now that the 'Translator editions' can be given to translators for free (if I understood the newletter a while ago correctly, it's been a while). Last time I just got an excel sheet with strings and I had to manually copy and paste them into the resouces of a resource dll. Of course the translators weren't given a list of strings to translate, just the application itself, so they had to chase through the application looking for strings, which meant that a) they missed half of them, and b) the 'keys' they used in the excel sheet with translations were abbreviated (they didn't use the exact terms that were used in the application) so I couldn't grep through the rc files to see which string corresponded to what translation. Now, if you have a slightly more organized development process, you may not encounter these problems :), but still I find it a pain to have to manage even just 2 resource dlls: they're always in the solution and so take time when compiling, loading etc, you have to be careful to keep the resource ids in all dlls synchronized, you have to check manually whether all changes in the one dll are applied to the other one, ... I guess it would be possible to write your own, but it would take a long time to have a nice dialog editor etc. (for just string translations a simple database is enough, but translating is _hard_, there are always situations you didn't think about).
-
Localizing an applicationDepends on how you define 'used' ;) I evaluated it for one of our projects and translated most of the interface, as a 'proof of concept', but in the end we ended up not using it after all (the main selling point was that it would be easy to support more than 2 languages but the project ended needing only 2). So I've 'used' it in that I've spend a couple of hours in it, but it's not part of our development process.
-
Localizing an applicationThe 'hand someone an .rc file' approach is flawed, have a look at Apptranslator which is a really cool application to translate resource dll's. It has an embedded dialog editor so translators can resize labels as necessary and contains a lot of functionality for translating. Won't work for .Net apps though, AFAIK.
-
Custom software developmentYeah well one last suggestion - don't be shy when asking money! I know of a case (years ago) where my company developed something for another company, it was only a couple of hours of work so they (I wasn't with the company at the time) charged only a couple of hundreds of guilders (it was before euros existed, the equivalent of 100 or 200 euros.). After all was said and done, the guy from the other company said 'if you would have charged 50 000 we'd have paid it too - the whole company is based on this piece of software'. So yeah, estimate how bad they need it, in what sector they're in (eg finance sector have tons of money, they don't think twice about spending 50 000 euros) and make sure to get your contract real tight - a couple of hundreds of euros for a lawyer to look through your contract can save you thousands or tens of thousands in the future.
-
Custom software developmentDario Solera wrote:
How much could I ask them? (someone told me at least 7-800 Euros)
Well that obviously depends on how it would take you to write the software and how much potential you see in selling it to other customers later. For 800 euros (something like $1000 for you US-ians out there), you could write no more than a small utility, probably - in my line of work, 800 euros would be 1 day worth of work. On the other hand, let's say it would take you 10 days to write the software, and you ask them 5 * 800 euros (let's keep 800 euros as day price), you'll need to find a way to make the other 5 * 800 euros. If you see potential in selling the same application 10 times at 500 euros each, you're better off offering it low to the current customer, retain IP rights and sell it to other customers.
Dario Solera wrote:
- Is it fair to sell the same application to other customers, supposing they allow me to?
Of course it's fair, it depends on what you agree on with the first customer. If they pay you for your hours, so you write the software for them and they get full rights, you won't be able to do it. They'll probably also want the source code, a point that you should agree on before writing 1 line of code, and get it in writing. On the other hand, if they are looking for a 'solution' and you write that solution for them, but retain rights to it and plan on selling it to other people later, it's fair that they pay less than the number of hours you worked on it multiplied by your hourly rate - after all, you don't pay 1 000 000 euros for MS Office either (a completely bogus number, it cost much more to make Office).
Dario Solera wrote:
- Should I give them the source? And in this case, Should I ask more money?
Again, that depends on what you agree on before taking the project, and of course when they want the source they should pay more. You shouldn't think about it in term of 'should I give them the source code', think in terms of 'should I transfer my rights to the code over' - and when you do, how much of those rights (e.g., can they market the product or only use it for themselves?). If you transfer all rights but don't give them source code and think 'they can't do anything anyway because they don't have code', they'll just sue you for it. Code is worthless without ownership rights to it. cheers, roel -- modified a
-
UrgentBack in 2001 when I did web development I wrote a guide on how to ask questions on the phpbuilder.com boards, it's applicable to all forums and mailing lists I think (minus some php-specific things): http://www.phpbuilder.com/tips/item.php?id=218. I've been accused of sounding like a cranky grandpa and being noob-bashing elitist asshole, but really, I think they're just bast rules that anyone wanting to operate online should know. Maybe I should brush it up a little and submit as an article - althrough there's probably already something like it on this site and the people it's aimed at won't read it anyway :(
-
Protest Against Reservation in IndiaMarc Clifton wrote:
It's a place where Indians can go to practice Buddhism and live off the gov't dole.
A great contribution to this weeks Sensitivity Awareness Effort: Political Correct Friday :laugh:
-
Protest Against Reservation in IndiaWTF is reservation?
-
CVS hostingI haven't used the Sourcesforge svn yet, but I don't have any complaints about speed. Maybe when switching from cvs to svn on the same project, and when using lots of big files, makes it more noticeable - but I've never done that (only started using svn for new projects). It does make a big difference whether you use file:// or https://, but that's to be expected. At work we have Apache 2 with mod_svn on a PIII 500 mhz, and even on a machine that old it's workable (commit/send speeds of 50 kb/s, according to TortoiseSVN).
-
Anyone care to review my article?I spend the bigger part of this sunny Sunday afternoon writing an article on a tool I wrote to manage the version numbering of software. I use it in both my private projects and in the projects at work, I figured since it's (IMO) pretty useful that I'd share it. Before I send it in, is there anyone who wants to help me out by reviewing it before I send it in? I'm not sure if I hit the right balance between convincing the reader that it's a useful tool and explaining how it actually works :) If you're interested and have 15 minutes to spare, post a reply with your email address and I'll send it to you.
-
CVS hostingYou don't need anyone to host a 'real' CVS server (by that I mean pserver in xinetd), you can use CVS over SSH on any hosting account that allows SSH access. Check your current provider, they may already allow it. You can run Subversion in the same way (using svn+ssh:/// urls). BTW I would highly recommend switching to Subversion, it's great.
-
Open Source Bug Tracking? -
My new box rocks (brag)peterchen wrote:
(And for that money, I can give everyone yet another gig of ram)
Yeah but that extra gig won't speed up your build nearly as much as Incredibuild would. IMO, when the only goal is faster (full) builds, Incredibuild is much more bang for the buck than any new machine is (of course if you regularly compile only 1 file and then relink, the gains go down).
-
comparison toolI see that you solved you problem but to be complete: you can try Microsoft's free 'SyncToy'. It's a program to keep directories in syn (like for backups or when you move your data between a (couple of) laptop(s) and a desktop computer. If you do a 'dry run' it will tell basically tell you what the differences are between two directories. I use it a lot when copying large amounts of files over unreliable network links.