|
I have a dialog. I set these properties:
System Menu = True
Maximize Box = True
Mimimize Box = True
The dialog just show a close button, but not show maximize button and minimize button.
I thoght that I miss some other properties? Can anyone tell me what's wrong here?
|
|
|
|
|
tataxin wrote: The dialog just show a close button, but not show maximize button and minimize button.
I thoght that I miss some other properties? Can anyone tell me what's wrong here?
These should be enough.
I face such problems mainly because my resource dll does not get compiled as dependency is not set on it, it is compiled on request only. So make sure the resource file is getting compiled.
Another possibility to check is whether these styles are being dynamically removed or not.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
I found it!!!
The property Tool Window must be False.
Thank you, Nibu babu thomas,
|
|
|
|
|
I am using VC++ .Net 2003.
If I place a richedit control in the dialog of dialog based application, application quitting immediately without any message while start.
Is it any known bug?
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
If you are placing a rich edit control in your dialog, you have to call, AfxInitRichEdit()[^] in the InitInstance() function of you app class.
|
|
|
|
|
Hi! Thanks for helping me. I need to write a program (in C++) that reads the file Employee.dat as input and then outputs to 4 different files which are Managers.dat, Marketing.dat, Developers.dat, and Testers.dat. Each of the output files contains the name of the employees of its category.
The fle Employee.dat contains following data:
Sue Leon 4
Robert Wise 3
Sam Woo 1
Nathan White 3
Suzan Head 2
Henry Williams 4
Christine Mint 1
Kim Leeds 4
Elton Sue 3
Ken Latch 2
I tried to write the program but I don't know what to put in "SWITCH" loop. Here is what i have so far.
#include <iostrean>
#include <fstream>
#include <cstdlib>
#include <string>
using namespace std;
int main()
{
ifstream in_stream;
ofstream out_stream;
in_stream.open("Employee.dat");
if (in_stream.fail())
{
cout << "Input file failed to open.\n";
exit(1);
}
out_stream.open(("Managers.dat", ios::app), ("Marketing.dat", ios::app), ("Developers.dat", ios::app), ("Testers.dat", ios::app);
if (out_stream.fail())
{
cout << "Output file failed to open.\n";
exit(1);
}
string first_name, last_name;
enum department { Managers = 1, Marketing = 2, Developers = 3, Testers = 4 };
im_stream >> first_name >> last_name >> department;
while (!in_stream.eof())
{
switch (department)
{
number '1';
out_stream << "
|
|
|
|
|
Shah Ravi wrote: #include <iostrean>
Are you receiving a preprocessor error with this one?
Shah Ravi wrote: out_stream.open(("Managers.dat", ios::app), ("Marketing.dat", ios::app), ("Developers.dat", ios::app), ("Testers.dat", ios::app);
...
im_stream >> first_name >> last_name >> department;
Or a compiler error with these?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No, I haven't finished writing program yet. Could you please read the code and tell me what to write in SWITCH loop. Should I use cout or ofstream? Thank you so much for replying.
|
|
|
|
|
Shah Ravi wrote: Could you please read the code and tell me what to write in SWITCH loop.
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I would like to ask how to detect application/windows scripts on load.
for example my program would detect if someprogram.exe is loading..
thank you.
|
|
|
|
|
you'll have to take a snapshot of every process, every second (or a time you decide), and compare with the old snapshot to see if you find a new process.
you can try hooking the api that opens the processes to watch it, but it's somehow expensive to develop... there's the oportunity to write a kernel module and watche the processes memory pages, that is more expensive yet...
i don't really much more clues on how to do it, but there are books that goes deep on theese subjects such as "Windows Rootkits: Subverting the windows kernel" and such.
|
|
|
|
|
A tab control with several tabs was set up on a dialog based project. Everything works fine in switching from tab to tab, but what I would like to do is have a configuration file selected and displayed in the first tab, and then displayed in an edit box in the second tab right after it is displayed.
How does one get the edit box to initialize in the second tab? The OnInitDialog only works when the dialog comes up. Is there a similar function that can be invoked when switching from tab to tab?
Thanks.
|
|
|
|
|
I think you need to override OnSelchange() function.
Refer here:CTabCtrl usage[^]
--
"Programming is an art that fights back!"
|
|
|
|
|
OnSelchange()was in a mytabctrl class for handling the tabs. While in it, I could display an AfxMessageBox("tab2") in the correct tab, but couldn't access any of the edit boxes that were associated with that tab. What I did was send a message from OnSelchange(), and then in the tab2 dialog use
CTab2::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) to trap the message and initialize within the tab2 class.
It works OK, but seems like there ought to be means of directly accessing the tab2 class from within the mytabctrl class.
Thanks for the link. I'll download the file and dig in to it later this evening.
|
|
|
|
|
hello
I Have a Question....
how to writing a Program that analyze pic 2 and arrange or place pic1 into pic2
better analyze
link pic1:<<>
link Pic2:<<http://i25.tinypic.com/2a604nn.jpg>>
pleas help me
hi......
modified on Sunday, July 6, 2008 5:09 PM
|
|
|
|
|
rahzani wrote: What write a Program that can the object or picture similar object1...that can been minimize space of object2 .
Incoherency at its best.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i'm sorry
i cant writing english.
my question is editing........
help me for this program......
hi......
|
|
|
|
|
rahzani wrote: i'm sorry
i cant writing english.
my question is editing........
help me for this program
I am sympathetic to your problem with english. Unfortunately, before we all start giving arbitrary answers, it would be helpfull if we had an idea what the nature of the question is.
Regards,
Bram van Kampen
|
|
|
|
|
i'm sorry
i cant writing english.
my question is editing........
help me for this program......
hi......
|
|
|
|
|
"Editing" is a rather broad field. You'll have to more specific to have any hope of getting useful advice.
Steve
|
|
|
|
|
URGENT!!! I have a problem. Please post the solution.
Steve
|
|
|
|
|
I am having a difficult time understand what is really happening when I overload an operator for a class. Here is my class declaration. CC is short for CCarteseanCordinates.
class CC
{
public:
CC(void);
~CC(void);
CC operator+( CC &source );
double Query_X();
double Query_Y();
double Query_Z();
void Set_X( double value );
void Set_Y( double value );
void Set_Z( double value );
protected:
double X;
double Y;
double Z;
};
Attempting to follow format of the example in the book I have, the definition of the + operator overload is:
1 CC CC::operator+( CC &source )
2 {
3 CC result = *this;
4 double sum = source.Query_X() + X;
5 result.Set_X( sum );
6
7
8 return result;
9 };
Line 3 starts with
CCarteseanCordinates result
Which seems to create a local object of type CCarteseanCordinates.
Now adding on the = *this;, the line now seems to say assign to that object the value of the local this pointer.
That is similar to writing
Int y;
Int *z = &y;
Int x = *y
Except: The equal operator has not been overloaded so
Object1 = object2;
Is not a valid construct.
Should my declaration really be something like:
CC operator+( CC &source1, CC &source2 );
What is really going on here, and what should be going on?
Lets ignore the friend operator for the moment.
Thanks for your time
|
|
|
|
|
In a class Constructor, Copy Constructor and assignment operator are automatically generated by compiler if needed.
First and most important is the definition of operator. You should understand that operator is nothing by a function. So for CC class if you write a = b + c, where a, b, and c are objects of type CC, what it really means is a = b.operator+(c). Does this makes sense?
Another this is there is no need to use functions to access variables within the class. You can do this as:
CC CC::operator+(CC &source)
{
CC result = *this;
result.X += source.X;
result.Y += source.Y;
result.Z += source.Z;
return result;
}
Hope this helps.
-Saurabh
|
|
|
|
|
RE: what it really means is a = b.operator+(c).
No, I am missing several things here.
Lets skip around a bit. First + (the plus symbol) is a binary operator as in:
int a, b, c;
a = b + c;
That means it has two arguments. To write this in the form of a function we would use the format:
result = add( y, z );
So there should be two arguments in the declaration. But when I write this in the dot h file:
CC operator+( CC &source1, CC &source2 )
The compiler says:
error C2804: binary 'operator +' has too many parameters
That seems to be in direct contradiction of the form:
a = b + c;
The addition operator has three variables, one left and two right.
As the values are being put in x, and read from y and z, it seems that the function is being run from the perspective of object x.
What am I missing?
I have another question, but lets take this one point at a time.
Thanks for your time
|
|
|
|
|
bkelly13 wrote: That means it has two arguments
Yes, it is just written down differently.:-
a=b.operator+(c); The First argument is the object carrying out the addition, the second argument is the item being added. I.E. the Operator+ MEMBER FUNCTION adds a value to the object from which it is called, and passes the result, without modifying itself,
The form c=add(a,b) is typically a global addition function.
Answers to the other issues you raised follow directly when you grasp the concept of the above.
Regards
Bram van Kampen
|
|
|
|