|
Steve,
Yes I am using WM_CLOSE message handling. After I disabled the WM_CLOSE message handler, I get a better result, but still not what I wanted. When I use the statement you provided without the WM_CLOSE, I still can see the dialog open and then close (although briefly). If I use the EndDialog(IDABORT) call, I never see this quick display of the window (desired effect).
Thanks,
Doug
|
|
|
|
|
Doug Allen wrote: I get some assertion errors if I use the destroywindow()
Are the assertion errors appearing during the DestroyWindow call or after it?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan,
From the earlier posts, you cn see that the assertion errors are caused after the DestroyWindow() is called due to m_HWnd being null. It doesn't seem right that you would call DestroyWindow() before the dialog is shown.
Thanks,
Doug
|
|
|
|
|
No, I didn't think it was clear where the assertions were. You can step into and out of DestroyWindow() without getting any assertions? Are you calling any other methods on the window after the call to DestroyWindow() ?
In any case, calling EndDialog() on a modeless dialog is a perfectly valid way of closing it.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan,
EndDialog is shown in MSDN as "Call this member function to terminate a modal dialog box". Another place directly quoted from MS "Do not call EndDialog to destroy a modeless dialog box. Call DestroyWindow instead." The EndDialog seems to be working just fine here without any problems, but I've all these referances where it states that EndDialog should not be used had me wondering.
|
|
|
|
|
Hi. I'm writing a report for a university honours project that must document the code for a piece of software I wrote. I was wondering if anyone knew the proper way of referring to a function of a specific class in a report. I don't want to keep saying "the function myFunc() in class MyClass"... are you supposed to use MyClass::myFunc() ?? ie. "the code to copy the array can be found in MyClass::myFunc()..." In code, the double colon is used to refer to static members, and these functions are not static... although it's also used for all function definitions outside the class definition...
btw it's important that I mention the class I'm referring to since I re-use function names in different classes.
Thanks in advance.
|
|
|
|
|
J-Dogg306 wrote: I was wondering if anyone knew the proper way of referring to a function of a specific class...
Functions within a class are referred to as a method.
J-Dogg306 wrote: are you supposed to use MyClass::myFunc() ??
That's acceptable.
J-Dogg306 wrote: In code, the double colon is used to refer to static members, and these functions are not static... although it's also used for all function definitions outside the class definition...
Technically it's called the scope-resolution operator.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Functions within a class are referred to as a method.
Technically, yes... and I know this is important to Java people... but don't a lot of C++ programmers still like the term function?
Would I be correct in saying that function refers to C++ routines in general, of which method is one type? The fact that you said "Functions within a class are referred to as a method"... and the fact that people use the term "member function", seems to imply that this is the case...
The reason I ask is because I'm writing a section of the report that discusses routines that the program registers with an API that it uses, to be automatically called on certain events. Some are static functions, some are members of classes, and I'd like a generic term to refer to either. It's a section too early in the report to burden the reader with what belongs to a class and what doesn't... the reader doesn't even know the names of classes yet... the section is just meant to point out where to look to find the code responsible for certain things, so the reader can follow along in subsequent sections, when I actually do delve into details... at this point in the report it's important for the flow of things that I use a consistent term.
Oh and I'd rather not use "routine"... sounds too general.
Cheers.
|
|
|
|
|
J-Dogg306 wrote: ...but don't a lot of C++ programmers still like the term function?
Yes, I use both interchangeably all the time.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
hi all,
how can i recognize a shortcut or a hypertext on file?
thanks.
MK.
|
|
|
|
|
Your question is a bit unclear. What file?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
a text file. Ex: .doc, .txt, etc...
|
|
|
|
|
Ok, what about them?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hello all people,
I need make a application that update the BIOS information:
Vendor name, BIOS Version, BIOS build date and more.
I used to know that I have to use the 52h function. I don´t know how complex is this task.
That app must run on DOS.
I really need that. Can be Basic, QBasic, Fortran, Cobol, Assembler, C/C++. Any DOS suported language!!
thanks all!
|
|
|
|
|
It's only been 61 minutes since you last posted this question. Courtesy dictates that you should at least wait 24 hours before getting overly excited and re-posting.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
On the bright side, he did wait an extra two minutes before doing the same on the General Discussions forum.
ColinMackay.net
Scottish Developers are looking for speakers for user group sessions over the next few months. Do you want to know more?
|
|
|
|
|
the question is:
Employee in Green Grocery Mart are paid each day based on the number of hours worked and an hourly rate of RM15. Construct a clss named Employee that has data members to hold the Name, hoursWorked and salary. The class should have member functions.
- constructor to initialize the object
- destructor to destroy the object
- set and get function for the employee name
- set and get function for the hoursWorked
- salaryPayment to calculate the pay for the employee
- show data to display the Employee information which are name, hoursWorked,
and salary
* please help me...i need it as soon as possible (urgent)
* i need the coding for the problem...
-- modified at 14:25 Monday 13th March, 2006
|
|
|
|
|
head dezee wrote: - constructor to initialize the object
Yes.
head dezee wrote: - destructor to destroy the object
Yes.
head dezee wrote: - set and get function for the employee name
Absolutly.
head dezee wrote: - set and get function for the hoursWorked
a Necessity.
head dezee wrote: - salaryPayment to calculate the pay for the employee
No way José!!
head dezee wrote: - show data to display the Employee information which are name, hoursWorked, and salary
You don't say !
so now, have you done anything for your homework ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
head dezee wrote: * please help me...i need it as soon as possible (urgent)
Sure. What time does your class end? If I get stuck doing this for you, can I ask the instructor for help?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
we need to resolve it within 2 hours... please...i need your help...now i'm not in the class....
* i need the coding for source file 1 , source file 2, and header file.... pleaseeeeee
this is the coding that i have make...i dont know why it have error
------------------------------------------------------------------------------
//employee.cpp
#include<iostream>
#include<string>
#include"Employee.h"
using namespace std;
Employee::Employee() // default constructor
{
EmployeeName=0;
hourWork=0;
}
Employee::Employee(const char NamaPekerja, double hour, double gaji)//overloading constructor
{
NamaPekerja=EmployeeName;
hour=hourWork;
gaji=salaryPayment;
}
Employee::~Employee()//destructor
{
cout<<"object destroyed!"
<
|
|
|
|
|
head dezee wrote:
we need to resolve it within 2 hours...
And what happens if it is not resolved within two hours?
head dezee wrote: now i'm not in the class
Why not? If you are not in the class, does that mean the problem ceases to exist, or has already been solved? Have others in the class been equally perplexed?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
the class will be continue within 2 hours... so i need to resolve this problem in 2 hours... this is my project.... i have make the coding but it have errors... i dont know why the errors exist....
|
|
|
|
|
What errors ? compilation errors ? run-time errors ? computation errors ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
compilation error....it said unidentified object...
|
|
|
|
|
In reference to what kind of object? You would stand a much better chance of receiving useful help if you'd volunteer just a wee bit of information rather than playing the 20-question game.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|