|
I just went through a similar problem.
Do an artical search for "sendmessage". The first artical listed is very good on how to use send and post message between classes, as well as using pointers for other classes.
Hope this helps
John
|
|
|
|
|
Hi John.
Thank you for the fast answer... but I don't find the article you mentioned... can you give me another hind how to find it ...
Helge.
|
|
|
|
|
Cant u pass a structure as a reference to the CACutBmp class from within th doc that the user modifies ?
|
|
|
|
|
Hi act.
Maybe that is what i should do... but i really do not know how to do it... Is it possible to find somewhere an example wich gives some further explanations on the how to ?
Helge.
|
|
|
|
|
You *may* be overcomplicating the issue.
You have CADoc, which hold CABmp.
You have a command IDC_CROP which you want
to pop up a box, input some coords, and crop
the bitmap.
In header.
class CADocument : public CDocument
{
....
CABmp m_Bmp;
....
afx_msg void OnCrop ();
};
In Cpp
...
ON_COMMAND(IDC_CROP, OnCrop)
...
void CADoc::OnCrop ()
{
CADlg dlg (AfxGetMainWnd ());
dlg.m_pBmp = &m_ABmp;
dlg.m_rcBmp.SetRect (0,0, m_ABmp.GetWidth (), m_ABmp.GetHeight ());
if (dlg.DoModal () != IDOK)
return;
m_ABmp.Crop (dlg.m_rcBmp);
SetModifiedFlag (TRUE);
UpdateAllViews ();
}
Just my thoughts. And there's a bunch to fill in...
Iain.
|
|
|
|
|
UpdateAllViews was a good tip too !
It's just working perfect for me, much better then UpdateWindow amd Invalidate and this stuff!
But i had to use UpdateAllViews(NULL) to make it work...
No idea why but no I'm happy ...
Many Thanks again Iain,
Helge.
|
|
|
|
|
If you look at the docs , it defines UpdateAllViews as:
void UpdateAllViews( CView* pSender, LPARAM lHint = 0L, CObject* pHint = NULL );
The pSender is an optimisation if you are calling this function from
a View.
void CMyView::OnPropagateAChange ()
{
CMyDoc *pDoc = GetDocument ();
....
pDoc->UpdateAllViews (this);
}
That would redraw all views of that document except this one. I've never needed
to call with anything other than NULL, but I can see why you *might*.
The other parameters are useful for other views to work out *why* they need
redrawing, in case they only need to do a partial job. In a simple app, you
can leave them at their defaults.
Iain.
|
|
|
|
|
Sorry I'm too dumb...
Now i find this nice faq here 6.2
http://www.codeproject.com/cpp/cppforumfaq.asp#cpp_runapp
where it's perfect described how to use global variables.
This point works just perfect for me.
So anyway thanks for your help,
Best regards,
Helge.
|
|
|
|
|
Bind a EDIT CONTROL or DATACOMBOCONTROL
Hi,
I am currently working on a program in VISUAL C ++ 6.0 (MFC) in which I would like to include an ADO DATA CONTROL 6.0 and a MS MASKED EDIT CONTROL or a DATACOMBOCONTROL .
The EDIT CONTROL is connected with the DATA CONTROL after program start-up.
All desired fields are indicated with the EDIT CONTROL.
Should the RECORDS SOURCE of the DATA Controls be changed or be limited during the runtime , the EDIT CONTROL looses the connection to the DATA CONTROL.
I have already tried everything REFRESH or BindProperty, unfortunately, without success.
I could not find a Solution to this problem or topic even in the Internet.
I would be thankful for a hint or for your assistance.
|
|
|
|
|
Listen in on the messages your window is recieving (Spy++ should work): note the differences between the messages recieved from clicking on the taskbar button, and those recieved when clicking on the menu. If they're the same, then your app probably has some problems pumping messages in a timely manner.
You left me high and dry and changed me
You lied to me and now i’m angry...
|
|
|
|
|
Hi,
I want steps to write Crystal Report file which is in RPT format and the data feilds are declared in the TTX file.
I want to populate the RPT file with the data from database in Access using TTX file.
This i want to do in vc++ 6.Need guidance.
Thanks to all....
ruturaj
|
|
|
|
|
HI Frnz,
plz help me..i tried out sample hello world Custom wizard which accepts text but when i click OK button in New Project Information Wizard , i get an error..anyone familar with custom App Wizard ..help me...
"ERROR MSG:
Custom AppWizard while Parsing template 'Root.cpp near line 209
undefined symbol DOC "
is there anything to get included...help me frnds
|
|
|
|
|
I would like to find exactly - polygon area calculation, but can't find it. So, if anybody know the web site with such algorithms?
|
|
|
|
|
|
That is a really simple solution. I shall remember that!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Attempting to compile my first IDL I keep getting the following error( using Visual Studio 7.1):-
Corba_Square error PRJ0019: A tool returned an error code from "Invoking TAO_IDL Compiler on c:\ACE_wrappers\Tao\examples\Simple\Corba_Square\Corba_Square\Square.idl"
The IDL compiles and generates the files when included in an example project supplied. I have checked all the settings and cant find anything to fix.
Does anyone know how to get rid of this error.
I am just trying to setup a project that can be used as a starting point for other projects (all the build, compiler and linker settings in place etc).
|
|
|
|
|
Tree controls are usually alligned at left, what I need is a tree control which expands like an organizational chart, (like hierarcy) like this
.................N
.....+++++++++++++++++
.....N.........................N
.+++++++++.........++++++++
N............N..........N.........N
where N's are nodes that can be expanded.
Please ignore the dots they are for just making allignment.
Please Help.
|
|
|
|
|
Hi.
I’m going to rebuild an Dialog based VC++ project into another. I would like to export and import some dialog resources between the two projects. Any idea how to do that except for cut and past in the .rc file manually…
_____________________________
...and justice for all
APe
|
|
|
|
|
Open up the project
select Dialog Resource from the tree
COPY
then close the project
Open the Destination project in the same studio window
Goto the Resource tree
PASTE
Trick is to do this in the same Studio window (not two windows opened and copy from one and paste in other)
hope it helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
SUPER!!
I've so long suffer with this problem...
You made my day, and my futher developing easier!!
_____________________________
...and justice for all
APe
|
|
|
|
|
Even easier.
Open up new project.
Switch to resource view.
Then load in previous rc file.
The old resources appear in the workspace.
Now right drag them to the new project,
and pick "Copy" from the popup menu which appears.
Nice and easy for several resources.
Iain.
|
|
|
|
|
Hi all:
I have a bunch of .wma files which is in "C:\Downloads" folder, and I copy them to another folder. So now there has two folders which have the same content concerning the .wma files.
What gets it really strange is that in details view within Explorer they have totally different amount of columns. In "C:\Downloads" folder these .wma files has lots of column such as "Artist", "Album", "release year" etc,. But in the other folder it only has "Type" and "modification time" two columns. How this difference could be happened since there's no environment differences, I really eager to know!
Thanks!!!
|
|
|
|
|
You can set folder details on a per folder basis,
just right click on the listview header in explorer and select what you want to see.
Arjan
|
|
|
|
|
You can switch on and off the columns that you want to be displayed via the menu item 'View->Choose Columns...', in Explorer. Or right click on the column header and select the appropriate column information.
I Dream of Absolute Zero
|
|
|
|
|