|
Dear Alok,
Thanks for giving me a valuable suggestion...
I have solved my problem by using the "SetWindowText" functionality of the CEdit ...
ctrlEdit.SetWindowText("khfkhd");
thus I avoid "UpdateData()"....
also Thanks to Mr.NewComer ..for the great article...
Regards
vinsankar
|
|
|
|
|
What could be the reason that the first paramter of Microsoft defined structures contains the size of that structure?
Suraj Gupta
|
|
|
|
|
There are a few reasons:
1. Ensure you initialize the struct correctly.
2. Signifies the version of the struct.
3. Helps detect incorrectly casted pointers.
4. A means of bound checking for dynamicly sizable structs.
|
|
|
|
|
Thanks for the answer!!!
Suraj Gupta
|
|
|
|
|
|
Thanks for the answer!!!
Suraj Gupta
|
|
|
|
|
Gupta Suraj wrote:
What could be the reason that the first paramter of Microsoft defined structures contains the size of that structure?
to maintain different version of Structure in use!
"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
|
|
|
|
|
This is a shot in the dark, but I might aswell try.
There are several languages which use pictographs as opposed to roman letters ( Chinese, Japanese, Korean... ). Learning these languages can be a challenge at times, but the biggest problem for learners is learning the correct order of strokes when drawing these characters.
I would like to design some sort of algorithm which given a character would output an animation of the character being drawn. An example of this would be the ascii letter 'k'. This requires two strokes, the first from top to bottom in a straight line, the second a diagonal from top-right to center, then veering to the bottom right. In Chinese though, some characters could have up to 20 strokes. This is going to be quite a challenge, so before I do anything I would like to do my research.
Does anybody know of any projects, articles and what not that is even remotly close to what I want to achieve.
|
|
|
|
|
i have a command bar in my application that runs on WinCE module.
i need to increase the size of it. how do i do it???
i am using this to create the menubar.
if(SHCreateMenuBar(&mbi))
{
g_hwndMb = mbi.hwndMB;
TBBUTTONINFO tbbi = {0};
tbbi.cbSize = sizeof(tbbi);
::SendMessageW(g_hwndMb, TB_GETBUTTONINFO,0, (LPARAM)&tbbi);
g_hMenu = (HMENU)tbbi.lParam;
}
|
|
|
|
|
In my program, I have 2 string table (1 string table is French, 1 is English). Texts of dialogs are loaded from string table. When I select French, my program will load French string table in to dialogs interface (texts of dialogs are French) and when I select English interface, it will load remaining string table (English String Table) - Texts of dialogs are English.
How can I do it?
Papais
|
|
|
|
|
What have you done till now and what is that you are unable to do?
Let us not listen to those who think we ought to be angry with our enemies, and who believe this to be great and manly. Nothing is so praiseworthy, nothing so clearly shows a great and noble soul, as clemency and readiness to forgive.
- Marcus Tullius Cicero
|
|
|
|
|
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!")
|
|
|
|