|
Thanks Matthew,
1.
Matthew Faithfull wrote: This was already protected for sharing anyway as it normally would be between multiple users.
You rely on database lock? So, if you rely on database lock, there is no need to add additional lock on your inner component.
2.
I did some research and find MTA component is the same as free threaded component, right? Why do you distinguish them in your previous posts?
regards,
George
|
|
|
|
|
Hi all,
I m using a image list for TreeView.
How can change icon of TreeView Item On the click of CheckBox or Double click on that purticular item.
Thanks in advance.
|
|
|
|
|
You have a few choices. You can use TVM_SETIMAGELIST, with wParam set to TVSIL_STATE. That should replace the actual checkboxes.
Or you can react to NM_CLICK / NM_DBLCLICK, and change the image list index for an item, which gives you added flexibility.
There's a lot of "depends", depending on the finer details of what you're trying to do.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Please can u give some example of code.
|
|
|
|
|
ThatsMe. wrote: Please can u give some example of code
Nope! There's several stages in there.
Look up ON_NOTIFY, and NM_CLICK to write a handler to monitor for clicks.
Then TVM_HITTEST to find out which item was clicked.
Then TVM_SETITEM, with a tvItem.mask = TVIF_IMAGE to change the image index to something else.
Lastly, You may need to invalidate the control.
This is a decent chunk of work, but like most programming jobs, break it into bite size chunks.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
I need get icons 48x48 from system imagelist.
Function SHGetFileInfo can get list of icons 16?16 or 32?32.
But how I can retrieve 48?48?
This is needed for display list of disks in CListCtrl in view Tile...
|
|
|
|
|
Check out SHGetImageList()
|
|
|
|
|
hi
I have a application to display a message box after the application is closed . How can i do that , help me .
with warm regards
K.Guru Moorthy
k.guru moorthy
|
|
|
|
|
Well, if your application is terminated, you can't do anything from it anymore.
You mean that you want to display a message box when the main application window disapeared ? If yes, which kind of application are you doing ? SDI, MDI, dialog based ?
|
|
|
|
|
hullo sir, thanks for replying. it is a vc++ applikason.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
(1) Display the message box when your application is still running.
(2) Press down the Print Screen key on the keyboard.
(3) Close your application.
(4) Open MS Paint .
(5) Paste the image ( CTRL + V ).
(6) Enjoy you Message Box
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Create a service which monitor your application and call a MessageBox from your service whenever your application is closed.
|
|
|
|
|
Hi,
Try handling the WM_QUIT message in the application main window. Here you show a messagebox using ::MessageBox API with NULL window handle.
case WM_QUIT :
MessageBox(NULL,"Your Message","Your Message Caption",MB_OK);
i think this will help you.
thanks.
Nitheesh
|
|
|
|
|
Or When you want to exit your program you can run other exe file for show it.
|
|
|
|
|
Hello,
If anyone has any idea about compatibility of Detours with WinCE.
Or any study material anyone can suggest regarding this, please let me know.
Thanks in advance.
|
|
|
|
|
Hi all,
i m working on VC++2005, and my application is SDI type.
i split Mainframe in two parts(in columns),at one side i m using a TreeViewCtrl and other side i m using FormView classes,
i m replacing the views on the LButtonDown of TreeViewCtrl.
OnInitialUpdate function is not calling in FormView calss those are using in Replaceviews.
please anyone can tell me what can i do.
Thanks in advance.
|
|
|
|
|
If you look on www.msj.com, there was an article or two by Paul DiLascia that covered replacing views. Even if it takes a while to find, they're all really good reads, and informative.
I'm pretty sure there's an article or two on codeproject also.
Lastly, have a look to see when OnInitialUpdate is called for the first view. If it's done from the create frame code in MFC, and you're doing some mutant manual version, then the bug is *you're* not calling OnInitialUpdate.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
|
Hi,
The OnInitialUpdate is called only when the view is created. So delete the view you want to replace and then recreate it. Now the OnInitialUpdate will work fine.
thanks
Nitheesh
modified on Friday, April 4, 2008 7:57 AM
|
|
|
|
|
ThatsMe. wrote: OnInitialUpdate function is not calling in FormView calss those are using in Replaceviews.
Do you mean to use OnUpdate() instead?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
If it's like the code I remember, he'll be creating CTwoView, then killing COneView - and each time you create a new one, he's making sure its OnInitialUpdate member is called. Brush Pen creation etc.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Iain Clarke wrote: ...killing COneView - and each time you create a new one, he's making sure its OnInitialUpdate member is called.
I did this once, and it did not involve killing and re-creating. I created all of the views up front, and a method of my CSplitterWnd -derived class just activated the correct one, which, in turn, called that view's OnUpdate() method.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I think that depends on how many you need, and if you're switching backwards and forwards between them. You may have a large collection of choices, but only likely to use a few - in which case late creation would be best. I've used each approach on different projects.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Hi all,
I am having a folder and in that folder i am having some file...
Now i have written a code which makes this folder and write files in this particular folder.....
My problem is if folder is existing at that place then a new copy is been created with same name and having same file in previous folder only, where as what i want is to copy new files on previous files....
How to achieve this....
Can anybody please help me in this
Thanks in advance
|
|
|
|
|
You want to replace an existing file with a new one? If yes, show the code that you have written to do the same.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|