help.. because it can be the most boring thing to do. i really don't know anything to help it other than my curiosity. yes curiosity helps but i need to
- grasp what the code does.. fast!
- without breaking my head. (is this a joke? i'm asking myself)
- get it done only with a cup of coffee.. lol (joke? yes/no? hmm)
If I've got a piece of 'foreign' code I really have to understand, I usually make a copy of it and refactor it to my coding style and naming conventions. Doing this carefully, and stepping through the result in the debugger, usually gives me enough understanding to either use the code or rewrite it.
A good first step that's worked for me is to comment the code.
First a header for each method that explains what the method does. Next comments on the variables of the class, explaining what they do and how they're used. It also helps to comment unclear blocks of code once you figure out what they do, so you don't have to solve the same problem again later.
I sent the LVM_SETITEMPOSITION msg to the desktop icons' ListView, and the specified item changed the position, but I press 'F5' for refurbishing the desktop, its position had restore, why, why, i'm mad.
You could start by placing your code between <pre></pre> tags as described in point 7 here[^]. I also notice that you have a printf() and an exit() call within your timer event. Neither of these belong in a Dialog, I suggest you reread the MSDN section on Dialog Box Programming[^].
So, boost is a great library that has a lot of neat stuff, but I'm looking specifically for a multi-threaded smart pointer implementation, one that can even be as simple (it doesn't need to be blazing fast) as "lock, increment/decrement count, release", which seems like it would be easy to do. Smart pointers can be tricky though, so I'd like to find a good common implementation before giving up and doing something homebrew. Any ideas?
I'm Hoping someone here can help with a MFC ODBC Consumer Wizard Problem I am having.
Basically I am getting all the way through the various steps and failing on the last 'Finish' step with the Error Message: 'Could Not Create Session On Data Source'
I Know the ODBC Connection definition is working for two reasons:
A) I am able to connect to the database using it with the CDatabase Class in my forms program and select records.
B) The ODBC Consumer Wizard is also initialy able to connect to it as it is giving me a list of tables from which to create the class from during the Select Database Object Step
( Link to pic of Select Database Object step http://tinypic.com/view.php?pic=osx2io&s=6[^] )
So after going through all the steps, Selecting the Orders table, The Wizard fills
The appropiate filename fields as expected and then I press Finish and get the Error:
'Could Not Create Session On Data Source'
(Link to picture of Error http://tinypic.com/view.php?pic=sg3fch&s=6[^] )
This is the really puzzling bit, Because it has already created a session to enable it
to ask what database object I require ?! So why should it fail with that message ?
List of my Setup
VC++ MFC Forms program
I have managed to get the ODBC Consumer Wizard to work fine with a Text File Driver.
Anyone got any ideas ?
Many many thanks in advance for any help and advice, I'm really stuck on this one.
So I got zero answers and the question has dropped to page 15 already.
My Guess is that this problem will not ellicit any help/Suggestions from the knowledgable people on this board.
Seems like 90% of the questions on here get some response, And half of those that
don't are due to total vagueness of question.
So where did I go wrong ?
Is the subject just to obscure ?
Did I paraphrase the problem with insufficient info ?
Or in the infamous words of Ali G "Is it coz I am black ?" ( oh no ! (old) humour )
Anyway, A glass or two of wine later I thought I'd appeal to the old hands on here to
point out to me why I failed to garner any response my little problemette.
3 or 4 glasses later I could ramble on about how simple database access was for a
a C/unix program/platform in the 1990's, all you had to to was EXEC SQL INCLUDE SQLCA and you were away with the pixies
20 years and several PC's Later, Bill Gates has 'depreciated' Embedded SQL for VC++
'Progress' is binding your own variables and beating the conection parameters into a
resentful subservience akin to taming a rabid alzheimers afflicted dog apparently.
I think in VB one can group bunch of controls and move them as such.
I am struggling with MS SSTab control. I would like to build my tabs as a group and then move them (MoveWindow) into correct place also as a group.
So far I am doing it individually which is a pain.
Actually it would be nice to develop the group as a separate dialog and then "paste" it into correct place at run time.
Any constructive suggestion is as always appreciated.