|
brahmma wrote: What have you done till now and what is that you are unable to do?
Former my program, I used dll to load resource French. but now, I don't want to use dll. I want to use string table to support multilingual. use "String Tables" instead of creating a new set of Dialogs for each supported language. String Tables are to support multiple languages.
I have created 2 stringtables (French and English):
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_ABOUTBOX "&About TestStringTable..."
IDS_TEST "This is test about dialog load string table"
IDS_CREATE "Create"
END
#endif // English (U.S.) resources
//French:
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_ABOUTBOX "&About TestStringTable..."
IDS_TEST "C'est essai au sujet de table de corde de charge de dialogue"
IDS_CREATE "Crée"
END
#endif // French (France) resources
In InitDialog function, I load button text is IDS_CREATE. If English is selected, button text is Create and if French is selected, button text is Crée.
Please show me a solution to solve it.
Thanks a lot
Papais
|
|
|
|
|
I dont see any problem on your question
|
|
|
|
|
This is my solution but I don't know how to implement this solution.
Please send me a example about it
Thanks a lot
Papais
|
|
|
|
|
HI All,
Is it possible to use #region in MFC 7 (unmanaged c++) in visual studio 2005? If so how do I do that?
Cheers,
Greg
|
|
|
|
|
I'm on MFC 7 with VS2003 and I see no #region directive associated with C++.
Is it related to making the code collapsible in the editor?
If so that can be done by marking a block of code and using the Outline stuff in the edit menu or
with a right click.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
Thank you so much, that was it!!!
Cheers,
Greg
|
|
|
|
|
The equivalent of a #region in C# is #pragma region and #pragma endregion.
|
|
|
|
|
I didn't even think of the #pragmas!
Learn somethin new every day
Thanks,
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
hi, as the titel.The user will input the name of the file and the folder through EDITBOX. m_name is the Variable ,in CStrig. Here is mz code
void CFilefindDlg::OnButton1()
{
// TODO: Add your control notification handler code here
HANDLE handle;
WIN32_FIND_DATA fd;
handle = FindFirstFile(m_name, &fd);
if (handle != INVALID_HANDLE_VALUE)
AfxMessageBox("Find this folder.");
else
AfxMessageBox("Could not find folder.");
}
I dont how to use funktion FindFirstFile().If i write in
char path[256]="C:\\guo\\1.txt";
handle = FindFirstFile(path, &fd);
It is right. But the name of the file should be decided by the user. How can i do it ?
Thanks!
|
|
|
|
|
If I'm understanding your situation correctly, your dialog box has an edit control and a button to initiate a "file search". You created a member variable for the edit control in the dialog class. This member variable is of type CString?
If so, the string variable will not get updated until the data exchange routines run. Instead, you want access to the edit control directly so create a variable for the edit of type CEdit. If your using VC++ 6.0, in the ClassWizard, for the dialog class, under the member variables tab, select your edit control, click "Add Variable...", for "Category:" choose "control" and then select CEdit for the "Variable Type:". This way you can do the following with your code snippet...
void CFilefindDlg::OnButton1()
{
// TODO: Add your control notification handler code here
HANDLE handle=NULL;
WIN32_FIND_DATA fd={0};
CString sFile="";
m_editName.GetWindowText(sFile);
handle = FindFirstFile(sFile, &fd);
if (handle != INVALID_HANDLE_VALUE) {
AfxMessageBox("Find this folder.");
} else {
AfxMessageBox("Could not find folder.");
}
}
|
|
|
|
|
I think you need to CString::Insert becuase you need a string(path) and need to a file name
|
|
|
|
|
zhangguoliming wrote: handle = FindFirstFile(path, &fd);
better use Direct Api PathFileExist
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi all, can you all please provide me some information about the functions CapCreateCameraWindow() for capturing the image obtained from the web cam..
|
|
|
|
|
I've never heard of CapCreateCameraWindow() but if you're referring to Video for Windows there's
lots of info here: Windows Multimedia Video Capture[^]
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi --
I'm building a GUI application in Visual C++ 2003 using the drag-and-drop Windows Forms toolbox. Does anyone know a way to build docked windows/forms (tabbed windows) into an application? I'm aiming for a look similar to the docked windows in, for example, visual studio.
Is there are way to do this within the drag-and-drop windows forms builder in visual c++, or do I have to write a lot of windows forms code?
Thanks in advance!
webHamlet
|
|
|
|
|
In MFC applications when creating my own defines - how do i know what values to use so that they wouldn`t conflict with predefined ones(I want to use them for event hadling)? The same thing about creating controls dinamicaly - how to make sure that the ID that I want to assign isn`t already in use by another control? Maybe there`s a good article about this? Any suggestions?
|
|
|
|
|
you can use <a href="http://msdn2.microsoft.com/en-us/library/ms644947.aspx">RegisterWindowMessage()</a>[<a href="http://msdn2.microsoft.com/en-us/library/ms644947.aspx" target="_blank" title="New Window">^</a>] to ensure getting a unique number for your message
|
|
|
|
|
Mr. Joseph Newcomer explains how to accomplish this in an article on his web site.
link[^]
|
|
|
|
|
For MFC, this old technical note still applies: TN020: ID Naming and Numbering Conventions[^]
For Windows messages (WM_xxx), the RegisterWindowMessage Function[^] can be used
but it's only necessary for (and recommended to only be used for) unique system-wide messages, for
communicating between applications/processes. For user defined messages in a single application,
see WM_USER Notification[^] and WM_APP Notification[^].
[edit]
How To Define Private Messages for Application Use[^]
[/edit]
Also remember that control IDs need only be unique per-window. They don't necessarily need to be
unique throughout a process.
Mark
-- modified at 14:46 Sunday 25th February, 2007
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Forgot this one - has handy info about the automagically Visual Studio generated IDs...
TN035: Using Multiple Resource Files and Header Files with Visual C++[^]
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi,
I need to create a map file in visual studio 2005 , but i can't find
the way to do so.
I know how to do it in visual studio 6.0 (thanks to Wouter Dhondtwith his great article
http://www.codeproject.com/debug/mapfile.asp[^]
can anybody help me ?
With best regards,
Eli
|
|
|
|
|
Project properties->Linker->Debugging->Generate map file
|
|
|
|
|
In project properties navigate to Configuration Properties/Linker/Debugging. There you'll
find the MAP file settings.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hi,
well, i am starting c++ programmer. I want to practice to get better programmer, but i don't really know how. Before some minutes i was trying to write own small program, but then i understood, i don't know really how to do it, compiler generated different errors for my code, that had 10-15 lines. I am asking to experienced, skilled c++ programmers, how to practice best c++ programming, also i need to understand structure of header file, which i don't understand now.
Best regards,
reyyy
|
|
|
|
|
Many members on here will suggest you buy a book. But I would suggest you find a free step-by-step C++ tutorial online.
As for your problem with the header files. In C/C++ there are two types of files. The .cpp holds the code, the .h is what joins all the files together. When you add a header file, you are really telling the compiler which code file you want to use.
|
|
|
|