|
Do you have any knowledge of Drag and Drop, with anything? With a tree control?
You will receive the messages at the Tree Control level not the item level. You have to do the item level work from the control level message.
Does that answer your question?
|
|
|
|
|
led mike wrote: Does that answer your question?
No. I am not asking for coding details. I am asking about policy - should it be possible with a disabled item?
|
|
|
|
|
I guess that depends on what a grayed.disabled tree-view item means in the
context of the application.
My first thought is "no, it shouldn't be allowed" but a grayed item could mean anything
we choose it to.
I'm pretty sure that answered NONE of your question
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
get out of my thread you fish-napper!
|
|
|
|
|
Busted!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hans Dietrich wrote: I am asking about policy
Obviously I didn't get that from your OP.
Generally no, but there would certainly be exceptions based on your specific application. I mean it's a usability issue so if it makes sense from a usability stand point then, yes, do it.
Does that help?
|
|
|
|
|
Yes, you and Mark have confirmed my suspicion that there was no clear answer - unfortunately.
Both of you have pointed out that there is no way of knowing why items are disabled, and therefore there can be no general policy regarding dragging them.
So I guess I have an answer. Thanks!
|
|
|
|
|
Hans Dietrich wrote: Thanks!
Your Welcome. The bottom line is your user. If it will help the user do it. If it's going to be confusing for the user don't. If you can't determine that, which is very likely, then do some usability testing and find out.
|
|
|
|
|
Hi
I'm facing some problem in standard MFC application. In my application, I'm able to run only 3 insatnces of my application simultaneously.That is, i'm able to open only three login screens at the same time, but I dont want this limitaton. I'm currently working in Windows XP. However, when I ran my application in Windows NT, only 4 instances can ber run at a time. When I tried to open it fourth time in Windows XP, it gets crashed at the following line of code.
//winfrm.cpp
BOOL CFrameWnd::Create(LPCTSTR lpszClassName,
LPCTSTR lpszWindowName,
DWORD dwStyle,
const RECT& rect,
CWnd* pParentWnd,
LPCTSTR lpszMenuName,
DWORD dwExStyle,
CCreateContext* pContext)
{
HMENU hMenu = NULL;
if (lpszMenuName != NULL)
{
// load in a menu that will get destroyed when window gets destroyed
HINSTANCE hInst = AfxFindResourceHandle(lpszMenuName, RT_MENU);
if ((hMenu = ::LoadMenu(hInst, lpszMenuName)) == NULL)
{
TRACE(traceAppMsg, 0, "Warning: failed to load menu for CFrameWnd.\n");
PostNcDestroy(); // perhaps delete the C++ object
return FALSE;
}
}
m_strTitle = lpszWindowName; // save title for later
if (!CreateEx(dwExStyle, lpszClassName, lpszWindowName, dwStyle,
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
pParentWnd->GetSafeHwnd(), hMenu, (LPVOID)pContext))
{
TRACE(traceAppMsg, 0, "Warning: failed to create CFrameWnd.\n");
if (hMenu != NULL)
DestroyMenu(hMenu);
return FALSE;
}
return TRUE;
}
Can anybody please advise on this?
Chirag Kalra
|
|
|
|
|
Chirag_kalra wrote: Hi
I'm facing some problem in standard MFC application. In my application, I'm able to run only 3 insatnces of my application simultaneously.That is, i'm able to open only three login screens at the same time, but I dont want this limitaton. I'm currently working in Windows XP. However, when I ran my application in Windows NT, only 4 instances can ber run at a time. When I tried to open it fourth time in Windows XP, it gets crashed at the following line of code.
It looks like a lack of memory situation (or some other resource. Try running them while task manager is up and displaying resource usage.
Nathan
|
|
|
|
|
i want to write an exe program file,it can run stand alone,and also i want to make it possible that other programs can call functions exposed by the exe,just like call functions exposed by a dll file.
is that possible?
thanks for any reply.
|
|
|
|
|
Yes[^], just make sure to export the desired functions, just as you would do with a dll.
|
|
|
|
|
I have been checking the website to look for articles that explains how to make an instalator of an application coded. I didn't find many info. In one article I found one comment, where two third party programms are named. The "Inno Setup" and the "NSIS2". I would like to know what is your opinion about them (if you know them).
Any other information (like a link to an article that I didn't see, any other tutorial...) that can help me to know about how to do a "MyAppInstall.exe" will be wellcome.
Thank you for your answers.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
See this article http://www.codeproject.com/useritems/NSIS.asp[^]
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
|
|
|
|
|
My opinion about installers, in general, is that they can be a great waste of your development time. If you have a complex project to install and significant time to invest in creating an installer -- go for NSIS.
I hold the Nullsoft installer in high regard.
But, if you don't have the time and you don't need a fancy installer -- consider something simpler -- there's free commercial stuff out there. I use something called "Advanced Installer" (www.caphyon.com).
They have a free version!
I'd rather spend my limited time coding and debugging than futzing with the installer. And though installer seems like a small thing, trust me you will be investing some time in it.
Like all things in software, once you make a choice, you often have to live with it for a very long time. Choose wisely -- consider what works now and what will work later...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
hai all,
i want to know, if it is possible to lock a file, such that, nobody can delete it.
why i want this is, for my application, iam using file as the database, where all the user data and other data is available.
i remember that, long back, i used to lock a file from dosmode using ren command. but now iam unable to recall it. can any body remind that logic to me and also if this could be applied to solve my problem?
thanks.
|
|
|
|
|
The C runtime provides a _lock_file[^] function. You might just want to use permissions to deny your users delete authority on the file though. Probably a safer solution.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
thanks for your response.
but what i understood from msdn is, file will be locked for the other processes.
what i want is, i should not be able to delete it from windows.
can you just guide me.
Matthew Faithfull wrote: You might just want to use permissions to deny your users delete authority on the file though
can you just explain me how to do it?
thank you.
|
|
|
|
|
In this regard Windows counts as 'another process'. I have no idea of any DOS locking tricks and I doubt they have carried over to NTFS anyway.
User permission is really a sysadmin thing, you need to look at the accounts and groups of users you have on your system and talk to whoever manages it about how to secure your database against deletion.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
thanks again for your explanation.
now i understood that, my system administrator can do something at my clients place to achieve my task.
but can you confirm that, though the folder or file is locked for deletion, still, my program can update the file?
thank you.
|
|
|
|
|
Yes under modern Windows systems Delete/Create/Read/Write etc permissions are separate, you can allow or any combination to any user or group of users. You might need to specify which user your program runs as depending on the way the site is configured. A program can be launched with the permission sof a specific user and impersonates that user when it comes to getting file access. Your sysadmin could for example create a SpecialDatabaseUser user who has exclusive rights to the database itself and your program could be made to act as that user. There are lots of options and different sites may require different things but I think this approach is the most likely to succeed for deleteion prevention, 'sharing' is of course another issue altogether.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
chandu004 wrote: what i want is, i should not be able to delete it from windows.
I personally would be extremely annoyed by a file on my I could not delete.
I would insert considerable energy in *getting* it deleted - up until formatting and reinstall, because I would immediatly suspect either a trojan or SONY and its infamous rootkits behind that.
Tweaking permissions is OK, though. I *COULD* technically get the rights to delete the file, but the file has "Do not delete me!" printed in big red letters on the surface.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
do you remember how to do a dos lock,
some clues i could recall.
we used something like >ren [filename] [alt+some numbers]
some thing we used to do. but now it is not working.
can you guide me in this regard also.
thank you.
|
|
|
|
|
hi all,
what is the function of CMainFrame::GetActiveFrame() function
thanks
panthal
|
|
|
|