|
FindNextFile API function or CFindFile MFC class.
Like it or not, I'm right.
|
|
|
|
|
Ah, so trivial. I can't believe I missed it Thanks!!
|
|
|
|
|
When I try to envoke the class wizzard I get the following error:
Parsing error: Identifier Expected.
Input line: ";"
Ok
Anybody know how to resolve this problem? Any help would be sincerely appriciated as I'm dead in the water.
Thanks!
|
|
|
|
|
How does the .clw file look like. You can edit it and restore it.Otherwise delete the .clw file and press Ctrl+W in the resource editor screen. This would restore the clw file
|
|
|
|
|
that fixed it.
Thanks!!!!!!!!
|
|
|
|
|
Is your program in a compilable state now? Are there compilor errors?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
First off, I am using VS.NET. I have a dialog application which will compile fine in debug mode, however it does not compile in release mode. When I compile it in release mode I get the following error:
D:\Program Files\Microsoft Visual Studio .NET\Vc7\atlmfc\include\afxwin2.inl(1034): error C2039: 'Enable3dControls' : is not a member of 'CWinApp'
I know that in VS7 the Enable3dControls function has been deprecated and doesn't need to be called.. and it isn't anywhere in my dialog application either. For some reason it's not passing the assert on line 1034.
Has anybody seen this before? Any ideas on what I need to include, define, etc. to make it go away?
Thanks in advance,
Travis D. Mathison --- Travis D. Mathison --- --- After three two days without programming, life becomes meaningless ...
|
|
|
|
|
What is the problem with removing the line altogether
|
|
|
|
|
In my CString variable, a "&" character can be in it. When it is displayed in a messagebox or in a dialog in converts the "&" to underline the next character. Is there a way to turn this feature off so it displays the "&" as an "&"???
-Raffi
|
|
|
|
|
Select the "No prefix" style of the offending control static text control. This will cause ampersands to be displayed normally, instead of underscoring the following character.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
thx alot
-Raffi
|
|
|
|
|
I want to display a dialog as a modeless one. And my code is:
CMyDialog *pDlg;
pDlg = new CMyDialog();
if ( pDlg != NULL )
if ( pDlg->Create(IDD_DLG_MY, this) )
pDlg->ShowWindow(SW_SHOW);
but where should I delete the pDlg? If I don't delete it, it causes memory leak.
Thank you very much!
|
|
|
|
|
make pDlg a member variable of the class that creates it. then delete pDlg in the destructor for the owning class.
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
After you have destroyed the window. Or not using it anymore i would think...
|
|
|
|
|
Modeless dialogs are usually deleted in the OnNcDestroy routine. Just add that message handler and do a "delete this".
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hi Tim, I add the following code to myView:
in myView.h:
afx_msg void OnNcDestroy();
in myView.cpp:
ON_COMMAND(WM_NCDESTROY, OnNcDestroy)
void CMyView::OnNcDestroy()
{
delete this;
CScrollView::OnNcDestroy();
}
But it is not called. And the memory leak is till there. How should I did it?
|
|
|
|
|
You should add this code to your DIALOG. delete this.....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Got it. Get it working now. No memory leaking, no warning. Thank all of you a lot!
|
|
|
|
|
Do you need to use a pointer?
CMyDialog Dlg;
if (Dlg.Create(IDD_DLG_MY, this))
Dlg.ShowWindow(SW_SHOW);
Like it or not, I'm right.
|
|
|
|
|
Read this :-
http://www.codeproject.com/useritems/gettingmodeless.asp
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Nice article. Thank you!
|
|
|
|
|
Click, ItemSelect, etc.?
I've noticed that when you click it or do some action on it, i don't get a WM_COMMAND message and i don't get the name of the control in the wParam parameter.
Thanks
|
|
|
|
|
Select the control in ClassWizard and choose a notify message handler for the appropriate notification.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hello,
Here is some code.. I am trying to double buffer my CListView MDI app.. I am getting all kinds of really weird drawing.. Alot of this code is from a CListCtrl double buffer.. I am trying to use it.. Anyone want to see if they can find some problems.. Thanks!!!
CRect rc;
GetParent()->GetClientRect(&rc);
if (rc.Size() == CSize(0,0))
return;
CPaintDC dc(this);
CDC MemoryDC;
CBitmap Bitmap;
CBrush Brush;
CRect rcWnd;
GetWindowRect(&rcWnd);
int rcWndW = rcWnd.Width(), rcWndH = rcWnd.Height();
MemoryDC.CreateCompatibleDC(&dc);
Bitmap.CreateCompatibleBitmap(&dc, rcWndW, rcWndH);
CBitmap *pOldBitmap = MemoryDC.SelectObject(&Bitmap);
Brush.CreateSolidBrush(RGB(255,255,255));
MemoryDC.FillRect(&CRect(0,0, rcWndW,rcWndH), &Brush);
CWMPaintHook hookHeaderCtrl(GetListCtrl().GetHeaderCtrl()->GetSafeHwnd(), MemoryDC);
Print(&MemoryDC, PRF_CLIENT|PRF_CHILDREN);
Print(&MemoryDC, PRF_NONCLIENT);
CRect rcDraw = rc - rc.TopLeft();
dc.BitBlt(rc.left,rc.top, rc.Width(),rc.Height(), &MemoryDC, rcDraw.left,rcDraw.top, SRCCOPY);
MemoryDC.SelectObject(pOldBitmap);
If you need more code, like from my .h let me know and I'll post it.
Thanks,
Rob
|
|
|
|
|
Never mind.. I just figured it out
|
|
|
|