|
search in the forum, this question has been asked few days ago...
(maybe it was you )
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote:
this question has been asked few days ago...
(maybe it was you)
Indeed, at least three separate times.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
i need the similar which can read quickly and show quikly within 'CWnd',
compability diff format graph such as 'gif', 'bmp', 'png' etc.
specialy, biggest graph!!!
I know CxImage is a very strong libaray for dealing diff format graph, but it don't support biggest graph that can read and show image, thus, i will search other...
who can help me? thanks!!!
|
|
|
|
|
i am kinda new to C++. So, here is a question: what does enum type make the program different? personally, i see it as an array. am i wrong?
|
|
|
|
|
Check this article out.[^]
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
- -Uknown.
|
|
|
|
|
I'm not much of a C++ programmer myself, but I see enum variables as integers with a restricted set of values, like the old set type in Pascal. The list of possible values for an enum are mapped to integers which can be assigned explicitly or automatically. The declaration
enum Colors (Red, Blue, Yellow);
assigns integer tokens to represent the words "Red," "Blue," and "Yellow" but in the program you don't have to worry about what value was assigned; you only have to worry about trying to assign a variable of the type Colors a value other than one of those in the list.
If you're worried about it you can also assign the integer values -
enum DaysOfTheWeek (Mon=1, Tue=2, Wed=3, Thu=4, Fri=5, Sat=6, Sun=7);
If you later declare a variable
DaysOfTheWeek Today;
You can assign it the value of 3 or Wed and still get the same result:
Today=3;
if (Today == Wed) doSomething();
will execute doSomething().
Enums greatly improve program readability, and help to reduce maintenance costs. In a way they are like arrays, or more accurately vectors as they have only one dimension. But arrays and vectors are not limited in the values they contain (other than the limitations of their types). Enums are, by definition, restricted to certain values that you define.
"If it's Snowbird season, why can't we shoot them?" - Overheard in a bar in Bullhead City
|
|
|
|
|
if i m using C in MFC right, in ListBox_GetSelItems(hCtrl, count, intArray) will it stores all the selected no in the intArray??
i m using the method below, but its stil not working!!can i know why???
total = ListBox_GetCount(hCtrl);
ListBox_GetSelItems(hCtrl, count, &lstItems);
// ListBox_GetSelItems(hCtrl, count, ArrayInt.GetData(hCtrl));
_stprintf(TextDisp, "Count = %d", count);
DispMsg(TextDisp);
for(i = 0 ; i < total ; i++)
{
if(iCount <= count && lstItems[iCount] == i)
{
DispMsg("True");
ListBox_GetText(hCtrl, lstItems[i], tmp );
hCtrl = GetDlgItem(hDlg, IDC_LVLSQ_SESSADJ );
ListBox_AddString(hCtrl, tmp) ;
DispMsg(tmp);
iCount = iCount + 1;
}else
{
DispMsg("False");
}
}
please Help me anyone...i hav try this for too long!!
|
|
|
|
|
Is this any better?
int nCount = ListBox_GetSelCount(hCtrl);
int *pArray = new int[nCount];
ListBox_GetSelItems(hCtrl, nCount, pArray);
for (int x = 0; x < nCount; x++)
{
ListBox_GetText(hCtrl, *(pArray + x), tmp);
DispMsg(tmp);
}
delete [] pArray;
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Dumb question.. I'm sure it's super easy but I can't figure it out for what ever reason...
How can I replace all the 0x0a char's in a string with " \\line " ?
Right now I am taking a char converting it into a CString and converting the string into RTF.. I'm having problems getting the 'new line' or 'line returns' put into the string.
Thanks,
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
|
Damn I knew it would be easy.. LOL
Thanks!
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
|
hi all,
is it possible an application crashed but the dr. watson and windows event log not able to detect it?
i have a server application running daily. it have a simple dialog and a tray icon. today, i found it disappear from the screen in lunchtime, just like being killed by taskkill.(the tray icon is still here) i cant find any eventlog for application crash and dr. watson have no dump for this, which suppose logged for the crash i found b4.
i added taskkill in the scheduler to kill the application at 5pm and i experienced some strange behaviour of this schedule b4. (like it run a long while later than our schedule time..)
so, i wonder if the killtask killed the application abnormally. i dont think it is a reasonable answer anyway! so, i want to ask u guys experience any an application crash but windows cant detect? (just like the application disappear suddenly, no dialog asking u to report MS, no eventlog and no dr.watson dump)
and, i have tried to make another simple application with bug to crash and test in that server. the crash of that application able to create the eventlog and all the dumps i said b4... of course, this crash may not the same as the crash of that application. just want to make sure the windows started dr.watson and all debug monitoring tools.
pls help!
i just feel to frustrate this problem appear. i have no hint what happen...
thanks,
jim
|
|
|
|
|
I wish I knew the answer... I run Win2k Server at home, and it has never invoked Drwatson on failure. I've never seen any mention of it in any documentation, either - maybe that's no longer installed automatically as it was in WinNT. The failure of the Event log is more serious - that should have happenned on any application failure. I'll be watching this space just in case someone can give you an answer! Thanks for asking...
"If it's Snowbird season, why can't we shoot them?" - Overheard in a bar in Bullhead City
|
|
|
|
|
i have tested with another application. i make it crash. i can still see event log capture this event even dr. watson failed to get the dump.
i heard that dr watson only dump for some problems will affect the OS.
anyway, the event log and drwatson should be running. (at least, it can capture the crash i make) however, i just dont know my target application is really crashed or being killed by somebody.
|
|
|
|
|
I am working on a program in c++ called permutations can you help me.
This is the exercise.
a program that inputs a value n and generates all n! permutations of the numbers in the set {1, 2, 3, …, n}.
Pebbles
|
|
|
|
|
There are some permutations article in CodeProject.
|
|
|
|
|
I know I have looked at them. I am a beginner at this. I am trying to make the progra work as follows..
cout<<" enter a set of numbers"<<
cin>>ser of number;
I need n numbers not a specific string.
Please help
|
|
|
|
|
|
Sorry for the question may be stupied but I am in dead end.
How can I sumulate ctrl+alt+del from my service or application.
For example: All desktop administrators has this function. I want to implement it in my application.
These days I search all the net for sample could not find exact. Find some using
keybd_event, SendInput but I could not simulate what I want......
Thanks in advice
|
|
|
|
|
You can't just "send" a CTRL-ALT-DEL to the system.
Search MSDN (or Google for that matter) for GINA.DLL and SAS.
GINA: Graphical Identification and Authentication
SAS: Secure Attention Sequence (a.k.a. CTRL-ALT-DEL)
I myself haven't written my own GINA dll but this will point you in the right direction.
Kelly Herald
Software Developer
MPC
|
|
|
|
|
I don't know the reasoning for simulating the CTRL+ALT+DEL sequence, but there's a function LockWorkstation , that does something similar (but also locks the station, so it's more like CTRL+ALT+DEL followed by ENTER)
|
|
|
|
|
The Ctrl+Alt+Del sequence is not very useful by itself. It's what action you take afterwards that is important. What exactly is it that you are trying to accomplish?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks all for the answers !
The point is that I want to make my service to simulate login to Windows 2000 server.
To execute one program(not written by me) as administrator and to lock then the server using "LockWorkstation".
I do not want to use Automatic Windows Login for some reason.
I know that there is another way to make my service to Login as administrator. To make it interact with server and to LoadProfile to set desktop and to execute the program. I search all MSDN and internet and find some samples and make all this, but for some reason it fails. I dont know why. It is dialog based and do not start. A program written by me which is dialog based also is executing fine and without any problem. But this do not why. So I look for another way to do this.
And the way that I think is good is this that I described.
So I will try to find sample about GINA and SAS and will write the result.....
If you have any suggestions I will apriciate them .
|
|
|
|
|
Is there a configuration file under WindowsXP, etc., that lets you set up the maximum number of files you may want to open with fopen()? I know there is a way to set this with a call to a function in <stdio>, _setmaxstdio()...but I thought it could be done another way.
Thanks.
Jerry
|
|
|
|