I use connection to sql server:
m_pConnection.CreateInstance( __uuidof( Internal::Connection ) );
when I am currently testing my application in remote (server sqlserver in another machine) everything works as it should.
But when I simulate a network outage (disconnect and reconnect the cable network) and I run a query to read attributes (for example) I noticed that my application does not know the basis which has been connected even though the tests on the connection it gives me yet opened(pConnection->GetState() = adStateOpen)!
So I wonder how to know if there is a network outage or how to create a connection attempt and also the best test on the connection that it is still connected to my database.
Actually I m getting tht value for view in dialog.
You appear to have asked this same question previously although in different ways, and yet nowhere have you clearly explained what you are trying to do. All I can determine is
you are using a dialog, for some unknown purpose
you need to do something with a view somewhere
you have some reason to use an OPENFILENAME structure in or from the dialog
you think lpfnHook is an answer to something
you do not understand the SendMessage() call
Can you please try reposting the question with a clear definition of what your program is trying to do and what bits are not working. Place any code you post between <pre></pre> tags, and try spelling words in full rather than using 'txtspk', so that we can understand the problem and work to a resolution for you.
I have a CWnd Derived window. I have added several Child windows.
I create the child window [main_view_win] using WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL the scroll bar exists and works however there are two problems.
the scroll bar buttons initially are not drawn. ( thumb and middle part are drawn ) Once they are clicked on they are drawn properly.
when the child window [main_view_win] is covered by another window ( for example notepad ) the scrollbar's do not redraw until they are physically clicked on.
I have tried the following with no luck.
Made sure no other child window was overlapping.
Tried with clipchildren clip siblings turned on
turn off all painting functions to make sure i was not doing something stupid.
turned on and off erase background.
I did a quick test adding a scrollbar as a seperate child window and it worked just fine.
I was about to change my code ,illiminating the WS_VSCROLL and WS_HSCROLL, then I thought the smart people of codeproject might know what is happening.