|
If you want to distribute the program then it means you need only files
MSVCRT.DLL
MFC42.DLL
other mfc*.dll files are only for Debug version
Hope it helped, Honza
|
|
|
|
|
Run the Dependency Viewer on your EXE to find out which DLLs it uses.
|
|
|
|
|
Look on your VC++ CD for the DEVSTUDIO\Vc\Redist folder. This folder contains all the files you will need to redistribute any VC++ applications on various Windows platforms.
The file REDISTRB.WRI tells you which files you will need under which circumstances for a given platform.
For many applications you *will* a need different set of DLLs for WinNT and Win95, e.g. atl.dll.
Don't just copy some likely looking DLLs and hope it will be OK - I tried that once and got burnt
Dave
|
|
|
|
|
How do I add tooltips to a CToolBar using an extended tooltip control like Chris Maunder's multiline extended tooltip control. See the link below:
http://www.codeproject.com/miscctrl/tooltipex.asp
Thanks in Advance,
John
|
|
|
|
|
Note: The environment where my program ,must run is one without mice.
I have created a dialog that has two added controls to the CFiledialog using the stc32 and those stuff.
Now I would like to be able to set the focus to one of those controls when the users press the tab key over the cancel button, but I have no idea where to start.
Could you help me?
Thank you in advance.
|
|
|
|
|
Hi All,
I need to create a UDP Packet and send it to multiple Servers (and monitor the replies that the program (Anti-Virus) will return. Basically it is to test if the servers are working correctly (basically a test virus). Replies mean its working fine...if no reply we have a problem with the server reporting the viruses. Currently being done via an ms-dos batch file and takes 45 min. (with human intervention) to complete...Thats a big waste of time!!!!
I have seen a spoofing program at CodeGuru, but don't see where I can insert the proper message to make this happen...
Can anyone help???
Dan
|
|
|
|
|
Printing problem.
I have a dialog with a web browser control on it. To provide print functionality I'm using the 'Second Method' described in the MSDN "HOWTO: Print from the Microsoft WebBrowser Control" article:
LPDISPATCH lpDispatch = NULL;
LPOLECOMMANDTARGET lpOleCommandTarget = NULL;
lpDispatch = m_ctrlBrowser.GetDocument();
ASSERT( lpDispatch );
lpDispatch->QueryInterface( IID_IOleCommandTarget, (void**)&lpOleCommandTarget );
ASSERT( lpOleCommandTarget );
lpDispatch->Release();
// Print contents of web browser control
if( m_bStatic == true )
lpOleCommandTarget->Exec( NULL, OLECMDID_PRINT, 0, NULL, NULL );
else
{
lpOleCommandTarget->Exec( NULL, OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, NULL, NULL );
}
lpOleCommandTarget->Release();
The dialog can be loaded as normal and the print functionality works fine. However, the dialog can also be loaded so that the OnBtnPrint function is called when the url has been navigated to (the m_bStatic variable is set to true for normal dialog loading), then it posts WM_CLOSE:
void FSReportDlg::OnNavigateComplete2Explorer(LPDISPATCH pDisp, VARIANT FAR* URL)
{
if( false == m_bStatic )
{
OnBtnPrint();
PostMessage( WM_CLOSE );
}
}
The problem is that when the dialog is loaded in this fashion only the first page is ever printed, even though it knows how many pages there are (i.e. page 1 of 6). I have tried it without OLECMDEXECOPT_DONTPROMPTUSER and only the first page is printed if the 'All Pages' option is selected. If a page range is specified then all pages are printed correctly. However, the whole point of this functionality is that no user intervention should be needed.
There is a further problem. A selection of urls may be printed, causing the dialog to be loaded for print only once for each url. When this is attempted the first page of the first url is printed, but then a 'Navigation Cancelled' page is printed for each url afterwards.
Anyone got any ideas?
System is:
Windows NT4 SP5/6 (tried on different machines with same symptoms)
Internet Explorer 4.72.3612.1713 & 5.00.2919.6307 (tried on different machines with same symptoms)
Developed with:
Visual Studio 6 SP3
|
|
|
|
|
I've searched, although not exhaustively for some reference or example of implementing recordset paging without success.
I have an application that allows users to search for records by any criteria. While this makes things easy for the users, when searching on large tables with minimal search criteria, quite a lot of data has to go over the network. What I want to do is implement a paging mechanism that will get the first x records in the set, then keep track of the users position in the recordset, and only retrieve more records when they are needed.
Ideally I believe this should be a part of my underlying data classes, and I have to believe someone has done this before... Does anyone know of a reference/example they can share?
Thanks!
|
|
|
|
|
I would like to control the mouse and mouse klicks from my program.
I also would like to know if it would be possible to
simulate the keyboard from my program, so that the program
could enter text in other programs.
An example in VC++ for the two problems above would be appreciated.
|
|
|
|
|
You might check out this link.
http://msdn.microsoft.com/library/psdk/winui/keybinpt_7id0.htm
|
|
|
|
|
In case if I want to create OCX control ( as variable) into my SDI/MDI document in Run Time
How can I know the correct (and proper) values to create that object using XXX.Create function since every control use different initializing values?
and if I use and create that ocx in SDI/MDI will it be printed correctly through the regular view printing process? Or it will need extra printing handling?
exapmle if i would like to use the component named Micrsoft Chart.
|
|
|
|
|
How can I display a huge number of records into a listbox without putting them all in a CList at one time?
Please Help me !!!
Frank
|
|
|
|
|
I think you better use a list control CListCtrl.
Such a control can be made virtual to handle a huge number of elements.
You probably can find examples on this site.
|
|
|
|
|
Do you want a list box or a list control? Either can be made virtual. A CList though is not a control; it is a collection.
|
|
|
|
|
I have a CTreeCtrl with check boxes on a dialog that I need to detect when the check box has been checked/unchecked.
I am currently using the following code in the OnClick event handler, but it always gives TVHT_NOWHERE:
UINT uFlags = 0;
CPoint point = GetCurrentMessage()->pt;
ScreenToClient( &point );
HTREEITEM hItem = m_ctrlDrivers.HitTest( point, &uFlags );
if( uFlags & TVHT_ONITEMSTATEICON )
// Check box has been clicked
Anyone know where I'm going wrong?
|
|
|
|
|
A suggestion.
Try to use the "ptDrag" member of the NM_TREEVIEW structure
instead of GetCurrentMessage()->pt. There is no need to
convert ptDrag to client coordinates, because it is already
in client coords.
If this doesn't work, using the OnLButtonDown handler
instead of OnClick is a second chance.
HTH
Holger Persch
|
|
|
|
|
Hi Holger,
Thanks for your help. I've tried your first suggestion. This only gives me TVHT_BELOW from the HitTest.
As for your second suggestion, the OnLButtonDown event handler for the dialog does not get triggered when the tree control is clicked on (
Derek.
|
|
|
|
|
I've solved the problem.
The ScreenToClient call needs to be done on the control to convert the point to control coordinates, hence:
UINT uFlags = 0;
CPoint point = GetCurrentMessage()->pt;
m_ctrlDrivers.ScreenToClient( &point );
HTREEITEM hItem = m_ctrlDrivers.HitTest( point, &uFlags );
if( uFlags & TVHT_ONITEMSTATEICON )
// Check box has been clicked
Thanks for your help.
Derek.
|
|
|
|
|
How can I write Windows NT service in VC.
Please guide.
Thanks
Aasher
|
|
|
|
|
Hi.
Take a look at PJ Naughter's "CNTService" framework, that
is located in the "System" section. It's a great advice
in creating NT services.
HTH
Holger Persch
|
|
|
|
|
Another good workaround is Joerg Koenig's article
"A Class For Building An NT Service " at CodeGuru.
You can find it at:
http://codeguru.earthweb.com/system/nt_service.shtml
Best regards
Holger Persch
|
|
|
|
|
Finally!!! I worked out the negative y co-ord thing with MM_LOENGLISH so I can get the print size correct. And now I can do DIBs so they print!!! BUT for the last 3 days I've been trying to work out how to print them (DIBS) right way up with -y coords. ? How? And when I change to MM_LOENGLISH in the InitUpdate() with the SetScrollSizes(MM_LOENGLISH ,X,X) , the scrolling
falls apart.
Please help
PS. I HATE SCRIBBLE TO DEATH.
Zeg
|
|
|
|
|
I've created a "non-Document/View" MFC App in which I've created two (2) classes derived from CView and one (1) class derived from CWnd. The classes derived from CView will be used to display VCR, framebrab, or still images while the CWnd derived class will contain controls; i.e., VCR control buttons.
I'm having difficulty displaying the three windows. I tried adding member variables in the apps's CMainFrame class declaration but receive an error message that CMainFrame cannot access the derived classes constructor since it is "protected." Declaring a pointer(s) to the derived MFC classes in the CMainFrame class declaration and the calling "new" for the class produces the same error.
I need to display three (3) different windows/views in the application mainframe simultaneously and I know that I need to size each of the windows before displaying them. What is a general procedure for doing this? Do I need to create CFrameWnd's for each of the CViews?
|
|
|
|
|
CView objects, as created by ClassWizard, are created with protected constructors. The reason, way back when, was that CViews were only created as part of the framework, which used CreateObject() and several other features of CObject.
The short of the matter is that, when using non-doc/view you need to make the constructors public.
Why use CViews anyways? All they really do is provide linkage to the document object, and since you don't have a document object, what's the point?
|
|
|
|
|
Looking for MFC class for handling PhtoShop files. There is only file format desc. in PhotoShop SDK, but I haven't found any really useful sample. I've seen some programs which can display PSDs quite correctly but as I found all of them using some Delphi graphics library, there are no libraries for MFC/C++? (ImageMagick also have only basic support for PSD, I've found no C code for text layers). Any ideas?
|
|
|
|