|
I want to add some icon to my tree control, so I do like this:
CImageList m_imageList;
m_imageList.Create (IDB_TABLE, 32, 0, RGB(255, 255, 255));
CImageList *p_imageList = m_treeTable.SetImageList (&m_imageList, TVSIL_NORMAL);
HTREEITEM rootItem = m_treeTable.InsertItem(_T("RootItem"), 0, 0);
m_treeTable.InsertItem(_T("item 1"), 0, 0, rootItem);
HTREEITEM aItem = m_treeTable.InsertItem(_T("item2"));
m_treeTable.SetItemImage(aItem, 0, 0);
When I execute program, the dialog create small spaces for images but without any image.
Does anyone know why? Thanks in advance,
modified on Wednesday, May 28, 2008 3:39 AM
|
|
|
|
|
You are creating the image list on stack.
Make the imagelist variable a calss member.
|
|
|
|
|
oh, it works. Thank you very much, SandipG
|
|
|
|
|
Hai all
i am going to develop a application in c++ its aim is
1. To calculate internet usage (download and upload).
myself have no idea regarding this. please give the idea that is
is any api is available for this purpose.
Thanks in advance
modified on Wednesday, May 28, 2008 3:42 AM
|
|
|
|
|
Can you elebrate the idea, what exactly you want?
|
|
|
|
|
just to know how much upload and download datas are done so far in internet.
|
|
|
|
|
|
Hi,
I have one ListView that has 4 coloumn and in 4 th colom I am creating filled rectangle with color and drawing text using DrawText() method. But whenever I minimise or resize the winodw 4 th colomn disappear, How can I paint it.
|
|
|
|
|
pther wrote: But whenever I minimise or resize the winodw 4 th colomn disappear, How can I paint it.
It may be because you have painted it from a wrong function. From which function did u call the DrawText().
|
|
|
|
|
Drawings are not saved by Windows. Instead, when the window needs to be repainted, a WM_PAINT message is sent to it so that it can draw itself. So, if you don't put your drawing code into the OnPaint function, then it will be lost the next time your window is repainted.
|
|
|
|
|
Hi all,
i want to use the DatetimeCtrl as a button and use an Edit box along this.
how can set the selected date valuse in Edit box.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
Hello,
I have an application which is on the verge of completion .In there I have about 24 classes derived from MFCs and 15 generic classes apart from the 2 classes that are MainFrm and app class .
Now while editing any of my programs if I press the ENTER key the the cursor takes about 20 secs to come to the next line.
This doesn't happen with Word ,Excel.So concluded that there must be some problem with the my application rather the memory of my computer.
I should now reduce the size of my application.
But how should I do that?Or Is there any other problem?
Regards
Pritha
|
|
|
|
|
prithaa wrote: Now while editing any of my programs if I press the ENTER key the the cursor takes about 20 secs to come to the next line.
Which application ?? You mean the IDE (visual studio), or your own application ? What are you doing there when you press enter ?
Did you try to see what is taking so much time ?
|
|
|
|
|
Hello
Thanks Cedric
When I am in my Workspace typing or editing my programs at that time the cursor takes 20 secs to come to the next line if an ENTER is pressed.
Pritha
|
|
|
|
|
prithaa wrote: I should now reduce the size of my application.
Close the IDE and delete the .ncb and .opt file in the project folder. Then restart the msdev.
|
|
|
|
|
Hello,
Thanks.It is done.
If you are not annoyed when I ask
What are these files are and when should I delete them?
Then please answer.
Thank you .The problem is solved.
Pritha
|
|
|
|
|
.ncb file is the intellisense database file.
The .opt file contains the build logs.
|
|
|
|
|
hi
i have an MFC dialog based application...based in a my own class not CDialog..
when i insert a new dialog and create a new class ... icouldnt find my own class in the drop down list..where about two weeks ago i inserted anew dialog and founnd my class among the base class...
what did go wrong ....its really confusing and driving me crazy....
pleease help me with this...my work has stopped because of this
thank u all
|
|
|
|
|
First Check your file are added to you project. if it is already added, try deleting the "clw" file in the project folder.
|
|
|
|
|
lahom wrote: i have an MFC dialog based application...based in a my own class not CDialog..
Your class is derived from CDialog?
lahom wrote: icouldnt find my own class in the drop down list..
You mean in the dropdown list of class wizard?
if so, I think your Project's classWizard information might be corrupted. It often happens. You just take your project directory, then delete - *.clw . Now load the project in visual studio and press Ctrl+W . It will take the class wizard.
Since the classWizard info is deleted, it will show a dialog and ask whether to regenerate it. Press yes and it will show a dialog to select source files. Add All your source files. I hope, now you can see your new dialog class in class wizard.
Does this solves? or your problem is something else?
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
do not edit the code generated by wizard anytime
if you wish to use wizard always.
|
|
|
|
|
Hello,
I made an application with a few classes developed by me.Then I made a dll for the classes which act as the base classes for developing my application.
But when I develop an application with this dll the application gives Unhandled Exception .If I develop an application using my base classes then the application is developed and works fine.
Is there something that must be missing while making the dll?
I went through the steps mentioned in a book for making the dll and the dll is been made.
Regards,
Pritha
|
|
|
|
|
Did you try using your debugger ?
|
|
|
|
|
prithaa wrote:
But when I develop an application with this dll the application gives Unhandled Exception .
Please provide the details of exception. if you press Ctrl+C in the Messagebox, the entire message will be copied to clipboard. FYI.
prithaa wrote: If I develop an application using my base classes then the application is developed and works fine.
Your class depends on MFC? did you forget to add AFX_MANAGE_STATE(AfxGetStaticModuleState( )); as the first line of all exported functions? Just possibilities. Provide more info, then only we help in isolating the issue.
regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|