|
this the code of TreeCtrl double click message
CGetList obj;
MessageBox("Tree selected Successfully","User",MB_OK|MB_ICONINFORMATION);<br />
obj.DeleteAllItems();<br />
obj.InsertItem(0,"www");
MFC programmer
|
|
|
|
|
Ok, so what is the error that appeared? I suspect it has something to do with obj not being associated with an actual control, thus DeleteAllItems() and InsertItem() would fail.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I suspect it has something to do with obj not being associated with an actual control
obj has assigned to the ListCtrl
so what is the problem?
so if u want the project u could see it only send me email on
m_fuad67@hotmail.com
|
|
|
|
|
In your previous code snippet, the comment indicated that obj was a CTreeCtrl . It also appeared to be a local variable rather than a member variable. What does the DoDataExchange () method look like?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I asked how could data exchanged between TreeCtrl and ListCtrl
I don't know how to fix problem
so what is the way for that??
is DoDataExchange()
plz help me
MFC programmer
|
|
|
|
|
m_fuad67 wrote:
I asked how could data exchanged between TreeCtrl and ListCtrl
When you take your car to the mechanic and ask him to take a look at the engine, it makes no sense to then show him the flat tire, ergo he starts the task of fixing the flat rather than the engine.
I assume you have a view with a tree control in the left pane and a list control in the right pane. Correct? Exactly what data is it that you want to share between the two controls?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I assume you have a view with a tree control in the left pane and a list control in the right pane. Correct?
ya u alright
in the left pane is the TreeCtrl and ListVtrl at right
so at TreeCtrl Names of poeple came ffrom the data base
and when i clicked on the Item(name of the person) his/her information must appear at the ListCtrl after making a query from the database
so how could solve the problem that appeared when i insert new data in the ListCtrl
MFC programmer
|
|
|
|
|
I assume that the tree control is populated from a data structure (e.g., array, list) of some sort that holds all of the details. For each node that is added to the tree control, call SetItemData() with a pointer to one of the items in the aforementioned data structure. When an item is selected in the tree control, call GetItemData() to get access to the data. Now clear the contents of the list control and populate it with the data that was obtained from the call to GetItemData() . When the tree control needs to communicate with the list control, use PostMessage() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
use PostMessage()
Thanx alot
MFC programmer
|
|
|
|
|
PostMessage()
I tried to send the data but how could I recieve it????
MFC programmer
|
|
|
|
|
how to change the state of the tree control which is shown as +.
i want to change this to - .
ditty grail
|
|
|
|
|
Use CTreeCtrl::Expand() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i hav a CView derived class in which i draw Records (some data) row by row.
Now i must implement drag n drop on these rows to change their display order.
I did it, but i need a 'drag image' while dragging the rows. The 'drag image' will be the image of the row on which i started the drag.
what should i do to associate the image to the mouse..
can anyone help ???
regards,
abin
|
|
|
|
|
I get the error:-
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\wchar.h(437): error C2011: '_stat' : 'struct' type redefinition.
I have checked all my header files to see if any included more than once.
The only way I can get the program built is to comment out the following lines in this (Visual Studio wchar.h) file!
#if !__STDC__<br />
<br />
#endif /* __STDC__ */<br />
I am worried that this will cause me problems later.
Are they anything I can do to overcome this problem?
Cheers,
|
|
|
|
|
sweep123 wrote:
#if !__STDC__
the syntax is not correct...
replace with #if !defined(__STDC__)
or with #ifndef __STDC__
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Both options produced the same error (C2011) when comments removed.
This is a Microsoft file, so should we be modifing it?
|
|
|
|
|
sweep123 wrote:
This is a Microsoft file, so should we be modifing it?
wow, absolutely not !!!
i thought it was one of your when you told you commented on... never do this !!!
however, don't you create a struct in your files that is in fact already defined in the library ? if so, change your structure identifier...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I have searched my project to ensure that no types/structures have the name stat.
None present.
Still confused, but thanks for your help.
PS Still have the Visual Studo file with my commented out section.
|
|
|
|
|
sweep123 wrote:
I have searched my project to ensure that no types/structures have the name stat.
but what about _stat as the compiler says ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
The result of the search as follows:-
Find all "_stat ", Subfolders, Find Results 1, Entire Solution, "*.*"<br />
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\wchar.h(421):struct _stat {<br />
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\wchar.h(493):_CRTIMP int __cdecl _wstat(const wchar_t *, struct _stat *);<br />
Total found: 2 Matching files: 1 Total files searched: 101
Are they any tools hidden away in Visual Studio to help wit this problem?
|
|
|
|
|
Try to use /P compile key it will produce *.i file in which you can find where is was already defined.
|
|
|
|
|
Hi guys
I have an application which reads from an Excel sheet. The application reads from the sheet properly till a specific row is reached. After that the next row is not read properly and the subsequent read returns blank data.
Please help me with suggestions...
Regards
Sreekanth Muralidharan,
Corporate Systems Consultant [Embedded Systems],
INDIA
|
|
|
|
|
i created a buffer,
how do i reduce the size of lpBuffer without losing the initial items in it.
LPBYTE lpBuffer;
lpBuffer = new BYTE[5000];
lpBuffer[0] = 'h';
lpBuffer[1] = 'i';
easiest way to make lpBuffer smaller size?!
Any help is appreciated thanks!
Mepho
|
|
|
|
|
|