|
Ummm... try the following
template <class Array>
class ArrayNode
{
...
};
class MyArray:public CArray<ArrayNode<MyArray>*,ArrayNode<MyArray>*>
{
public:
typedef ArrayNode<MyArray> Node;
...
};
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Does anyone know of any really good tutorials on the heap out there? I searched codeproject and google with no luck. Thanks.
-KMaz
|
|
|
|
|
Try "An introduction to data structures with applications" by Tremblay & Sorenson.
It's old, and not exactly what you're looking for, but you might like it.
Vikram.
-----------------------------
KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames.
pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.
|
|
|
|
|
Hi
I'm trying to hook the message procs of other applications, this is the code I currently use, and which fails:
HWND wndMIRC = ::FindWindow("mIRC", NULL);
m_hMenuHook = SetWindowsHookEx(WH_CALLWNDPROC, HookCallWndProc, 0, GetWindowThreadProcessId(wndMIRC,0));
SetWindowsHookEx() returns NULL if the first parameter applied to GetWindowThreadProcessID is different from the HWND of my own application
Why does this not work? Do I need to place my hook procedure into a DLL or what's wrong. I can hook my own application, but this is quite senseless and not what I want to do.
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
Thanks!
In the meantime I found out I had to write a DLL, works fine.
Now I have all context menus transparent in Windows, fine
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I was working in MS VisC++ Intro edition when my monitor went dead. Not having a spare around I decided to use a PC to TV device. I am using it on a 13". My problem is that when you use the system's, "Appearance",(Win98)tab to alter the look of the desktop, it increases all aspects of font size in an API but the window text. Can I insert some code in the root directory of IDE to supplement font size changes? If so, how?
|
|
|
|
|
Do you mean to say you want the code in your editor to look bigger? If yes, go to Tools-> Options-> Format and set the font size. If no, sorry, I haven't really understood your question.
Vikram.
-----------------------------
KI klike KDE kand kuse kit, kbut KI kmust kadmit, kstarting kall knames kwith K kis ksilly. KI khope kthey kwill kgive kup kthis kwhole kscheme ksoon kand kcome kup kwith kreal knames.
pI vThink aHungarian nNotation vIs iA aWonderful nThing cAnd pEveryone avShould vUse pIt aAll dThe nTime, adNo nMatter pWhat dThe nContext, adEven adWhen vSpeaking.
|
|
|
|
|
Hi,
Did any one know how to get a message in Visual C++ when a smart card was inserted or removed ?
Thanks Very much
|
|
|
|
|
I use a toolbar within an dialog. This toolbar is resized, whenever the dialog is resized via a call to SetSizes (the height and the width are changed). But sometimes if the dialog windows was inactive for some time, the toolbar gets the wrong size. Looking into the code of CToolBar::SetSizes I found the following:
<br />
if (::IsWindow(m_hWnd))<br />
{<br />
VERIFY(SendMessage(TB_SETBITMAPSIZE, 0, MAKELONG(sizeImage.cx,<br />
sizeImage.cy)));<br />
VERIFY(SendMessage(TB_SETBUTTONSIZE, 0, MAKELONG(sizeButton.cx,<br />
sizeButton.cy)));<br />
Invalidate();
}<br />
else<br />
{<br />
m_sizeButton = sizeButton;<br />
m_sizeImage = sizeImage;<br />
}
I think the problem is that the toolbar is only resized, but the new size isn't stored in the local variables m_sizeButton and m_sizeImage. I can't access them because they are private. It seems that sometimes, the Toolbar is completely redrawn with the sizes stored in m_sizeButton and m_sizeImage. I think this is a bug in CToolbar. It should always set the local variables to the current sizes (no matter if the window exists already or not). How can I get around this bug.
In which method the Toolbar is redrawn with the sizes from m_sizeButton/Image? When is this method called? And the most important question, how can get around this?
I use Visual Studio 2003 with the MFC 7.1. Thanks in advance, Konrad Windszus
|
|
|
|
|
I have got a CListCtrl (Report View) in a resizable CDialog. Whenever I resize this dialog, I change the column width via a call to CListCtrl::SetColumnWidth, so that the horizontal scrollbar isn't necessary.
Unfortunately there seem to be a bug in the CListCtrl. Whenever a vertical! scrollbar is showed (because there are more items in the CListCtrl than it can display) and I scroll down and then resize the CListCtrl that the vertical scrollbar disappears, the first row in CListCtrl is empty and not selectable. Seems that the scrolling doesn't work correctly in this specific case.
I use the following code in OnSize of the CListCtrl:
<br />
CRect rect;<br />
GetClientRect(rect);<br />
<br />
SetColumnWidth( 0, rect.right - nLengthWidth );<br />
SetColumnWidth( 1, LVSCW_AUTOSIZE_USEHEADER );<br />
<br />
CListCtrl::OnSize(nType, cx, cy);<br />
Even I can reproduce the bug and found also some postings in the newsgroups from developers which had the same problem, I don't know how to solve the problem.
Please help me. I had the problem with MFC 4, 7, and now even with 7.1
Thanks in advance
Konrad
|
|
|
|
|
I have got a Toolbar in a CDialog. This dialog is a child of CFormView. The tooltips for the toolbar are working, but I would like to display the appropriate text in the CMainFrame's statusbar, too.
So far only the text for the Toolbar ID is shown in the statusbar, when I place the mouse cursor over it. But I would like to have the text regarding to the single buttons of the toolbar.
Any hints in which method the statusbar text messages are handled and how i can display the correct text in the statusbar?
Thanks in advance
Konrad
|
|
|
|
|
You should define a string with the same ID as the ID in the toolbar buttons.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
I already defined some strings in the stringtable with the same ID as the buttons, but that doesn't work.
The problem is, that the toolbar is not child of the CMainFrame but child of an CDialog, which is child of an CFormView (the main view).
|
|
|
|
|
The mainframe handles the diplay of the toolbar/menu text in the function GetMessageString . You should investigate this function and see if you need to override it and provide your own implementation to get what you want working.
Searching for 'GetMessageString'...
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\MFC\Include\AFXCTL.H(686): virtual void GetMessageString(UINT nID, CString& rMessage) const;
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\MFC\Include\AFXWIN.H(3126): virtual void GetMessageString(UINT nID, CString& rMessage) const;
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\MFC\SRC\CTLCORE.CPP(1877):void COleControl::GetMessageString(UINT nID, CString& rMessage) const
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\MFC\SRC\CTLCORE.CPP(1914): GetMessageString(wParam, strMessage);
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\MFC\SRC\OLEIPFRM.CPP(253): GetMessageString(wParam, strMessage);
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\MFC\SRC\WINFRM.CPP(1461):void CFrameWnd::GetMessageString(UINT nID, CString& rMessage) const
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VC98\MFC\SRC\WINFRM.CPP(1512): GetMessageString(wParam, strMessage);
7 occurrence(s) have been found.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Does anyone know if there is code available on the web that shows how to implement a fairly sophisticated street address parser? (street name, number, route, box...)
|
|
|
|
|
Work for the emergency services doing a gazeteer product - what exactly do you mean by parsing an address - surely it's just a string manip. thing.....
If on the other hand, what you need is something to look at an unformatted addr and split it into its constituent elements then will be in a world of hurt.....all it takes is a null locality / area / route or the like, and it all goes screwey!
If still looking for something, then mail me at richardgrimmer@hotmail.com, but please put Address Problem in the subject so I know not to bulk delete with all the other crap.....
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hi,
i want to ask the Event handle returned from createevent method is shared among different process or it is secured of being used by different process.the first aurgument i 've supplied to the method is null.
if is not secured , then how can it be made protected of begin used by different process.
thnaks in advance
khurram mirza
|
|
|
|
|
AFAIK the only way you can share HANDLEs between processes is by DuplicateHandle and starting the other processes as "children" from this "parent" process that created the handle.
This is AFAIK all documented in MSDN and other sources.
|
|
|
|
|
|
Hi all,
I want to find the details of all the clients in my network. How I can do that?? I feel SNMP is having the limitation of enable that service in all the clients. Is there any other option left?? I am a developer in C++. Can any body suggest some API's or Links.
Thanks in advance,
Regards,
Satya Prasad
|
|
|
|
|
What "details"? What "clients"? What "my network" (your CIDR/n subnet or "My Network" according to MS)?
To perhaps point you in the right direction:
Whatever information you want any single machine to provide you with, that machine must have a service/server to provide you with that information. Unless you specify what information you want, it's impossible to even give a remotely correct answer by anything but pure coincidence.
|
|
|
|
|
If you want to enumerate your network resources, there are some cool API calls you can make. The example is given in MSDN documentation. You could enumerate from your program all the printers, machines, etc. on the network.
|
|
|
|
|
Hi,
Sorry I didn't put my question correctly. I am having a private network. I want to get the Client details like MAC, OS and others. I don't want to use SNMP. In that case how to do this?? Thanks
Regards,
Satya.
|
|
|
|
|
1. In MSDN, the disactive Page not initialize if you not click it, how can I initialize all page when the sheet is shown?
2. When I use the function "UpdateDialogControls" in a CPropertyPage, in Debug mode, it works perfectly, but in release mode, some warning will be shown, and the applications will destory, why?
|
|
|
|