|
Then a vector of a vector.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I was afraid of that
Roger...Roger..
Vector...Victor
Clearance...Clarence
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Why don't you use Chris Maunder's grid control[^]? It looks like his control will be much beter for your application... I use it every where a CListCtrl is needed because it is so flexible and I have packaged it in a dll so it is not that difficult to add to my project...
John
|
|
|
|
|
typedef CMap<unsigend int,="" unsigned="" cstring,="" cstring&=""> XItem;
typedef CArray<xitem, xitem&=""> XList;
How about?
|
|
|
|
|
Is it true that CToolBar button bitmaps can only contain 16 colors?
|
|
|
|
|
|
Hi All,
I'm using createProcess to launch a console application, but I don't know how to capture the output and redirect to a window. Can somebody help me with it? really appreciate it. thanks in advance. -Dave.
|
|
|
|
|
|
thanks, but I didn't find any information related to the problem. Is this the right one? thanks anyway.
|
|
|
|
|
|
This may be overly simple, but the solution has eluded me and research has come up with nothing.
I have a CView derived class. This class's only job is to display nothing. I'd like to insert the text: "There is no data to display in this view" in the view. Centered, at the top.
I know I have to override OnDraw. I know I have to use TextOut. How do I get the text to use the system font, and center it?
Thanks!
Frank
"Keyboard Error - Press F1 to Continue"
|
|
|
|
|
CGdiObject * pOldFont = pDC->SelectStockObject(DEFAULT_GUI_FONT);
CString s;
s.LoadString(IDS_NOPICTURE);
CRect rcClient;
GetClientRect(rcClient);
CPoint center = rcClient.CenterPoint();
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextAlign(TA_CENTER | TA_BASELINE);
pDC->TextOut(center.x, center.y, s);
if (pOldFont) pDC->SelectObject(pOldFont);
|
|
|
|
|
Yes! Thank you very much.
"Keyboard Error - Press F1 to Continue"
|
|
|
|
|
I have a derived CListCtrl in which I handle a double click event, but I need to find out which item was clicked on (if any).
From the function below is there any way I can get mouse coordinates from HMHDR??? I need to pass this info onto HitTest() but it doesn't appear likely I can get mouse coordinates from the parameters below???
CListCtrl::OnDblclk(NMHDR* pNMHDR, LRESULT* pResult)
Should I use PeekMessage and get the coordinates of the mouse when the last message was fired off???
What method should I use?
Thanks
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
If you look closely in the MSDN docs, you'll see that NM_DBLCLK for listviews, actually sends a NMITEMACTIVATE*. NMITEMACTIVATE* info = (NMITEMACTIVATE*)pNMHDR
(There's a NMITEMACTIVATE::iItem that'll interest you, I'm sure... )
--
Summer breeze makes me feel fine. Blowing, through the jasmine in my mind.
|
|
|
|
|
Ok, I am stumped here. I have an ActiveX COM dll written in VB6 that is returning an array of doubles. I am using the Class Wizard to import the typelib. so I can call a series of methods one of which returns array of doubles. The class wizard writes out both the .h and .cpp files for me, however it comments out the one method that is returning the array doubles saying:
I found a kb article telling me to use the ITypeLib viewer so I can manually write the method into the header and cpp files. This is where I am stuck. The ITypeLib viewer shows the method as such:
[id(0x60030004)]<br />
HRESULT GetNum([out, retval] SAFEARRAY(double)* );
Any help for writing the guts to make the InvokeHelper call would be much appreciated.
This is what I was initially trying:
SAFEARRAY* _Moses::GetNum()
{
SAFEARRAY* result;
InvokeHelper(0x60030004, DISPATCH_METHOD, VT_R8, (void*)&result, NULL);
return result;
}
TIA.
- Nick Parker My Blog
|
|
|
|
|
just a wild suggestion
try returning SafeArray of VARIANT instead of doubles
Might do something
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Can anyone post an example of the ReadProcessMemory function in action, let's say I want it to read at offset 0x6FB74910
Thanks,
Michael
|
|
|
|
|
How do I size and create two columns in a ListBox?
X str1
X2 str2
.
.
Xx strx
|
|
|
|
|
Use a multi-column listbox...which is very limiting or use a CListCtrl .
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Is there any way to check for 64-bit and fix compatibility issues in a large .NET solution without generating thousands of warnings?
If _WIN64 *is not* defined, the Windows headers define many function parameters and return types as 32 bits, so I get warnings for all integer/pointer conversions involving those functions. For example, consider the following header functions:
inline void* GetWindowUserData (HWND hwnd)
{
return (void*) GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
inline void* SetWindowUserData (HWND hwnd, void* data)
{
return (void*) SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data);
}
These two alone generate the following warnings in *every* source file that includes this header (which is most of them in the solution):
..\Viewapi\Vapidlg.h(155) : warning C4312: 'type cast' : conversion from 'LONG' to 'void *' of greater size
..\Viewapi\Vapidlg.h(161) : warning C4244: 'argument' : conversion from 'LONG_PTR' to 'LONG', possible loss of data
..\Viewapi\Vapidlg.h(161) : warning C4312: 'type cast' : conversion from 'LONG' to 'void *' of greater size
If _WIN64 *is* defined, a huge number of warnings are produced that I cannot tie to anything in my source code. For example:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlalloc.h(342) : warning C4244: 'argument' : conversion from 'SIZE_T' to 'size_t', possible loss of data
loss of data
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlalloc.h(382) : warning C4244: 'argument' : conversion from 'SIZE_T' to 'size_t', possible loss of data
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlalloc.h(381) : while compiling class-template member function 'void *ATL::_ATL_SAFE_ALLOCA_IMPL::CAtlSafeAllocBufferManager<Allocator>::Allocate(SIZE_T)'
with
[
Allocator=ATL::CCRTAllocator
]
C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\atlconv.h(778) : see reference to class template instantiation 'ATL::_ATL_SAFE_ALLOCA_IMPL::CAtlSafeAllocBufferManager<Allocator>' being compiled
with
[
Allocator=ATL::CCRTAllocator
]
How can I reduce the number of spurious warnings so that I can fix the real issues?
Thanks in advance...
|
|
|
|
|
Please help!
I have successfully debugged remote processes by changing the debug
properties for my projects. However, I can only do this when I launch the
remote process from my local copy of Visual C++ .NET 2003. I have not been
able to attach the debugger to an ongoing process launched at the remote
machine. My understanding is that I should select "Tools > Debug Process"
and then set the "Transport" value and set "Name" to my remote machine. However, "Transport"
is set to "Default" and "Name" is set to my local machine, and both fields
are shown as static labels, not as edit controls or drop-down selection
lists. It's impossible to change their values!
Does anyone know why this is happening? How can I fix this issue? I've tried reinstalling VC++ with all components selected and I still have the same problem.
Thanks,
Silvio
|
|
|
|
|
I am starting to add an email interface to the MFC application. How do I know if I have MAPI installed for Lotus Notes mail client?
Elizabeth
|
|
|
|
|
I need help implementing an interface to send email out from a MFC application using our Lotus Notes mail server. I tried running the sample application NPP came with the Visual Studio. It always came up with an Outlook dialog. But I want to use our Lotus Notes mail server. Can you tell me where to add the mail server information. By the way, I looked at the sample code, there was no custom code for OnFileSendMail.
Elizabeth
|
|
|
|
|
Are you implying the use the Lotus mail client as the default Windows e-mail client?
Kuphryn
|
|
|
|