|
How is hItem declared? Make sure it is an HTREEITEM , otherwise you may be using the wrong overloaded InsertItem method!
|
|
|
|
|
|
Anonymous wrote:
so?
Bad news... The error must come from somewhere else.
|
|
|
|
|
And if you try to specified TVI_ROOT and TVI_LAST ?
HTREEITEM hItem = myTree.InsertItem("HELLO",0,0,TVI_ROOT,TVI_LAST);<br />
HTREEITEM hItemChild = myTree.InsertItem("HELLO 1",0,0,hItem,TVI_LAST);
|
|
|
|
|
Thanks, but it is still not working. The filling of the tree is okay. The data is in the tree. The problem is that is crashed when I click on the root item or if I say expand.
I did it without the wizard - so what do i have to take into account? are there any messages i have to process for clicking on an item?
|
|
|
|
|
Run the Debug Build from VC++ and do stack backtrace when the crash happens, and then out work why. Debuggers are very usefull tools.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
hi all,
I want to display some text in the reverse order ,like If the string is
"Read
Some text
today!"
it should come as
"daeR
txet emos
!yadot"
around some reference line
Is there any opengl funtion to do the same, or how should I do it?
ajit
|
|
|
|
|
render texture mapped text (as you usual do, e.g see www.gametutorials.com) and flip transformation matrix?
|
|
|
|
|
How can I set the text in a static control programmatically?
How can I make it appear even in de middle of hard processing? (I want to do this as information to the user about what process is being done?
Thanks,
F
|
|
|
|
|
Using MFC? Then use SetWindowText . If the static control does not update automatically, then immediately issue a InvalidateRect(NULL) followed by a UpdateWindow .
Have fun!
|
|
|
|
|
Superb!
Thanks a lot! That's exactly what I needed!
F
|
|
|
|
|
Hi,
I'm in developing a large project with Visual C++ .NET.
I have several SDI applications and a set of dialogs shared between SDI application. I want to create a MFC Extension Dll that can be included most common dialogs of my project.
I've successfully created a .dll with test dialog but I've confused about invoking the dialog from SDI application. The problem is that invoked dialog is not modal for SDI application (I can switch between SDI application and invoked dialog). In additional, the invoked dialog has an button on taskbar. See picture dialog.gif[^]
My question is: How to invoke a "true" modal dialog from MFC Extension Dll ?
What settings must have this dialog to be invoked as "true" modal dialog (currently, the settings are default) ?
Yours sincerely,
Alex Bash
|
|
|
|
|
I need to explain what I do:
Step 1. I made MFC Extension DLL with Wizard
Step 2. I added to Extension DLL a new class CMyDialog derived from CDialog
Step 3. I added to Extension DLL a new GENERIC-class CExportData to export data & functions
Step 4: I added to CExportData function CallMyDialog():
void CExportData::CallMyDialog()
{
CMyDialog md;
md.DoModal();
};
Step 5: I made a call from SDI-application:
CExportData ex;
ex.CallMyDialog();
Step 6: I got the CMyDialog, but CMyDialog is not modal. I can switch between SDI application and CMyDialog,
What's wrong?
Yours sincerely,
Alex Bash
|
|
|
|
|
I am not "skilled" in Visual C++ programming but I am learning... 8-)
I installed BoundsChecker in Visual C++ 6.0 SP5 using WinME.
Every time I compile a program I obtain the same following error:
Resource leak: allocated by LoadLibraryA in dllinit.cpp (505), HANDLE: 0x7A880000
Location of Error DllMain dllinit.cpp 505
I do not know how to correct it.
Why this happens and how solve it?
Thanks.
Piccinano
|
|
|
|
|
Unfortunately quite a lot of the MFC code contains leaks which you cannot do anything about. Look at the call stack for each leak and if it occurs due to one of your own functions doing something, you should be able to fix it. If not, you will just have to ignore it. I think in boundschecker you can set it to ignore known MFC leaks etc. I havn;t got it installed on my PC at he moment, so I cannot point you directly to how to do that.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
|
i create the edit box and try to get the user input, but the user can only key in numerical value but cant input character set from keyboard. y izzit like that
|
|
|
|
|
Do you have switched on "Number" in the Edit boxes styles (in Resource Editor)? What you describe is exactly the behaviour of that style.
The "Number" style is completely useless: It does really only accept numbers, not a minus-sign and no decimal point.
(I hope the responsible Microsoft programmer gets spanked for this in regular intervals (at least weekly) )
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
yeah, i did, thks for the help
|
|
|
|
|
Hi,
I need to show a city map in my program with the ability to zoom in and out, mark locations, like street crossings, houses by using flags. I am searching for reusable components. Please help.
Thanks in advance.
B.
|
|
|
|
|
I want to download it at microsoft webpage ,but it appears
"...We will not be offering this DDK as a download on this Web site..."
where can I download it free?
Don't look at me in that way!
|
|
|
|
|
Does anyone know of a CVS plug-in for VisualStudio.NET? Cheers
|
|
|
|
|
hi,
I saw the API'S called ,while notepad or any window based application through one utility called API spy.Here I thought that the basic window that OS is painting/Drawing is through the GDI.But the list of Api's I got is not suffient to draw a window. It just shows me normal user done painting like TextOut\BitBlt..etc not the actual windows painting.
How the actual windowing system gets painted? I meant,It is using only a GDI or something else is also uner the Hood?
Vikram
|
|
|
|
|
It's been quite a while since I've looked at my old coding projects (nearly a year) and now trying to get it to work on Visual C++ rather than Linux/cygwin I find it doesn't quite work
I got stuck here. Vertex is a class that I've defined. The error for this code is list' : use of class template requires template argument list
void inline LeftEdge(list<Vertex>::const_iterator &itr, const list<Vertex> &list, const int dir)<br />
{<br />
switch(dir)<br />
{<br />
case -1:<br />
itr++;<br />
if (itr == list.end())<br />
itr = list.begin();<br />
break;<br />
case 1:<br />
if (itr == list.begin())<br />
itr = list.end();<br />
itr--;<br />
break;<br />
default: break;<br />
}<br />
}<br />
<br />
void inline RightEdge(list<Vertex>::const_iterator &itr, const list<Vertex> &list, const int dir)<br />
{<br />
if (dir == 1)<br />
LeftEdge(itr, list, -1);<br />
else LeftEdge(itr, list, 1);<br />
}
And this doesn't work either.
list<Vertex>::iterator erase[vertexList2D.size()];
Any help or insight would be greatly appreciated, thanks!
|
|
|
|
|
What about the fact that you have the list template datatype, and you are trying to name one of your variables list?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|