Home > Back-end >  Dialog when initialization function in the run?
Dialog when initialization function in the run?

Time:11-10

Recently, I have a small white, the school to write a short term with the front-end database, I use the SQL server + c + + MFC written
Write MFC window of time, I in the click of a button in response to an event in the face of the database for an update, then close the current window and open a new window, a new window initialization function to a select database lookups,
Problems come, I select out data has been update the previous data, why is this so, the update operation should not select before? For big solutions, how to solve this problem?

CodePudding user response:

New window initialization function, resource initialization time is created in the window, just behind the call, according to
The solution:
1, a new window with the method of dynamically created, run out of destruction, recommend this method,
2, inside the window display event, select data,
3, put a timer, window update regularly,

CodePudding user response:

After the update, add Application - & gt; Intrinsic ProcessMessage (); This is the VCL way, MFC I don't know.
  • Related