I have the following problem:
I have a client where there is defined a network connection (mapping) to another computer. This is active when you double click the drive otherwise you see that red cross in the explorer just below the driveletter.
I have searched the web on how i can automatically restore the connection .. i have come accross the following link:
This is about the SDK 'WNetRestoreConnectionW'. There are almost no examples of using this SDK + this SDK won't work on Win95, 98 and Me computers.
Considering all the desing guidelines of safe programming including exception handling, just wondering do we actually write the handler for each and every possible error/excepion in our code? Its certainly a good practice but how practical it is in terms of LOC that we put for handling the errors which may never occur as well.
Just consider this piece of code
LPTSTR l_strResConn = new TCHAR[NAME_LENGTH];
//check over the value
int l_nRet = LoadString(theApp->m_hInstance,....)
For every loadstring, I should check for the value of l_nRet. But practially in my code, I've just ignored it at every place.
I have developed a custom activex control.when i try to register this activex control using the command regsvr32,i get the message "LoadLibrary("mystrings.ocx")failed.The specified module could not be found.
can some one tell me why this message comes and what is the solution for this.This message comes only in few machines.registration is successful in most of the machines.
Use Depends.exe that comes with visual studio to check wheather your module is able to get all the dlls that it depends on. i.e ? against a certain dll means that dll is not accessible and hence the registeration is failing.
My God is more powerfull Than Your God. (the line that divides the world)
In the main application I use CDatabase to connect to SQlServer.After this, I pass the pointer to a variable in a dll using a function.
When I try to use ExecuteSQl or I try to open a CRecordset, the program fail with access violation in release version. If I use the debug version of the main program and the dll everything is fine.
Can you help me please with a solution to this issue?
I have a problem: I have a single document based MFC application for viewing images. At first I used CScrollView as base class, which worked well with formats supported by IPicture and tiffs. But now I would like to see also PDF -files, which seems to be possible with CHtmlView, it simply opens an Acrobat reader and attaches it into the form with navigate2 -function. But if I use navigate2 -function for bitmaps and tiffs, they don't seem to be attached to the form, but they'll be opened in a window of their own. And if I use the Render function of IPicture to draw images onto the form, they just flash on the screen and then disappear. It seems that the OnDraw() -function of CHtmlView won't be called automatically. Could anybody help me with this? Thank you.
As i understand it, CHtmlView hosts whatever OLE ("Active") documents necessary to display what is navigated to. So, if a particular machine is not configured with appropriate viewers for a given file type, it will open externally. Think of it as having IE embedded in your app - there's surprisingly little difference.
As for drawing over it - n'uhuh. Don't be trying to do that. First, it won't work. Second, even if it did, it would be quite wasteful. If you are going to be drawing the view yourself, then you don't have any use for CHtmlView anyway - CScrollView will work just fine. There's no reason you can't use whichever view is most appropriate for a given file at runtime.
i am new to VC.i want complete information with all possible codes so that i can use com port for serial programming.please also tell me how i check that data is written and read from com port when no device is attached to it.