 |
 |
Apologies for the shouting but this is important.
When answering a question please:
- Read the question carefully
- Understand that English isn't everyone's first language so be lenient of bad spelling and grammar
- If a question is poorly phrased then either ask for clarification, ignore it, or mark it down. Insults are not welcome
- If the question is inappropriate then click the 'vote to remove message' button
Insults, slap-downs and sarcasm aren't welcome. Let's work to help developers, not make them feel stupid.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
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.
cheers,
Chris Maunder
The Code Project Co-founder
Microsoft C++ MVP
|
|
|
|
 |
I have tried adding MFC support and calling a modal/modeless dialog from a win32 application
My program is crashing when I do this.
Deekonda Ramesh
|
|
|
|
 |
Error message? Code?
The question is very less likely to be understood as it stands now.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
 |
I am having an MFC Dialog class called CDataFilesDialog
inheriting from CDialog
I have a global object of this dialog named dlg;
I am doing a dlg.DoModal() from a WMCOMMAND message handled by wndproc of my win32 application. I am trying to mix MFC and WIn32
Deekonda Ramesh
|
|
|
|
 |
I strongly suspect that your entire application needs to be re-built as MFC in order to do this.
|
|
|
|
 |
SInce MFC is a wrapper of win32 , why can't I do this?
Deekonda Ramesh
|
|
|
|
 |
Because the design of MFC means you can use ordinary Win32 calls inside an MFC application but not the other way round.
|
|
|
|
 |
Under Windows, I try to open file which name contains apostrophe or some letters in language other than English. In these cases fopen or CreateFile (from W32 library) fail to open it. How should I do that task? Wide character type, wfopen or defining UNICODE don't help. The functions say the file doesn't exist.
|
|
|
|
 |
I just tried a file named "foo'baÇÉØr.txt" and it opened fine. You must have some other issue with yours.
|
|
|
|
 |
Well, maybe. I read the name of file from another text file which is windows media player list (.wpl). E.g. I can't open file named "Baby,_I’m_Not_Sure_If_This_Is_Love.mp3" but this "05 - Cold Hearts.mp3" can be opened. There may be issue with encoding characters in the list but how it is possible that some files can be opened and others cannot from the same list. Of course, all files are playable by WMP.
|
|
|
|
|
 |
Additionally, here is what I see in debugger window as contents of the variable which contains the file name:
"Baby,_I’m_Not_Sure_If_This_Is_Love.mp3"
|
|
|
|
 |
That looks like UTF-8. XML files are usually UTF-8 encoded.
So you must convert from UTF-8 to wide characters after reading the file content into memory (e.g. using MultiByteToWideChar function (Windows)[^]).
Afterwards you must still check for entities as noted in my above post. Even when the WPL file does not use entities for non-ASCII characters it uses them for the reserved characters (quot, amp, apos, lt, and gt).
|
|
|
|
 |
Definitely, it helped at least in half a problem. The rest lays in XML entities like &_amp_; (without underscore). I think I should treat them manually.
Generally, mbstowcs won't help. I had to use win32 function where I can define more encoding standards.
|
|
|
|
 |
I just created a file with that name and I was able to open it with another application. As I said before, I suspect the issue is something else. Are you sure that your path is correct when you try to open the file?
|
|
|
|
 |
Message Removed
modified 21-Jun-16 16:28pm.
|
|
|
|
 |
Write a C
Program to find the survivor in a "7 up" game.
In the game, a group of people stand in a circle,and start counting from 1 in a clockwise direction.
The person who has to say "7" goes out, and the person next to him starts counting from 1 again.
This goes on until only one person remains, and he is survivor. Your goal is,
given the size of the group find out the place(Index) in which a person has to stand for him to become the survivor
|
|
|
|
 |
You posted this in the wrong forum. Ask a question[^] or C / C++ / MFC Discussion Boards - CodeProject[^] would be the right places.
But note that you won't get an answer for this kind of request. This is not a code writing service. Try it yourself. If you then get stuck at some point, show what you have tried so far (code snippets), describe the problem, and you might get valuable help.
|
|
|
|
 |
Hi,
I want to send raw esc/pos (epson compatible) text data (not graphics) to a cheap chinese POS58 thermal printer using either MFC or Console32 application. Is there any library or sample to start of ?
Regards,
sdancer75
|
|
|
|
|
 |
I have a very general question on database migration. Am pretty new to database development and have no ideas at all, so please bear with me.
I am working on a VC++ MFC application using Visual Studio. This has a Oracle backend database.
There's a table called T_SIGN_IN that has the following columns,
1. USR_NAME
2. USR_ID
3. USR_ACCT_NUMBER
4. USR_ADDRESS
5. USR_SSN
6. USR_LAST_LOG_IN
7. USR_LAST_LOG_OFF
............and so on...
Now as part of a new feature enhancement, we want to create a new table called T_SIGN_LOG and migrate some of the existing column data from T_SIGN_IN.
For e.g., we want to move data from USR_ID, USR_LAST_LOG_IN and USR_LAST_LOG_OFF to the new table.
How can this be achieved?
I hear that there're 2 ways of achieving this.
1. Stored Procedures.
2. C++ function.
Can someone give me a example of how this can be done via the above 2 approaches? Code snippet will be great!
And also, which is the best way of doing it?
|
|
|
|
|
 |
I am trying to build and use my first DLL. After editing in the source code and building the Debug directory contains the .dll, the .lib and four additional files. A console app is created in the same solution but another project and built without referencing the dll. The .dll and .lib are copied to the solution directory. In the console app I added:
Quote: #include "E:\CODE\Common_Utilities\Common_Utilities\Common_Utilities.h"
Ctl-F7 produces a successful compile. A build produces this error.
Quote: Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl Get_Text_For_Error_Code(unsigned long,wchar_t *,unsigned int)" (__imp_?Get_Text_For_Error_Code@@YAXKPA_WI@Z) referenced in function _wmain E:\CODE\Common_Utilities\Test_Get_Text_For_Error_Code\Test_Get_Text_For_Error_Code.obj Test_Get_Text_For_Error_Code
After some searches my latest attempt to fix is by: Right click solution -> Properties -> Linker -> General -> Additional Library Directories
There I edited in the path to the DLL. No help.
This is my first DLL attempt and I strongly suspect there is something simple I have missed. Please point me in the right direction.
Thank you for your time
|
|
|
|
 |
At link time you need to include the .lib file, which contains the exports from the build of the library. The .dll file is only used at run time whan the system loader gets all the separate modules into the program's address space. Did you follow the guide at Walkthrough: Creating and Using a Dynamic Link Library (C++)[^]?
|
|
|
|