|
Thank you ...
Thank you masters!
|
|
|
|
|
|
متشکرم آقا حمید
Thank you masters!
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hi. Ive got a simple Visual C++ application (non-managed; Visual C++ version 7). I need a folder-tree control that lets the user search thru the folder tree, then select a single folder. I dont need anything fancy (such as multiple selections, etc). Also, I cant use anything that relies on recent Visual C++ features because I've got an older version. I dont need to fill the tree with my own custom data: I just want the tree software to automatically populate the tree from the disk drive (based on soom root folder I give it). I looked at the list of Tree Controls at:
http://www.codeproject.com/KB/tree
but it is a bit overwhelming. Can anyone suggest a tree control that is simple, mature, and works with Vis C++ version 7?
Thanks in advance.
zoom
modified on Thursday, October 2, 2008 7:54 PM
|
|
|
|
|
|
We have a medical imaging application. Recently one our processes crashes after a particular workflow and from the user.dmp thus created its getting extremely difficult to trace down the issue. Its not always that the process crashes after this workflow. But rarely it does and thats what giving half the team sleepless nights.. Am attaching below the callstack which I am getting. Any leads on this would be highly appreciated. Thanks in advance.
EXCEPTION_RECORD: ffffffff -- (.exr ffffffffffffffff)
ExceptionAddress: 0ce17c50
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000001
Parameter[1]: 0cf4d1a9
Attempt to write to address 0cf4d1a9
DEFAULT_BUCKET_ID: CODE_RUNNING_ON_HEAP
PROCESS_NAME: CapGM.exe
ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at "0x%08lx" referenced memory at "0x%08lx". The memory could not be "%s".
WRITE_ADDRESS: 0cf4d1a9
BUGCHECK_STR: ACCESS_VIOLATION
EXCEPTION_DOESNOT_MATCH_CODE: This indicates a hardware error.
Instruction at 0ce17c50 does not read/write to 0cf4d1a9
IP_ON_HEAP: 0ce17c50
LAST_CONTROL_TRANSFER: from 77600f3d to 0ce17c50
STACK_TEXT:
WARNING: Frame IP not in any known module. Following frames may be wrong.
0e86f9d0 77600f3d 0d03f7c8 774ecc08 0e86fa00 0xce17c50
0e86f9f0 77600ee9 0b8be5ac 0b8d3bc8 0d03f7c8 ole32!CChannelHandle::CChannelHandle+0xc6
0e86fa38 77600ba0 0b8be5ac 001d5550 0b8c4558 ole32!CRpcChannelBuffer::ClientGetBuffer+0x2b1
0e86fa88 7751317f 0b8be5ac 0b8c4558 0b8d3bc8 ole32!WdtpRemotableHandle_UserUnmarshal+0xc
0e86fb60 775130a4 0b8b5e80 00000000 0b8d3bc8 ole32!COAHolder::Release+0xd
0e86fb7c 776007f5 0b8be5ac 00000001 0b8d3bc8 ole32!CPubDocFile::Stat+0x4e
0e86fbac 77602dd8 0b8be558 0b8b5e80 0b8d3bc8 ole32!CRpcChannelBuffer::ClientGetBuffer+0x451
0e86fbb8 0b8d3bc8 0d03f7c8 0015ac18 0b8a1e00 ole32!LocalCall+0xc
0e86fc80 77600715 0b8be558 0b8a1e00 001d5538 0xb8d3bc8
0e86fccc 77e794a5 001d5264 001d5538 001d5264 ole32!CRpcChannelBuffer::ClientGetBuffer+0x2a6
0e86fd00 77e7940a 776005d0 001d5264 0e86fdec rpcrt4!NdrFreeBuffer+0x19
0e86fd54 77e79336 00000000 00000000 774ebfc8 rpcrt4!NdrGetBuffer+0x5
0e86fd78 77e8a33c 001d5264 00000000 774ebfc8 rpcrt4!MTSyntaxBinding::FindOrCreateBinding+0x99
0e86fdb8 77e8a37d 001d5264 001d5220 00000000 rpcrt4!LRPC_CCONTEXT::RemoveReference+0x1f
0e86fdf8 77e7bc99 0b9347f0 0016e490 001d5008 rpcrt4!LRPC_CASSOCIATION::AllocateCCall+0xa1
0e86fe1c 77e7bbdd 0016e4cc 0e86fe38 001d5008 rpcrt4!LRPC_SCALL::DealWithRequestMessage+0x14a
0e86ff80 77e76c9f 0e86ffa8 77e76ac1 0016e490 rpcrt4!LRPC_SCALL::DealWithRequestMessage+0x1
0e86ff88 77e76ac1 0016e490 7c9106eb 00000000 rpcrt4!LRPC_ADDRESS::ReceiveLotsaCalls+0x460
0e86ffa8 77e76c87 00160008 0e86ffec 7c80b683 rpcrt4!BaseCachedThreadRoutine+0xf4
0e86ffb4 7c80b683 0b8d7e20 7c9106eb 00000000 rpcrt4!LRPC_ADDRESS::ReceiveLotsaCalls+0x448
0e86ffec 00000000 77e76c6d 0b8d7e20 00000000 kernel32!IsDBCSLeadByte+0x2c
FAULTING_THREAD: 00001810
FOLLOWUP_IP:
ole32!CChannelHandle::CChannelHandle+c6
77600f3d ?? ???
SYMBOL_STACK_INDEX: 1
SYMBOL_NAME: ole32!CChannelHandle::CChannelHandle+c6
FOLLOWUP_NAME: MachineOwner
MODULE_NAME: ole32
IMAGE_NAME: ole32.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 42e5ba18
STACK_COMMAND: ~61s; .ecxr ; kb
FAILURE_BUCKET_ID: ACCESS_VIOLATION_CODE_ADDRESS_MISMATCH_ole32!CChannelHandle::CChannelHandle+c6
BUCKET_ID: ACCESS_VIOLATION_CODE_ADDRESS_MISMATCH_ole32!CChannelHandle::CChannelHandle+c6
Followup: MachineOwner
---------
|
|
|
|
|
good for you,
you probably need to check CChannelHandle or ClientGetBuffer
|
|
|
|
|
None of what you see in the callstack are my functions. Its all from ole32.dll
|
|
|
|
|
I wonder how can I change text alignment of an edit control in runtime? I googled for some minutes, but I caught nothing ...
Any information or link or something?
Thank you masters!
|
|
|
|
|
Have you tried ModifyStyle and passing ES_RIGHT, ES_CENTER, or ES_LEFT to it ?
|
|
|
|
|
AFAIK there's no way, unless you subclass the control.
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
[My articles]
|
|
|
|
|
thank you! but what's AFAIK
|
|
|
|
|
Jusef Marzbany wrote: but what's AFAIK
See here.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
According to the docs, the alignment styles cannot be changed
after the control is created.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thanks for your information
|
|
|
|
|
I created my own GUI, straight forward region box with a loaded bitmap,
i have question about setting a menu up for it, because menus sit under the title bar and atm its my own gui would i have to program my own menu or is there a way to move it down and resize it
|
|
|
|
|
Sarriss wrote: own gui would i have to program my own menu or is there a way to move it down and
yes.
I you create your own UI, you must be prepared to go all the way...
BUT, I've seen applications with custom UI that still use standard menubar and menu, and only show the menu on demand,
when the user's mouse pointer gets near where the menu should be.
|
|
|
|
|
so im wondering whether they created a GUI as a frame and stuck a frameless window in there which had the menu at the top maybe
|
|
|
|
|
I have a mask DC (dcFrom) that I want to rotate into another DC (dcTo);
Both DCs are monochrome. For example, dcFrom is all black, with a white ellipsed in the middle(ish).
I make a new DC, and set it all black. I do a PlgBlt, and I end up with a white circle in a black rectangle - but I also end up with some odd white artefacts around the edge.
Has anyone used PlgBlt with monochrome DCs before?
BOOL b = ::PlgBlt (*m_pDC, ptCorners, *pDCTmp, boundsOld.Shape.left - boundsOld.DC.left, boundsOld.Shape.top - boundsOld.DC.top, boundsOld.Shape.Width (), boundsOld.Shape.Height (), NULL, 0,0);
Iain.
|
|
|
|
|
Grrr me.
Had a flash of inspiration, and setting Text and Bk colours cured it.
m_pDC->SetTextColor (RGB(0,0,0));
m_pDC->SetBkColor (RGB(255,255,255));
pDCTmp->SetTextColor (RGB(0,0,0));
pDCTmp->SetBkColor (RGB(255,255,255));
BOOL b = ::PlgBlt (*m_pDC, ptCorners, *pDCTmp, boundsOld.Shape.left - boundsOld.DC.left, boundsOld.Shape.top - boundsOld.DC.top, boundsOld.Shape.Width (), boundsOld.Shape.Height (), NULL, 0,0);
Iain.
|
|
|
|
|
Hello,
I'm Giulio an Italian new MFC developer. I have a problem with the class CMFCPropertyGridProperty. I want to use the Color Palette generated by this class to retrieve a color value to use in my Drawcli like application. This is the code I write (this code is automatically generated by mfc wizard):
void CPropertiesWnd::InitPropList()
{
...
CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T
("Colore della finestra"), RGB(210, 192, 254), NULL, _T("Specifica il colore predefinito della finestra."));
pColorProp->EnableOtherButton(_T("Altro..."));
pColorProp->EnableAutomaticButton(_T("Predefinito"), ::GetSysColor(COLOR_3DFACE));
pGroup3->AddSubItem(pColorProp);
...
}
I want to use the color value retrieved by this menu as I can do with a dialog control. Could anyone help me?
|
|
|
|
|
Hi
Using the MS Example "How to create an automation project using MFC and a type library" to control MS Excel under MFC I get the error
Excel::_Application cannot instantiate abstract class
using the following code
void CAutoProjectDlg::OnRun()<br />
{<br />
_Application app;
<br />
if(!app.CreateDispatch("Excel.Application"))<br />
{<br />
AfxMessageBox("Couldn't start Excel.");<br />
}<br />
else<br />
{<br />
app.SetVisible(TRUE);<br />
AfxMessageBox ("Excel is Running!");<br />
}<br />
}<br />
How should I overcome this error ?
Regards,
sdancer75
|
|
|
|
|
Well, the error gives you a lot of information.
I'm assuming _Application is the Excel interface. An interface is pretty much just a C++ class with all the methods abstract. So you can't create it directly.
I suggest you search for examples, and look for CoCreateInstance, or CoCreateInstanceEx.
Under Platforms, Frameworks & Libraries on CP, there is a COM category - there are several good tutorials there. They may not clue you in on excel, but they will give you the COM concepts you need.
Iain.
|
|
|
|
|
Thanks Iain,
I wonder why the heck Microsoft publish an example in their web site, when it does not applying in the real world practice.
Anyway, In my case, either the intellisense system works so, I have to find out the methods that this interface hosts, by manual.
Am I doing something wrong in my initial setup ?
I am using VS2008 pro and I want to create a skill test application for the MS Office. Is that too much complicated in MFC ?
Should I leap to Visual Basic instead?
Regards,
sdancer75
|
|
|
|