|
Don't be so cruel. I'm pleased to receive an answer.
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
If all you require for pleasure is an answer, I could have said, "The weather is warm today." What kilt provided you was about as helpful. Check his post history. He's just consuming space.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
> I have searched for a while but I couldn't find anything useful
There are at least 150 code samples (professional, from MS internal) for 20 years !!!
|
|
|
|
|
I use the vfw library to create an avi file.
1)AviInit
2)AviFileOpen
3)AviFileCreateStream
4)AviStreamSetFormat
5)loop(AviStreamWrite)
Now before I close the avifile i want to change the frame rate. I change the dwRate of AviStreamInfo and then call EditStreamSetInfo. This returns error code:-2147467262.
If I dont call EdiStreamSetInfo and continue with closing the avi file it succeeds.
My question is, if is possible to change the frame rate after writing the stream and before closing the file?
Thank You
|
|
|
|
|
Hi All,
I'm having trouble writing code in C++ to populate an empty TreeView with a directory structure derived from dragging and dropping a folder from Windows Explorer. I'd like the folder being dragged to become the root node of the TreeView and all of its subfolders to become the child nodes. I have ItemDrag, DragEnter, and DragDrop event handlers - it's the DragDrop event handler I'm having problems with. I can't get it to actually populate the TreeView, mainly because I'm not sure how to retrieve the information necessary to copy. Any ideas?
Thanks.
|
|
|
|
|
Is this using Windows Forms (because the event names sound like Windows Forms names...)?
If so, you might have better luck in the Managed C++/CLI forum[^].
However...first, you need to work out which drop format is the one you need to manipulate. You can get that list from the DragEventArgs object that's passed to your event handler:
private: System::Void treeView1_DragOver(System::Object^ sender, System::Windows::Forms::DragEventArgs^ e)
{
array<String^>^ formats2 = e->Data->GetFormats();
}
The Data member of the DragEventArgs class also has another method, GetData, that allows you to retrieve the data associated with any one of those formats. You then need to work out how to decipher and use the data for your format (I see one called "Shell IDList Array", which sounds promising). The documentation will come in handy there, as might this CP article[^], which is written in VB.NET, but probably has the detail you need.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thank you for the reply! I actually managed to get it working using
if(e->Data->GetDataPresent(System::Windows::Forms::DataFormats::FileDrop))
{
array<String^>^ name = (array<String^>^)e->Data->GetData(System::Windows::Forms::DataFormats::FileDrop);
}
in the DragDrop event handler. I used this website (it's C#) to help recursively find child nodes.
And my apologies, I did in fact put this post on the wrong board but thank you for taking the time to assist anyways.
On a side note, would you happen to know how to get the aforementioned functionality by dragging folders onto the application icon? Similar to how you can drag an image file onto a photoshop (or similar program) shortcut, then photoshop opens and displays the image you dragged. Thanks.
|
|
|
|
|
KawiRider wrote: On a side note, would you happen to know how to get the aforementioned functionality by dragging folders onto the application icon? Similar to how you can drag an image file onto a photoshop (or similar program) shortcut, then photoshop opens and displays the image you dragged. Thanks.
Those will get passed into a new instance of your application as command-line parameters - full paths to the folders from my brief testing.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Awesome! This worked perfectly. The first command line argument seems to always be the pathname to the executable. All later arguments match up with the folders I dragged onto the icon. For reference, I used
array<String^>^ cmdLineArgs = System::Environment::GetCommandLineArgs();
inside the Form's load event handler to get the arguments.
Thank you again for your help, saved me some major headaches
|
|
|
|
|
KawiRider wrote: The first command line argument seems to always be the pathname to the executable. All later arguments match up with the folders I dragged onto the icon
Yes, that's right.
I tested using the string array passed into main() - that doesn't include the executable pathname (at least in C++/CLI applications - it is included in the main() argument list in native C++ apps).
KawiRider wrote: Thank you again for your help, saved me some major headaches
My pleasure
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I'm looging to use my old Axim Pocket PC with PPS2003 OS as a clock and to not let it on 24/7 I'd like a option to let it turn on at let say 6:00 and of at 22:00 automatically.
|
|
|
|
|
CString constructor or assingnment or serialization of CString causes the application crash in a multi-processor environment,(this happens in a heavily loaded condition when more than 500 threads are running)
whereas it does not cause any problem in single processor environment.
|
|
|
|
|
So what does that tell you...you've got synchronisation problems somewhere in your code - multiple threads accessing the string simultaneously. You don't see the erroneous behaviour in the single-processor system because a single-processor system doesn't have real concurrency.
You will need to track down where the issue is. Good luck...'cause you're going to need it...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello,
I want to get my computer model name without using WMI.
Model name for example one of the HP's workstation model name is "HP xw4400" i want to get using VC++/MFC program.
Please help.
If it is not possible please suggest some code that uses WMI.
vicky
|
|
|
|
|
I hopeMachine Details[^] link may help you.
Please reply if is it not as expected.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
Hello,
Thanks for your help.
Sorry for late reply.
The link suggested by you give detail to get system device details but not system model.
Thanks
Vikas
vicky
|
|
|
|
|
Just use Standard Win32 User/Kernel apis (several ones)
(see on Win32 grp)
|
|
|
|
|
Visual Studio 2008 uses .net framework 3.5 for my application. I hope it uses .net framework. How can I change its version?
This 'targeted platform' option is grey in the project properties.
|
|
|
|
|
You can change that in Project Properties -> Application -> Target Framework.
This is not greyed when I tried it.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I use Visual studio 2008 Professional version.
microsoft provides inforamtion to choose .net framework version for Visual Studio Team System Architecture Edition at link: http://msdn.microsoft.com/en-us/library/bb675522.aspx .
I can not find the 'Settings and Constraints' in the right click menu.
Which version do you use?
|
|
|
|
|
I also use VS 2008 Professional edition.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
in my appliacation i created two dialog boxes.each dialog box contains two text boxes and one button.if i enter data in two text boxes and click the button the data should be reflected in second dilog box and vice versa .all this should be done using socket programming..please let me know the solution in MFC
kir_MFC
|
|
|
|
|
The previous post was made a few minutes ago, and is still visible on the same page.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
it is visible friends..but i want in MFC..please let me know the solution
kir_MFC
|
|
|
|
|
The most important thing you should realise is that during the night it's usually colder than outside.
Apart from that, try to read (and understand) all the replies you have received so far.
|
|
|
|