For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
Hi everyone! I need to "send" data in a notepad every time I write double numbers on edit control and press save. I wrote some code but my dialog (where the edit control is) don't even open when I run the executable. What I've done so far:
// TODO: If this is a RICHEDIT control, the control will not// send this notification unless you override the CDialog::OnInitDialog()// function and call CRichEditCtrl().SetEventMask()// with the ENM_CHANGE flag ORed into the mask.// TODO: Add your control notification handler code here
I think I must write some code here so the dialog box work fine but I can't it.
// TODO: Add your command handler code here
CInputDoc* pDoc = GetDocument();
Just get the text from the edit box using GetWindowText:
// If you have a class member variable for the CEdit in your CDataDialog class:
// If not, you have to use the ID:
CEdit *pEdit = (CEdit*)GetDlgItem(IDC_OF_THE_EDIT_BOX);
I did it but I didn't manage to save them again. Also when I pressed <x> this message appeared: "Exception thrown at 0x104420C5 (mfc140ud.dll) in Input.exe: 0xC0000005: Access violation reading location 0x00000020.
If there is a handler for this exception, the program may be safely continued.------>Break, Continue, Ignore"
Then use the debugger to see what happens (e.g. by setting a break point somewhere after the output file has been selected using the CFileDialog). You might also check if file.Open was successful. But if that fails calling file.WriteString should throw an execption.
Hi all, How can I give data in a dialog box dynamically? In a previous project I used edit boxes (e.g for 3 conductors) and gave those data separately for each conductor but now I have to give them dynamically and I don't have standard number of conductors and I can't use edit box again. Could you please give me an idea or a good link describing step by step how to create a table in a dialog box dynamically? Thanks for your time!!
I have created a dialog box in which I insert data about conductors (resistivity, permeability, diameter etc (electric power systems )) in edit boxes but I have done it only for 3 conductors. I have to insert-edit the number of conductors and then edit their characteristics. But I can't use again edit boxes because this is static. I want something like a dynamic table which will have rows=number of conductors and columns about is characteristic (resistivity, permeability, diameter)and edit them in dialog box. I don't know how to upload my executable to male clear what I have done but here is a part of my code for the static case of three conductors I want another dynamic way to edit data :/
Good Morning Sir, can we use std::string for handling names like chinese letters, japanese letters? I mean we can use them for string comparison like "some chinese stuff"=="some chinese stuff" will it work?? Thank you sir for your time excuse my english
It depends what encoding you use for the Chinese characters. If it is Unicode then you need wstring, but if it's UTF8 then you will need to create a new type based on basic_string. Look at the samples in the link I gave you.
The function name CALL_MD5_Function indicates that it is calculating an MD5 hash sum. But that algorithm is a binary operation and usually requires passing a byte array and a length. With C/C++ char* pointers are often used to pass byte arrays (using uint8_t* would be better). So a char* is not always an indication for a string type.
You are calculating the hash for file names which use different encodings on different platforms (e.g. UTF-16LE on Windows and UTF-8 on Linux). In such cases you have to know (or define) which encoding has to be used for calculations of the hash sum. Then you have to convert the file name strings to that encoding before calculating the hash sum. If it is used only on a single platform, just cast the wide string pointer and pass the length in bytes (the length is missing in your function call; I assume it is just a wrapper to the real function passing strlen).
Finally, why do you want to get the MD5 sum of file names? It is usually calculated for file content which is just binary.
Last Visit: 31-Dec-99 19:00 Last Update: 23-Mar-17 18:38