Click here to Skip to main content
16,006,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Scrollbar looses grip Pin
Daffy d.11-Nov-02 23:57
Daffy d.11-Nov-02 23:57 
GeneralC#-dialog in a VC-Project Pin
deafpat11-Nov-02 23:47
deafpat11-Nov-02 23:47 
GeneralRandom Numbers Pin
Josus11-Nov-02 23:33
Josus11-Nov-02 23:33 
GeneralRe: Random Numbers Pin
tongc11-Nov-02 23:45
tongc11-Nov-02 23:45 
GeneralRe: Random Numbers Pin
Daffy d.12-Nov-02 0:15
Daffy d.12-Nov-02 0:15 
GeneralRe: Random Numbers Pin
Josus12-Nov-02 0:43
Josus12-Nov-02 0:43 
Questionhow to refresh the contents in a treeview? Pin
jack111-Nov-02 23:27
jack111-Nov-02 23:27 
AnswerRe: how to refresh the contents in a treeview? Pin
Paul Ingles11-Nov-02 23:35
Paul Ingles11-Nov-02 23:35 
I don't remember exactly how (I've not been doing any MFC stuff for a long time now) but you'll probably want to create a method that will query the database and add the records to the TreeView, this then gets called from other CTreeView methods, such as the one that's called when its first initialised. Once its been populated there will be a Clear() method (possibly as part of the underlying CTreeCtrl though) that will empty the TreeView so that you can then re-populate it.

However, if you're adding a single record and you know how it behaves its probably more efficient just to manually add the line into the TreeView rather than the entire db -- once it gets to a significant size it'll be quite slow (depending upon the dbms of course).

Anyway, it may be better to create a method in your CTreeView derived class that adds a single record to the TreeView, this can then be called from another method that queries the entire DB and adds each record. Then you can use this AddRecordToTree() method after your dialog closes and add the record manually, thus avoiding any database querying etc.

Sorry for being quite so vague with everything.

--
Paul
"I need the secure packaging of Jockeys. My boys need a house!"
- Kramer, in "The Chinese Woman" episode of Seinfeld

MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446

Generalcode project search bar! How??/ Pin
tongc11-Nov-02 23:12
tongc11-Nov-02 23:12 
GeneralRe: code project search bar! How??/ Pin
Michael Dunn12-Nov-02 4:52
sitebuilderMichael Dunn12-Nov-02 4:52 
GeneralRe: code project search bar! How??/ Pin
tongc12-Nov-02 22:15
tongc12-Nov-02 22:15 
GeneralPutting a main Menu in a Dialog Box Pin
GurGur11-Nov-02 22:52
GurGur11-Nov-02 22:52 
GeneralRe: Putting a main Menu in a Dialog Box Pin
567890123412-Nov-02 4:13
567890123412-Nov-02 4:13 
GeneralRe: Putting a main Menu in a Dialog Box Pin
Nitron12-Nov-02 4:19
Nitron12-Nov-02 4:19 
GeneralRe: Putting a main Menu in a Dialog Box Pin
GurGur12-Nov-02 4:56
GurGur12-Nov-02 4:56 
GeneralRe: Putting a main Menu in a Dialog Box Pin
Nitron12-Nov-02 7:34
Nitron12-Nov-02 7:34 
General#import directive Pin
devvvy11-Nov-02 22:01
devvvy11-Nov-02 22:01 
GeneralRe: #import directive Pin
benjymous11-Nov-02 22:50
benjymous11-Nov-02 22:50 
GeneralRe: #import directive Pin
devvvy12-Nov-02 6:40
devvvy12-Nov-02 6:40 
Questionhow to open a file name which is in different language to current OS Pin
cck11-Nov-02 21:46
cck11-Nov-02 21:46 
AnswerRe: how to open a file name which is in different language to current OS Pin
Nitron12-Nov-02 4:26
Nitron12-Nov-02 4:26 
QuestionHow to useMS Word commands in Visual c++ (DDE) Pin
kanat11-Nov-02 21:26
kanat11-Nov-02 21:26 
AnswerRe: How to useMS Word commands in Visual c++ (DDE) Pin
Simon.W12-Nov-02 0:02
Simon.W12-Nov-02 0:02 
GeneralDelete NULL bytes file in hidden Pin
Anonymous11-Nov-02 19:15
Anonymous11-Nov-02 19:15 
GeneralRe: Delete NULL bytes file in hidden Pin
Chris Losinger11-Nov-02 19:34
professionalChris Losinger11-Nov-02 19:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.