Thanks for your answer
first:in CCombobox::DrawItem(LPDRAWITEMSTRUCT pDIStruct) function modified the dc font and dc.DrawText(str,itemRect,DT_LEFT|DT_VCENTER|DT_SINGLELINE);//显示文本
second: in mfc interface, display the special symbol.It's ok.e.g. input a "t",and display the special symbol.
third: how to get the special symbol string? E.g. is the "t" string,but other string.
1) Create a 4 GB data file in Hard disk by writing 2 MB at time. ( Don't worry, that I can manage )
2) It should be stored in continous locations( clusters ) in hard disk. Is their any method to ensure that?
You would need to access the disk io API directory. Then via that
1. Find the contiguous clusters.
2. Mark them in use
3. Attach them to a file
4. Then write to the file, being careful to not exceed the maximum.
Naturally the application must also have permissions to access the API.
I have a program created using C++ MFC which works fine in USA, but when this program is used in Europe like Norway, the data is messed up. What I want to do is set the regional and location to US English always when program executes, how can I do it? Thanks you very much!
I need to generate variable sound ( system speaker is fine for now) , both in frequency (audio) and length (code). I do some processing in worker thread and I did tried Beep in worker thread , it is synchronous ( not really an issue) but it terminates the thread when completed. No good.
I tried MessageBeep and it did not do a thing, wrong audio anyway.
So is PlaySound (from a file) my only choice and if so how do I control the length of the "play"?
Any constructive suggestions are as always appreciated.
I'll get back to you on this one. The section of code in question is "broken".
I hope you are right and I had something else doing the deed.
But I checked elsewhere and really did not pull the silly idea of Beep terminating the thread out of my hat. Of course now I cannot find the source!
Right now I think the Beep is run in its own thread and what I saw in debug was message terminating that thread.
Thanks for your help.
The problem is you never give us all the information necessary to try and offer suggestions. You stated earlier that Beep() terminates a thread, but now you cannot find the source. So we have no way of even guessing what your code may be doing.
The enum members can have any int value. All of them can have the same value, they can have random order.
The only two "rules" that you have to know: If you don't define the value of the first enum member then its automatically 0. If you don't define the value of any of the other non-first enum members then their value is automatically the value of the previous member + 1. Using enums to declare constants in header files (even inside classes) is a good old trick. If you use the enum just to define constants then you dont have to give a name for the enum itself:
val0 = 5,
val1 = 1,
val3 = 4,
EDIT: The weekday enum itself is just a type. A type doesn't occupy any memory. If you declare/define a variable of that enum type then the variable occupies some memory, the same amount as an int variable:
// These VARIABLE DECLARATIONS occupy space somewhere in memory. The Weekday type itself doesn't.
// In plain c you have to say
enum Weekday ww;
What could be the cause for these debug assertions
Anything at all. You need to look at the code in order to find out what they are complaining of, and use your debugger to try and resolve them. However, since this is open source you would be better asking the question at the site where you got the code from.