|
Since you have all the sorking souce code there should be no problem adding to the UI.
I found the DVD background stuff in the SDK very educational. I had no idea what kind of
information was stored on DVDs.
Khoramdin wrote: You mentioned in your message “It took me about 10 minutes to get it up and running”. I truly envy you, mate but I guess on the other hand I fee privileged for having your assistance.
Wasn't me. It's Microsoft sample code. Just took a little tweaking to remove some VC++ 6 related
items and build a project for it (the samples only come with a makefile).
It should import to 2005 express fine but if you haven't done so already, you may want to follow
the steps here: Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK[^]
I'll email the project!
Mark
|
|
|
|
|
Hi Khoramdin,
I made a VS 2005 Express project/solution and sent it to you.
You may want to remove your email address from your last message so you don't get extra spam
Mark
|
|
|
|
|
Hello Mark,
Thank you so much for all the help and the information.
I am going to take sometimes to check these and hopfully be able to build a DVD-Video Software Application.
I hope you don't mind me bothering you once in a while when I cannot make sense out of some of the stuff.
Thank you very much and have a great day.
Babak
|
|
|
|
|
( with VC6, MFC, and using the CMultiTree class from the CodeGuru site which support multiselection )
I have a large-ish complex tree hierarchy. Each leaf item in the tree has pointer to its corresponding "object".
Each of those object knows when it's selected or not; i.e. I can select objects in other UI parts of the application, and the selection must be reflected in the tree.
Now, I will loop everything to do a SetItemState( hItem, 0, TVIS_SELECTED ); on all items to deselect them. followed by another SetItemState( hItem, TVIS_SELECTED, TVIS_SELECTED ); to actually select the items.
This is not very effective.
I'm looking for better suggestions.
I've been trying to store each object's HTREEITEM item in the object itself to be able to change the state directly on the items. but that means the Tree must be known ( in some fashion ) to others unrelated places in the software.
I also tried to completly "override" the tree selection mechanism and keep it "external" to the tree itself, and use CustomDraw ( NM_CUSTOMDRAW ) on the tree to manage the selected state of the objects, but that causes other kind of side effects, mostly bad refresh and flickering and some selection management issues.
Any other ideas ?
Thanks
M.
|
|
|
|
|
Maximilien wrote: I've been trying to store each object's HTREEITEM item in the object itself to be able to change the state directly on the items. but that means the Tree must be known ( in some fashion ) to others unrelated places in the software.
This is what I usually do, with the disadvantages you describe. I have a layer (a class) between the TreeCtrl and the Data, which contains only a pointer Data and the HTREEITEM.
|
|
|
|
|
I have created a dynamic splitter with:
CSplitterWnd clientSplitter;
..
clientSplitter.Create(this, 2, 2, CSize(200, 200), pContext, WS_CHILD | WS_VISIBLE | SPLS_DYNAMIC_SPLIT, AFX_IDW_PANE_FIRST);
How do I add a view to it? This code ..
clientSplitter.CreateView(0, 0, RUNTIME_CLASS(CLeftView), CSize(100, 100), pContext);
.. causes an ASSERT.
cheers,
Neil
|
|
|
|
|
And the assertion is....?
|
|
|
|
|
Sorry, assertion is in WINSPLIT.CPP:
if (GetDlgItem(IdFromRowCol(row, col)) != NULL)
{
TRACE2("Error: CreateView - pane already exists for row %d, col %d.\n",
row, col);
ASSERT(FALSE);
return FALSE;
}
cheers,
Neil
|
|
|
|
|
A dynamic splitter creates the first default pane (cell 0,0) so you can't create another view
there.
You may need to use DeleteView() on that pane first before adding your own pane.
I'd have to test this as I've only used static splitters.
Mark
|
|
|
|
|
I got around to testing it. This should work...
BOOL CMyFrameWnd::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
CCreateContext CreateContext;
CreateContext.m_pCurrentFrame = this;
CreateContext.m_pNewViewClass = RUNTIME_CLASS(CLeftView);
clientSplitter.Create(this, 2, 2, CSize(200, 200), &CreateContext,
WS_CHILD | WS_VISIBLE | SPLS_DYNAMIC_SPLIT, AFX_IDW_PANE_FIRST);
return TRUE;
}
|
|
|
|
|
Thanks. That works fine.
cheers,
Neil
|
|
|
|
|
Hi,
I am wondering if there is any way to produce a +5V clean TTL signal through COM/RS-232 serial port in C++. I just need to produce a clean +ve spike over the serial port.
thanks,
-Pavan.
|
|
|
|
|
You mean other than putting a power regulator/converter to translate +12 to +5? I have never tried to pull constant power from a COM port and I do not know how much current it can source.
A good project site can be found at: http://www.epanorama.net/links/project_interfacing.html[^].
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
To be clear, I just need to produce a signal which will have a spike (think of it as a trigger) whenever I like. This is fed to another signal recorder which keeps looking at this signal for any trigger (spike) and records it.
-Pavan.
|
|
|
|
|
The RS-232 port has +12v or -12v logic levels. The parallel port has 5v logic levels.
|
|
|
|
|
Ok, how can I produce a signal of +12v spike using for example this[^] library??
-Pavan.
|
|
|
|
|
You can try the EscapeCommFunction() and set/clear the DTR or RTS line.
|
|
|
|
|
Have not tried it, but you should be able to open the commport with
Handle = CreateFile("Com1",....);
then set and clear the DTR line with
GetCommState(Handle, &Dcb);
Dcb.fDtrControl = DTR_CONTROL_DISABLE;
SetCommState(Handle, &Dcb);
Dcb.fDtrControl = DTR_CONTROL_ENABLE;
SetCommState(Handle, &Dcb);
You should be able to use simlar code to toggle the RTS bit
|
|
|
|
|
I have tried enabling and disabling DTR and also RTS bit, but couldnt see any spike signal on the Oscilloscope?? I have connected pin 4 and pin 5(ground) for DTR bit to the scope and 7,5 for RTS bit. I didn't see any change in the signal (stays flat at zero all the time).
-Pavan
|
|
|
|
|
Can you post some code for the things you have tried?
|
|
|
|
|
Ok, I am getting it. Just played around with the output pins using a LED. The signal goes from -11.6v to +11.6v. Inorder to get a TTL signal, it seems we need to use a voltage converter MAX-232(source:- codeguru forums). Do you know any other way to produce a TTL type signal (0-5v) other than using that converter? I am not sure we can produce without using that, but in case if have any idea lemme know.
Thanks for the info,
-P.
|
|
|
|
|
You can try an NPN transistor... try 10k going into the base, then put a Schottky (like a 1N5817) with the cathode directly on the base and anode connected to ground. Then connect a 4.7k from collector to 5v supplied by you. The RS232 ground would have to tie to your logic ground. The 5v signal should be present on the collector of the transistor.
|
|
|
|
|
I write controls and GUIs and PatBlt and PATINVERT has proved very fast and valuable when it comes to 'selecting' or hilighting something as the mouse buzzes by.
In many MS products - when a mouse buzzes by the toolbar for instance, the 'hot' or highlight approach does something like 'highlight the background of the icon in blue with a blue border' but generally leaves the icon alone.
I'm sure this could be implemented long hand using double buffering or simply repainting BG and then the ICON to the screen - but is there a tricky or clever way to do this - like using a MASK or something that would allow me to simply alter the background back and forth - and not need to redraw the icon (unless of course, the icon also changes to imply 'hot' or hover.
Another situation might be a customer list box of some sort ... when the user highlights an item, the BG of that item changes - but the TEXT and possible ICON do not. Again, I know this can be implemented by painting everything for that item ... and made flicker free by using double buffereing ... but I'd like to investigate a more 'clever' approach - like creating a transparency by anding and oring bits and masks in just the right order.
ICON Text A
ICON Text B
|---------------------|
| ICON Text C |
|---------------------|
ICON Text D
and that highlight could quickly follow the mouse.
The technique should be valid over anything ... just as PatBlt(...PATINVERT) works so well.
Unfortunately, PATINVERT inverts everything ... I need to avoid the INNERDS.
Maybe start by leaving certain COLORS alone? on a PATINVERT type operation ... ?
Would it be worthwhile to look into HRGNs?
Many thanks in advance.
-Luther
|
|
|
|
|
Hi !!!
I have two cpp file..like
Confwebd.cpp and arxmain.cpp..
I have cstring my text; in Confwebd.cpp now i want to use this string value in arxmain.cpp ..
Can any body know how can i make it ??
Thanks
Shah
|
|
|
|
|