|
better u delete the corrupted clw file. The classwizard can generate a new clw file if u took class wizard again.
nave
|
|
|
|
|
Thank you. I did not know that one can delete the clw file.
Fortitudine Vincimus!
|
|
|
|
|
TheinstruTara wrote: Thank you. I did not know that one can delete the clw file.
you can also delete NCB,OPT and SUO file too.. without much problem
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I know about NCB, I guess it is to do with resource information, but what do OPT and SUO files contain?
Fortitudine Vincimus!
|
|
|
|
|
http://www.codeproject.com/useritems/HTMLHelp.asp[^]
Dear all,
I fellow the step in this Guide to include the HTML help into my project....
However, it get a error....
HtmlHelp(this->m_hWnd, "good.chm", HH_DISPLAY_TOPIC, NULL);
error C2660: 'CWnd::HtmlHelpA' : function does not take 4 arguments
How to solve it????
Thanks a lot.
|
|
|
|
|
You should have asked this in the article instead, but I will try to help anyways.
BTW did you add htmlhelp.h to your source file and linked your program with htmlhelp.lib (both are included in the source download)?
John
|
|
|
|
|
Sorry for asking this stupid question here, because I must do this urgently!!
I just use the source to build and debug!!!??
But it get this problem.
|
|
|
|
|
Use ::HtmlHelp(this->m_hWnd, "good.chm", HH_DISPLAY_TOPIC, NULL);
The CWnd::HtmlHelp() function only takes two parameters.
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"
|
|
|
|
|
I saw that but the article that the link points to has a HtmlHelp function that takes 4 arguments.
John
|
|
|
|
|
John M. Drescher wrote: I saw that but the article that the link points to has a HtmlHelp function that takes 4 arguments.
Err yes. The global HtmlHelp() function takes 4 parameters... Or maybe I'm misunderstanding you...
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"
|
|
|
|
|
Sorry, You are correct...
John
|
|
|
|
|
You use from CWnd and Cwnd doesnt need to parameter or if you want to use parameter in Cwnd see in MSDN:
CWnd::HtmlHelp
virtual void HtmlHelp(
DWORD_PTR dwData,
UINT nCmd = 0x000F
);
whitesky
|
|
|
|
|
it's not all key in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" has display icon property.so I can't get icon's infomation.could anyone help me!
thanks sincerely!!
pls forgive me poor english syntax.
|
|
|
|
|
i'm having a problem linking my library to the library using Visual C++ 6.0/MFC an someone help me?
i went to Project-> Settings, selected "Link" pane, entered the path of where the Library is under "Object/library modules:" (Settings For : All Configurations)... but i still cannot link them together why is tat so? pls help me
|
|
|
|
|
we3Guy wrote: i'm having a problem linking my library to the library using Visual C++ 6.0/MFC an someone help me?
you can directly link your libaray using pragma directive:-
i.e. #pragma comment(lib,"YOUR LIBARARY") in stdafx.h file!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi fellows. I have a CWnd-derived class that has two CStatic members, that are created dynamically.
My question is simple: How do I do in order to receive messages of such members?
Any suggestion will be appreciated.
Regards,
FG.
A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.
|
|
|
|
|
If you're trying to handle notifications from them, you do it the same way you do other controls. Place an entry in the message map. The wizard won't do it for you, but you can do it manually.
Software Zen: delete this;
|
|
|
|
|
I already tried that, but didn't work...
Regards,
FG.
A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.
|
|
|
|
|
One other thing: when you create the static controls, you need to make sure you specify the SS_NOTIFY style, which enables the STN_* notifications.
Software Zen: delete this;
|
|
|
|
|
Do you have two static with a class derived(CStatic)
whitesky
|
|
|
|
|
No, it is not derived:
<br />
CStatic m_lblArrowUp;<br />
CStatic m_lblArrowDown;<br />
<br />
<br />
m_lblArrowUp.Create(_T(""), WS_CHILD | WS_VISIBLE | SS_BITMAP, rectUp, this, IDC_ARROWUP);<br />
m_lblArrowDown.Create(_T(""), WS_CHILD | WS_VISIBLE | SS_BITMAP, rectDown, this, IDC_ARROWDOWN);<br />
m_lblArrowUp.SetBitmap(LoadBitmap(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_VERTICLE_SCROLLBAR_UPARROW)));<br />
m_lblArrowDown.SetBitmap(LoadBitmap(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_VERTICLE_SCROLLBAR_DOWNARROW)));<br />
I have a CWnd-derived class and I'm creating a custom control. This control needs vertical scrollbar, so I'm using two bitmaps, one as de up arrow and the
other as the down arrow. I already placed them, now I need to receive the notification (the click notification).
Regards,
FG.
A polar bear is a bear whose coordinates has been changed in terms of sine and cosine.
|
|
|
|
|
I am looking for a way to add a16 X 48 matrix of owner drawn buttons to a small
utility I am developing in VC++ 2005. Can anyone direct me to specific articles
or code to accomplish this task. I want to preserve 2d addressing. Initialization
might go like:
private: System::Windows::Forms::Button^ Mybutton[][];
Chris
|
|
|
|
|
|
While boldly trudging through my first foray into MFC multithreading I encountered a problem.
Setup: I have a simple dialog-based app that launches a worker thread at OnInitDialog(). The dialog has one button (w/ event handler) and one edit box for output.
I want the main thread/dialog to do the following after the button is clicked:
1) Output "Foo" to the edit box
2) Give a "go ahead" signal/event to the patiently waiting worker thread
3) Wait for the "I'm finished" signal/event from the worker thread
4) Output an updated global integer ("iCount_") to the same edit box
Meanwhile, I want the worker thread to:
1) Wait for the "go ahead" signal/event from the dialog
2) Do some generic calculation (e.g. increment a global integer) while the main thread waits
3) Pause for a short time (e.g. 1 second) while the main thread continues to wait
4) Signal the main thread that it can stop waiting
[See the code from my crappy implementation below]
The word "Foo" should be displayed and then replaced by the updated global after 1 second, but that's not what occurs in my implementation. After OnBnClicked() is called, the edit box remains static for 1 second (no "Foo") before the updated integer is correctly displayed. What am I missing?
Is something in the bowels of MFC toying with my ignorance? Is this a class issue? Am I violating the windows-multithread prime directive without knowing it?
Any insight would be greatly appreciated.
"MyDlg.cpp":
...
BOOL CMyDlg::OnInitDialog()
{
...
iCount_ = 0;
hEventBeginWork_ = CreateEvent(NULL, FALSE, FALSE, NULL);
hEventWorkDone_ = CreateEvent(NULL, FALSE, FALSE, NULL);
hEventSleep_ = CreateEvent(NULL, FALSE, FALSE, NULL);
AfxBeginThread(WorkerThread, this);
...
}
...
UINT CMyDlg::WorkerThread(LPVOID p)
{
CMyDlg *pDlg = (CMyDlg *) p;
pDlg->WorkerThreadLoop();
return 0;
}
void CMyDlg::WorkerThreadLoop()
{
while (1)
{
WaitForSingleObject(hEventBeginWork_, INFINITE);
iCount_++;
WaitForSingleObject(hEventSleep_, 1000);
SetEvent(hEventWorkDone_);
}
}
void CMyDlg::OnBnClicked()
{
CString szCount;
m_editCount.SetWindowText("Foo");
SetEvent(hEventBeginWork_);
WaitForSingleObject(hEventWorkDone_, INFINITE);
szCount.Format("%d", iCount_);
m_editCount.SetWindowText(szCount);
} "MyDlg.h":
class CMyDlg : public CDialog
{
public:
...
HANDLE hEventBeginWork_;
HANDLE hEventWorkDone_;
HANDLE hEventSleep_;
int iCount_;
static UINT WorkerThread(LPVOID);
void WorkerThreadLoop();
...
CEdit m_editCount;
afx_msg void OnBnClicked();
};
-- modified at 18:26 Thursday 6th July, 2006
|
|
|
|
|
In your CMyDlg::OnBnClicked handler, you're calling WaitForSingleObject(hEventWorkDone_, INFINITE); . This blocks the UI thread, which keeps it from handling messages, which keeps it from updating the screen (and a whole lot of other things).
Blocking the message pump Is A Bad Thing, and yes, you have violated the Windows prime directive: Thou Shalt Process Messages If Thee Wishes Thine UI To Behave Properly.
As a rule, a better approach to communication between a worker thread and a window (e.g. the UI thread) is to have the worker thread use PostMessage to send user-defined messages to the window.
Software Zen: delete this;
|
|
|
|