My suggestion is to use google, but you need to pull your head out of your ass first so you can see what you're doing.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
What is the best way to update a view after opening a file from the document class? I am working with OpenGL and NTGraph and I have read data from a file to an array in OnOpenDocument and I need to automatically update the view. In the past I have added a menu item called Refresh Graph and when I select it, I assign the appropriate data and then call Invalidate to update the graph. It works, but it is not automatic and I know there has to be a better way to do it. Thank you.
When you are initially opening the file, you just need to override the view's OnInitialUpdate method. Calling UpdateAllViews from your document's initialization process can lead to double-drawing the view at startup (which you may or may not mind depending on how performance hungry your app is).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Help me! i am learning about Client-Server modern.
i want to write a program that server manages the music web
(upload and download songs). Client can upload or download songs if it's a member of webpage. Client can only delete the songs that it uploaded....
Can anyone tell me the functionality difference between these two styles. The only difference I know is that a window style can always be either of them.
What would be the exact difference if these styles are swapped? And example would be great.
What would be the exact difference if these styles are swapped?
For a window with WS_CHILD, GetParent() returns the parent window. For a window with WS_POPUP, GetParent() returns the owner window, and it can be drawn anywhere on the screen, not just within the parent's client area.
"The largest fire starts but with the smallest spark." - David Crow
The reason I posted this question was I found a strange thing happening in my code.
My application has a complex layout. with lot of modeless dialogs,Form views etc.
1) In some sequence a modeless dialog(with WS_CHILD style) is created and displayed from Wnd1.
2) Then a button in another window - wnd2 (not from the parent window) is pressed . eg: eg help file button pressed to open a help window.
3) Now when the help window - wnd3 is closed, my modeless dialog does not get painted and appears invisible. Only minimize/maximise or Alt-Tab repaints/brings back the modeless dialog.
When debugged I found out that the modeless dialog window style was WS_CHILD. I changed the style to WS_POPUP and evrything worked fine.
Could someone explain why it worked in the later case.
CRecordset rs(&objDB); // db is database object open above;
bool isOpened = rs.Open( CRecordset::forwardOnly,strSqlQuery);
short nFields = rs.GetODBCFieldCount( );
sprintf(tmp,"nFields %d found in dbquery ",nFields);
while( !rs.IsEOF( ) )
for( short index = 0; index < nFields; index++ )
rs.GetFieldValue( index, varValue );
strResult = *(varValue.m_pstring);
After opening the Recordset object using open(), when I write this if statement if(!rs.IsBOF())
DisplayMsg(" if block entered");
this if block is not entered which means that Recordset object is at beginning of file. Does it mean that Recordset is empty? While when I checked the Recordset object using
short nFields = rs.GetODBCFieldCount( );
it returned 1.
but after it while loop is not entered at all as I have mentioned in my previous posts.
Sorry to u all as there was no problem in the code which I posted in my question. Actually I have the two copies of the database which I am working on and mistakenly modified the copy of the original database while I had to modify original one bcoz I was querying the original database. The values I was seeking were not in the original database which I was accessing through my application bcoz of that Recordset object was empty.
Last Visit: 31-Dec-99 18:00 Last Update: 5-Jul-22 9:42