|
//function
BOOL& EvaluatingEditChecks()
{
CRreFrameWnd* pRreFrameWnd = ::RreGetMainWnd();
ASSERT (pRreFrameWnd);
return pRreFrameWnd->m_bEvaluatingEditChecks;
}
//calling code
::EvaluatingEditChecks() = TRUE;
int nEvalState = pEditCheck->m_pExprRoot->Evaluate(pRreDlgEntry);
::EvaluatingEditChecks() = FALSE;
Can you explain what assigning true and then false to a fuction means?
thanks
|
|
|
|
|
It is equivalent of the following
//calling code
// ::EvaluatingEditChecks() = TRUE;
CRreFrameWnd* pRreFrameWnd = ::RreGetMainWnd();
ASSERT (pRreFrameWnd);
pRreFrameWnd->m_bEvaluatingEditChecks = TRUE;
int nEvalState = pEditCheck->m_pExprRoot->Evaluate(pRreDlgEntry);
//::EvaluatingEditChecks() = FALSE;
CRreFrameWnd* pRreFrameWnd = ::RreGetMainWnd();
ASSERT (pRreFrameWnd);
pRreFrameWnd->m_bEvaluatingEditChecks = FALSE;
|
|
|
|
|
The function returns a reference to a variable. So setting the function to true is actually setting the variable it returns to true.
They do it that way becasue it makes generating code from wizards etc. easier. I wouldn't make a practice of that code technique in normal code.
Todd Smith
|
|
|
|
|
hi all,
i have an MSChart control in my application. the values are calculated dynamically after some user input, i have one row (group of data) and several columns. i use a barchart type.
i want to change the color of a specific column if its value exceeds a limit. how do i manipulate the color drawing of a column ? the answer should lie somewhere in the CVc..classes but i m lost there.. any help ?
my error(?) code :
CVcPlot aplot = m_pChart->GetPlot();
CVcSeriesCollection aSerCol = aplot.GetSeriesCollection();
CVcSeries aSeries = aSerCol.GetItem(1); // i have 1 series only
CVcStatLine aStatLine = aSeries.GetStatLine();
CVcColor aColor = aStatLine.GetVtColor();
aColor.Set(120, 120, 120);
and saw no change in the color of the bar..
tia, giorgos
|
|
|
|
|
I´m trying to store a buffer received from a server in a CString.
The buffer contains data of users connected to server.
Everything works fine until i connect 4 users and refresh.
Then an assertion occurs in this line:
csRcv.GetBufferSetLenght(nRecvlenght);
Any Idea???
I´m very on this.....
HELP PLZ!
|
|
|
|
|
Thats a very dangerous function to use. Are you sure, you need to use it. Are you calling ReleaseBuffer anywhere before this line? Have you called GetBuffer? and what about the value of nRecvlength?
Nish
|
|
|
|
|
Hi,
About 8 years ago I used to develop in C++. That was back in the DOS days when Borland Turbo C++ was king. I mention this so you won't laugh when I tell you that for the past number of years I’ve been writing code in VB.
Recently, though, I installed the VC++ and have started to use it for a few DLLs. But now I’m wondering where to begin with developing a GUI in VC++? I went thought the scribble example in MSDN, so I know about Documents, Frames, and Views. But how do you use real controls in a window. Everything I see about controls seems to talk about placing controls in a dialog box. I’m not interested in creating a dialog-based app. I want an MDI app with child windows but I don’t know how to add controls to a child window. Could someone give me a few pointers? Maybe a web page that explains this.
Thanks!
Carl
|
|
|
|
|
Derive your view from CFormView
Or manually create your controls using CreateWindow,CreateWindowEx
Nish
|
|
|
|
|
MFC has a special view type called CFormView, this is basically a dialog inside a view. Search http:\\msdn.microsoft.com for more info.
Michael
|
|
|
|
|
Thanks guys,
CFormView was the key.
Carl
|
|
|
|
|
Don't you hate it when you work hard on your project, only to find your client isn't so impressed just because of what it looks like on the outside?
If you need help with graphics and user interface layout, Z Web Graphics can help. We specialize in working with developer's to give your project the image it deserves. We know how hard you work behind the scenes, and we will help you reflect that on the surface.
All you have to do is email us at info@zwebgraphics.com, or fill out our customer profile form located on our website at www.zwebgraphics.com. It all can be done via email, by you telling us a little bit about you and your project, then we can begin designing mock up layouts, and sending you graphics via email. It is all very easy, and very inexpensive.
Contact us at info@zwebgraphics.com or visit our website at www.zwebgraphics.com for more information.
Z Web Graphics
a programmer's best friend
|
|
|
|
|
You know, I'll bet Chris would be pleased to sell you some space, here on CodeProject, for your add...
Just keep it out of the forums!
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I would join in Anders in urging everyone not to consider doing business with people who have no idea of Netiquette and think they can get a free ad out of the forums instead of placing an ad on the site where it belongs.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
|
I have created a simple dialog and want to capture when a user presses a key, I have tried handeling the WM_KEYDOWN and WM_KEYUP events but they don't seem to get called! any ideas??
andy solman
|
|
|
|
|
You're must capture its in the PreTranslateMessage function!
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Your problem is that keystrokes in dialog boxes are handled differently to other window types. Create accelerators for each key you wish to process, override PreTranslateMessage , and call TranslateAccelerator for the messages instead.
---
Simon
decided that his 'ironlung' nickname sounded kinda stupid, so he decided to use his real name
|
|
|
|
|
Hy everybody!!
I'm new in Visual C++, and have a litle question...
Does anybody knows how can I deselect an item in a CTreeCtrl?
thanks all for the attention
cheers from brazil!!!
|
|
|
|
|
Send the TVM_SELECTITEM message and set lParam to NULL.
That will deselect all selected items.
Nish
|
|
|
|
|
Hi,
I want to send an email using C++. I have seen PJ Naughters MAPI encapsualtion class which I think will do what I want. The thing is that I need to use a dial up connection so this means I need to open the connection, send the email and then close the connection.
So, how to manage the opening and closing of the connection?
Cheers
James Spibey
Well cover me in honey and throw me to the lesbians!
|
|
|
|
|
You need to take a look at RAS. (Remote Access Service).
There's a couple of articles here on CodeProject that shows how to do that. Just search for RAS...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|
How can I enable-disable, show-hide system buttons (minimize, close etc.) runtime (buttons in the top right corner of dialogs)?
Thanks in advance
|
|
|
|
|
You can write this:
hMenu=GetSystemMenu(hDlg,TRUE);
EnableMenuItem ( hMenu, SC_CLOSE, MF_BYCOMMAND | MF_DISBALED);
|
|
|
|
|
I have not the menu!
I want get pointer to the buttons into the caption of Dialog (Help and Close)!
|
|
|
|