|
I build MFC project,
and want now to add html-help to it.
Evedently there is instruments how to convwert resource.h
and project.rc
to html-help project.
Or else way of assighning resources IDs to html-help.
Can you advice better one?
For html files is it better to use extenal editor?
Need be connected to system of html-help creation ?
what is the better practice in this case?
thanks.
|
|
|
|
|
Could you be more precise?
What do you want to do, contextual help or "standard" help?
New, what do you own the world?
How do you own disorder?
|
|
|
|
|
I declared a varible as a SYSTEMTIME type in my code as:
SYSTEMTIME st;
how to make its value one minute later or one hour later?
Thank you in advance!
|
|
|
|
|
st.wMinute += 1; or
st.wHour += 1;
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
yep. but watch for 25th hour an 61st minute . I played with that stuff for an hour until I realized my horrible mistake
|
|
|
|
|
That sounds a little difficult,I think.
You should care about many things, such as the rolling-over problem, including second to minute,minute to hour,hour to day, day to month, month to year and so on, in which you should also consider the leap problem, whether there are 28 days, 29 days, 30 days, or 31 days in a month.
Can you bring out a better way?
Here is one I can't still have enough condidence.
Convert the varible into a FILETIME or LARGE_INTEGER varible, and then increase the new varible's value. At last convert the varible back.
Herein we know "FILETIME structure is defined as a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601", however I don't know the definition of LARGE_INTEGER
Can somebody tell me some better ways or my last quetion?
|
|
|
|
|
if you look to the documentation for SYSTEMTIME :
It is not recommended that you add and subtract values from the SYSTEMTIME structure to obtain relative times. Instead, you should
- Convert the SYSTEMTIME structure to a FILETIME structure.
- Copy the resulting FILETIME structure to a ULARGE_INTEGER structure.
- Use normal 64-bit arithmetic on the ULARGE_INTEGER value.
instead LARGE_INTEGER you can use the __int64 on microsoft compilers
|
|
|
|
|
SYSTEMTIME sysTime;
..
..
..
CTime tm (sysTime);
tm += 60;
tm += 3600
sysTime.wYear = tm.GetYear();
sysTime.wMonth = tm.GetMonth();
sysTime.wDay..
sysTime..
sysTime..
|
|
|
|
|
Good
It is very simple!!!
Thank you!
|
|
|
|
|
The following sentence can work well for your the last five sentences.
tm.GetAsSystemTime(sysTime)
|
|
|
|
|
|
How to add right-aligned keystrokes to menu?
|
|
|
|
|
In the properties of the menu item.. in the caption field use a \t to "tab" the keystrokes.. like
ID: ID_FILE_NEW Caption: &New\tCtrl+N
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I've tried this, but the keystrokes are not rigth-aligned.
How can I make them aligned to the right?
|
|
|
|
|
Hi all,
I am creating an MDI Application which is using CRichEditView as one of its view. i am doing some processing and have to displaying a set of values in the RichEditView. but what is the way in which i can display the text in the CRichEditView. It is compulsory that i have to use the RichEditView since my data size is huge. can anybody send me a sample or help me in sorting out this. Plz tryin respond fast. I need it very fast.
Sreeramachandra G
|
|
|
|
|
Hi,
use CString to show data in RichEditView. Use Format() Function. "/r/n" as new line feeder. Set appropriate properties of CRichEditCtrl.
The chosen One
|
|
|
|
|
If I have a dialog window, I can dynamically disable a button like this...
GetDlgItem(IDC_BWHATEVER)->EnableWindow(FALSE);
But how do I dynamically disable the buttons in the system menu at the top of the dialog?
|
|
|
|
|
Use CWnd::GetSystemMenu to get a pointer to the system menu of your dialog, then CMenu::EnableMenuItem to enable/disable the items. Use SC_CLOSE, SC_MOVE, or SC_SIZE as menu ID's (see in winuser.h)
|
|
|
|
|
Hi, everybody,
How to create a project template from an existing project (in VC++ .NET2003)?
Thank you
|
|
|
|
|
Does someone knows what function to use to retrieve the standard width of a vertical scrollbar (or height of an horizontal one) ? Damned, I can't find back in MSDN!
Thanks in advance.
Regards
|
|
|
|
|
I have found!
GetSystemMetrics(SM_CXVSCROLL)<br />
GetSystemMetrics(SM_CYVSCROLL)
|
|
|
|
|
I've got a rookie question. In an SDI or MDI app, in the View Class I can get a pointer to the current instance of the Document class and I don't have to create a new instance of CDocument.
So ... If I have two independent classes, what is the procedure, what do I have to do so the classes see eachother without declaring new instances of them ?????
Thank you!
|
|
|
|
|
As you said, in your view-class, you have a CDocument-pointer.
You can then call functions on the pointer, just as if it were a local variable:
CDocument* pDoc [needs to hold the pointer to the current Document]
pDoc->ADocumentFunction();
But this way you can only access functions of the MFC-CDocument-class, not any extension you made in a derived class CMyDocument.
For this, you need to cast. But for that, you need to be sure that you are working with an instance of CMyDocument. But that is easy, unless in very special circumstances where your application can open different type of documents and you have made different classes derived from CDocument.
Here is how to cast:
CMyDocument* pMyDoc = static_cast<CMyDocument*>(pDoc);
This line tells the compiler to treat your CDocument-pointer as the CMyDocument-pointer that it really is and assign it to the variable pMyDoc . Subsequently, CMyDoc points to the same object as pDoc, but treats it as a CMyDocument instead as a CDocument (as pDoc does).
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
What I meant is communication between two generic classes, not necessarely the Document and the View class.
|
|
|
|
|
Ok, it works just the same.
The hardest part is to get a valid pointer of the class you want to access.
I typical use an extra constructor parameter, e.g. for access to the Document in dialogs, or special Set-functions (but I then normally make my pointer a const pointer to a const object and carefully test for non-nullness).
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|