|
|
Hi,
1. I have a problem with resouce files: Visual C++ does not give unique ID numbers to all sysmbols and this sometimes causes many problems. How can I prevent this from happening again? Editing resource file manually really takes too much time.
2. I have a big project and I want to make a German version of my program. How can I do this?
Thank you for any helps in advance
Mustafa Demirhan
|
|
|
|
|
Hello, the codgurus around the world.;)
Actually, I don't understand your (1) problem very well.
One issue of Localization is that we shouldn't put the hard code of error string like MessageBox. We should use the string table in the resource file.
ID of the control should keep the same one in resource.h and control ID of the resource ID.
As long as we use the resource editor to add or delete the control, the resource editor
add the new ID to resource.h (not delete).
(2) If you need German version, you should simple replace English string to German string
in the resource file (RC file).
That is, German resource is included in EXE file.
Or, you can use the resource DLL file to linked EXE file at run time.
Check Localization in MSDN help.
Or, you can use Unicode version exe for Window NT and 2000.
Currently, Window 9x and ME don't support Unicode. But, Microsoft will support this in
the near future.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
I have a (freeware) Add-In for VC 5.0/6.0 which can identify resource ID conflicts within a resource.h file and renumber symbols to get rid of them (unfortunately, there's not much that can be done about DevStudio mucking them up in the first place).
If you think this will help you feel free to visit http://www.resorg.co.uk.
P.S. I'm about to post a new version in the next week or so which is much smarter than the current one - if you're interested I'll let you know by email when it's available.
Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net) http://www.resorg.co.uk
"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
|
|
|
|
|
Hi all
I do have a simple quistion, can i recognize that my serialized file hade been changed externaly by any one ?
i do have a program that read every time from serialied file and i wan to be shoure that no one play with that file
another q can i compress my serialized file
thanks all
|
|
|
|
|
Add a digital signature to the file, and check it while reading. MS Crypto API has functions for this.
You can compress the data if you want.
|
|
|
|
|
If you are using serialization
you would be using CArchive for that purpose.
CArchive is associated with CFile Object.
Check the CFile object. Setting appropriate parameters for the file so that no one else modifies it is possible.
May be in one of the parameters you find a parameter for compressing the file. Or else use Low level Win32 api CreateFile there might be a way to compress the file if it is a NTFS file system. then attach this file handle to the CFile object.
|
|
|
|
|
I am wondering if anyone knows how to remove the labels on each point when doing charts/graphing with TeeChart Active X. Those labels really clutter up the graphs and it would be really nice to remove them. I think it's supposed to be easy, but I have not been able to figure it out.
Thanks.
|
|
|
|
|
Hi
I'm not familiar with databasing. and i have to use Microsoft Access.
I like to know if anyone knows any :
1-Usefull internet site for beginners.
2-Helpful book to teach beginners, Microsoft Access.
Thanks
Ehsan
Ehsan Behboudi
|
|
|
|
|
Easiest way to learn is start ADO. Get samples from msdn ADOChucnk is simple database
App. ADO is straight forward using Access Databse in ADO is very easy.
So best way is start with MSDN sample
Bad judgement gives Good experience;
Good judgement comes with Bad experience
|
|
|
|
|
I have this MFC app. where I have some dialogs, with some controls in. Nothing new there
But, I also have selected "Context Help" and have this little "?" in the corner of every dialog, but when I click the "?" and then click on a control, I can see in the help workshop that it's the dialogs help-id that's called, and not the controls help-id
Anybody knows how I get my app to call the controls help-id instead. I want popup-help for every control, not a general help for the dialog...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
You need to handle MFC-defined WM_HELPINFO message - that's the place to call WinHelp. The tricky part is that handler gets called for both dialog and control help. So you need also to handle WM_SYSCOMMAND, like this:
void CMyDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if (nID == SC_CONTEXTHELP)
{
m_bContextHelp = TRUE;
}
CDialog::OnSysCommand(nID, lParam);
if (nID == SC_CONTEXTHELP)
{
m_bContextHelp = FALSE;
}
}
m_bContextHelp is a BOOL data member which is tested in OnHelpInfo handler. If you have more than one dialog in your app put this stuff into common base class.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks a lot, I'll give it a try
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I use this function, with no need for OnSyscommand()
BOOL CMyDialog::OnHelpInfo(HELPINFO* pHelpInfo)
{
short state = GetKeyState (VK_F1);
if (state & 0x80)
return CDialog::OnHelpInfo(pHelpInfo);
WinHelp (pHelpInfo->dwContextId, HELP_CONTEXTPOPUP);
return TRUE;
}
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
Testing for F1 being pressed is not enough when you have 'Help' pushbutton on your dialog.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
OnHelpInfo() is not called when you click on the 'Help' button (ID_HELP). (at least in my apps it is not)
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
It depends on how you handle the ID_HELP. I remember that for some reason we had to forward the call to CWinApp (which in turn called OnHelpInfo indirectly) - sorry, no source code at hand, can't be more specific Maybe it was related to help on property pages.
Cheers,
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Nice, thanks
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Do you know any kind of class or something that can put a nice texture
as background (dialog background). I've use the 'CxShadeButton' class (found here on CodeProject)
and want preferably a class of the same button class!
Can you help me!?? OFCOURSE!
/*
BETA
*/
|
|
|
|
|
Just draw it onto the background in your OnPaint handler.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
|
http://codeguru.earthweb.com/dialog/BmpDlg.shtml
There you go, works well.
|
|
|
|
|
I have tried to search scientific way of handling retutn key on many
discussion boards and websites but no use.
I have dialog box with two edit boxes. One edit box accepts number.
When user enters number and hits enter (Carriage Return) key it
should display the corresponding data to entered record number
in another edit box.
Since it is single line edit box the enter key will be grabbed by dialog
box and I have no way to intercept enter.
Then I tried
This
In my Edit Control class I added following...
UINT CQSmartEditCtrl::OnGetDlgCode()
{
UINT code = CEdit::OnGetDlgCode();
code |= DLGC_WANTMESSAGE;
return code;
}// OnGetDlgCode
and
void CQSmartEditCtrl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
if(nChar == 13 ) // Return Key
{
AfxMessageBox("Need to Display Data");
}
CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}
But now I don't know how to handle displaying of Data because I need to send
notification to dialog that it is time to display record. How to achieve this.
Also, I have question is there any alternative way to get Return Key from within
edit box which is scientific way
Regards,
Vijay
vijay_khot@hotmail.com
|
|
|
|
|
In OnKeyDown handler call CWnd::GetParent and cast the result to proper type - pointer to your dialog class. Then call appropriate method (the one that displays data) using the pointer.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks Tomas...
It helped me. Now I have one more question
UINT CQSmartEditCtrl::OnGetDlgCode()
{
UINT code = CEdit::OnGetDlgCode();
code |= DLGC_WANTMESSAGE;
return code;
}// OnGetDlgCode
This function is making Edit Ctrl to intercept all messages
including TAB and ESC
How to skip these messages?
Bad judgement gives Good experience;
Good judgement comes with Bad experience
|
|
|
|