|
From MSDN:
"If the pszText member of the LVITEM structure is non-NULL, return TRUE to set the item's label to the edited text. Return FALSE
to reject the edited text and revert to the original label. "
(See MSDN Online)
Cheers,
Paolo.
|
|
|
|
|
|
Is there a way I can use popen() in my windows app to open a dos app and use its output?
|
|
|
|
|
Using CDateTimeCtrl or inheritance, how can I init the non checkbox to FALSE (not set)?
|
|
|
|
|
Hi
would
ctrlDate.EnableWindow(FALSE) do?
Kurt
|
|
|
|
|
Thanks for your interest.
I already have done this and the window is disabled preventing dropdown and changes. However, it still is checked for a return and does return the default system date. I am looking for a way to force GDT_NONE result on return when the dialog closes.
I am also looking to have the checkbox not checked for the default state when the control is enabled which would be more appplicable for certain uses of the application. Eventually the default state would be part of a prferences setup.
|
|
|
|
|
Hi there,
I had two questions...
When creating a context menu for a treeview let's say, how can you tell whether the user has actually right clicked on the treeview or somewhere out in the empty spaces? From what I can see, I only have two points, an x and a y, but I have no information on the treefolder item that was right clicked on....
Also, once the user picks, let's say the copy option and you handle the pick, what MFC class do you use to actually copy the whole folder into another one?
|
|
|
|
|
even if the right-click is out in space, there will always be an item selected in the tree.
so,
void CObjTreeCltr::OnRclick(NMHDR* pNMHDR, LRESULT* pResult)
{
HTREEITEM hti = GetSelectedItem();
if (hti!=NULL)
{
and so on....
-c
|
|
|
|
|
Hi All:
Any helpful material on RDS( Remote Data Service) development with VC++ . I only
know VC++. Please try to avoid VB and ASP ( I know it is possible )
Just my (VC++)control on the client, and business and server objects
at the back ( Remind you only VC++ specific material ).
I know there is MSDN. But it is not toospecific about VC++..
Tutorials, Code snippets,references .....all welcomed
|
|
|
|
|
Is there anyway at runtime to add a string into the string table? What I am trying to do is have a thread load a string to the string table, then use postmessage back to the main thread. Inside of the main thread message handler I want to pop up a warning dialog that will display the string I added to the string table. Is this viable, if not what other approaches could I use?
|
|
|
|
|
What you're asking is not viable really. Remember that string resources are embedded in the executable, thus adding a string at runtime, permanently adds the string to the executable (even if it were possible to add one while another executable is running, which is usually not possible because the file image is locked).
What you probably want to do is simply send a string to another app and have that app display it. You can do this using the WM_COPYDATA message, which you can then add a WM_COPYDATA handler to your application.
|
|
|
|
|
What Eric suggested is the best way, but if the two threads are within the same process, all you need is a user-defined message and to use either the WPARAM or LPARAM to send a pointer to the string.
Here's how you do it with a user-defined message the last parameter is LPARAM and is not used in this example) - I also assume you're using a CString, hence the double-cast for the WPARAM:
void CMyClass::SendMyMsg(CString sMsg)
{
SendMessage(UWM_MYMESSAGE,(WPARAM)((LPCSTR)sMsg), 0);
}
In your message handler, you'd do this:
LRESULT CMyDialog::OnMyMsg(WPARAM wParam, LPARAM lParam)
{
CString sMyRcvdMsg = (LPCTSTR)wParam;
// do something with the string now
return 1L;
}
Using WM_COPYDATA is MUCH more flexible however. I'm working on an app right now that uses WM_COPYDATA quite extensively because of the added flexibility. When it's done, I will be posting it here.
|
|
|
|
|
That is what I ended up doing. I was more curious than anything about posting into the string table, seems like something that would be neat (technical term) to be able to do though. Thanks for the help!
|
|
|
|
|
Hi,
Is there a visual studion option which would
help me to execute a file, somewhere in my drive, after
a successful compilation.
I need this because, i want to copy my executable/dll from the debug folder a different place for execution, write now i'm doing this with a batch file, any other technique to automate the process which could also, take care whether the executable already in memory, which means the file copy could not be done .....
Thanks in advance.
Cheers
Kannan
|
|
|
|
|
Hi Kannan,
Look in the "Project settings" for the "Post-build step" tab. Here you can add a list of commands you want to execute after a successful build.
I'm not sure, I used it only one time to copy a dll in the project directory. You may also use some special strings, see the docs.
Cheers,
Paolo.
|
|
|
|
|
You can set where the output executable/dll location in the "Link" tab in project options (Alt-F7)
..
|
|
|
|
|
I want to save and open different profile settings into different .ini files.
Is there an easy way to do this?
Also, how do I save the files?
File Save/File Save As... will prompt the user for an .ini file to save the attributes of fields from the dialog boxes.
Any help would be appreciated.
|
|
|
|
|
Look up the WritePrivateProfile*() APIs. The counterparts to read from INI files are GetPrivateProfile*().
|
|
|
|
|
Does anyone know where I can find a free Flowchart library or ActiveX ? Or is there anyone who can point to some information to write it myself.
|
|
|
|
|
Hi. I know this is going to sound like a plug, but here goes.
First, I'm not aware of any freeware, or opensource object/relationship diagramming libraries. There are a number of commercial offerings, from companies like Northwoods, Protoview and (I think) Tom Sawyer, but the prices can be pretty darn hefty.
Microsoft's Visio has a programming model that you can develop against, and it's very good. Depending upon your needs, and the extent to which you intend to distribute your software, this could be an option. Many people however aren't comfortable building a dependance on Microsoft Office (or Visio) into their apps, but as I said you know your situation better than anyone.
We offer a few commercial libraries that support diagramming, one called Ultimate Diagram, and a superset of that called HyperView.
Right now, we're offering these libraries, along with the whole complement of our MFC development libraries, complete with full source code in a special product bundle called the Goldrush 2000. I'd recommend you check it out to see if it fits your needs. I guarantee it will be the least expensive way to grab a diagramming library!
http://www.dundas.com/goldrush2000
|
|
|
|
|
Hi!
I'm looking for a function or a method to get the volume bitmap, which works with Windows NT 4.0.
I tried to use the function DeviceIoControl(...) with file system control code FSCTL_GET_VOLUME_BITMAP. But this system code requires Windows 2000.
Who can help me?????
Thanks a lot
Bernhard
|
|
|
|
|
When you close a print preview, by clicking the close button on the top right of the window, The CMainFrame::OnClose() is called. Is there anyway of detecting, within onClose(), whether OnClose() has been called from the printpreview (CPreviewPage) or from the mainfram?
|
|
|
|
|
GetWindowText() only applies to child controls in the current process. Are there any methods that I can read the text of the child controls in another applications?
Thanks all!
|
|
|
|
|
GetWindowText() works on any window.
|
|
|
|
|
How about other common controls like listcontrol, treecontrol? Can I access the tree control in windows explorer through my program?
Thanks all!!
|
|
|
|