|
I would like to know How I could dipslay japanese character in CStatic run under English window nt version and set font to MS gothic. The reason is that I can display japanese characters correctly by setting font to MS gothic in MS access under English window nt version and english Access version. However there is something that MS handle to display japanese characters when font is setting to MS gothic. I try to put some text in Vb control and set font to MS gothic some control work and some don't
Any idea
|
|
|
|
|
You need to make sure that the proper code pages are displayed. Most often, the English NT does not have the correct .NLS files to display Japanese characters installed to the computer.
At least this is a place to start. Then you need to set the locale for the control and then set the font. Otherwise, you are just as likely to set it to the English font rather than the Japanese font.
|
|
|
|
|
Hi everyone,
I have this question regarding DLL. I'm currently working on a project that contains an application( A FRAME ) that is using DLL functions. I have A MENU on the frame and in the menu, I have functions that uses DLL.
Let say for example, in the MENU, I would have an option named CACULATIONS, and under CALCULATIONS, I would have a ADDITION option. So when I click on the ADDITION, a dialog box would pop up and allow me to use the addition function created by a ADDITION DLL.
What I would like to know is the following, Is it possible for me to add new DLL's into the application without adding codes to the application itself (i.e without adding new codes to the frame)??
For example, let's say I have a new Calculation method called SUBTRACT and it's a separate DLL from the original adding dll. Then if I have a option in the MENU called ADD DLL, I would have a dialog box pop up in which allows me to add the new dll.
The dialog box will contain edit boxes that asks the user to enter where the new DLL file is, and what the user would like to call the new DLL method that he's adding.
So when the user enter the values and runs the program, a SUBTRACT option will now be listed under the CALCUATION MENU and the application will now be able to refer to the SUBTRACT DLL without adding new codes to the application itself. IS THIS POSSIBLE??? It's sort of like a plugin thing. IF ANYONE HAVE ANY IDEAS, PLEASE LET ME KNOW.
THANK YOU VERY MUCH.
Steve
P.S: One more thing, is there a code that allows me to call up the OPEN AND SAVE dialog boxes. (i.e when you want to open an existing document in Words, a dialog pop up.) How do I write codes for those dialog boxes for OPEN, SAVE, AND SAVE AS??? PLMK. THANKS AGAIN!
|
|
|
|
|
Read the article:
How to do run-time (or explicit) linking of C++ plug-in components and objects
By Gert Boddaert
here at Codeproject.
http://www.codeproject.com/dll/plug-in.asp
I hope this helps
Best regards
|
|
|
|
|
I was wondering what MFC dlls need to be included in a program that I use. It only uses CButton, CEdit, and CListCtrl controls. I know that the user will need to have ie4 or greater for the list control, but I'm unsure of what else might be needed. I would like to distribute the app for NT4, 95, and 98. Could someone help me out?
|
|
|
|
|
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
|
|
|
|