|
How can _Nil be changing since it is defined static?
static _Nodeptr _Nil;
and is initialized with 0
template<class _K, class _Ty, class _Kfn, class _Pr, class _A>
_Tree<_K, _Ty, _Kfn, _Pr, _A>::_Nodeptr
_Tree<_K, _Ty, _Kfn, _Pr, _A>::_Nil = 0;
I have checked, it has the same number of elements and I can find them all if I put the map in the watch and expand the _Left, _Right and _Parent correspondents...
Best regards,
Alexandru Savescu
|
|
|
|
|
You are right after all Chrstian. _Nil changes, but why?
Here is what happens:
class A is in A.dll and class B : public A is in B.dll
Class A has a map as its member. (I'll call it MyMap)
1. I am now in a method of class B. Here MyMap._Tr._Nil is NULL (0x00000000)
2. This method will call a parent method from class A. Just stepping into that method (withought touching the map object) I will find that MyMap._Tr._Nil is no longer NULL. I can work with the MyMap fine, inserting elements and iterating through it.
3. I return to the method described at 1. Now MyMap._Tr._Nil is NULL again . Now playing with the map screws up my application.
Any idea?
Best regards,
Alexandru Savescu
|
|
|
|
|
I replied, went to bed, got up and you'd solved the problem yourself. Thanks for letting me know the outcome.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Sorry for replying for the third time to the same method. I found the solution and I thought you might want to know:
Get an updated version of xtree from Dinkumware. Also, VC.NET does not need this patch.
Best regards,
Alexandru Savescu
|
|
|
|
|
hello..
as a background process, i should print pdf files...
does anybody know any good library (commercial should be no problem) for this?
i tried messing around with the activeX - component.. but it should be a plain c++ file, without any dialogs, the best would be even without mfc...
thanks in advance (i have to say that i am ont able to response until monday.. because my weekend starts in 5 minutes)
bernhard
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
You can buy a PDF print driver direct from Adobe. Then you can create a printer DC as normal and print as you require. We use it embedded in our software to generate PDF files.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
i need it the other way round... a background process should print pdf files out..
first a normal printout from an application (with barcodes..)
then some pages from a pdf file..
(and this should be a background process.. so no gui..)
bernhard..
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
Situation: I built a dialog based mfc-win32-app.
Because the app works with skins, the main dialog has no borders nor caption.
Problem: The program DOES show the program icon when the app is minimized and shown in the Windows main task bar WITH border/caption, but NOT without it. This seems very odd to me
I really want the program icon shown...
Solution:?
|
|
|
|
|
|
I did the same as you, but i do _not_ have it. Nish, you have really mastered your computer
~RaGE();
|
|
|
|
|
Thx for your reply Nish.
But...I just created a dialog based app using VC++ 6, set style to 'popup' and the border style to 'none'. All the other fields but 'visible' are left blank.
I ran the program and did NOT get the task-bar icon.
I run under win98 4.10.98. Might that be the problem?
|
|
|
|
|
|
Mmmhhh ... so i tried following, and that´s really weird :
dialog based mfc app have an extra code in OnPaint() to draw the icon in the task bar, and this has to work no matter whether there is a caption or there is no caption. So i put a breakpoint into the onpaint method, and discovered that ... the IsIconic() method does not respond properly (return FALSE even if the app is minimized)!!! So there must be another piece of code which draws icons in the task bar...
I´ve copied the code in a OnButton method (because without border there is no minimialize button, so i´ve created one), so that i have :
void CTestDlg::OnButton()
{
ShowWindow(SW_MINIMIZE);
WINDOWPLACEMENT* lpwndpl=new WINDOWPLACEMENT;
GetWindowPlacement(lpwndpl);
CPaintDC dc(this);
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
dc.DrawIcon(x, y, m_hIcon);
}
and here the GetClientRect(&rect); returns {0,0,0,0} !! So, I´m quite as lost as ViolaCase now . Can Someone explain how this minimize thing functions, and why the overrided OnPaint() method is not used ??
~RaGE();
|
|
|
|
|
why my comboboxex doesn't show tooltip with mouse over editctrl? (cursor is edit's)
all difference i see comparing to another functional example is i have comboboxex, OnToolHitTest fills still absolutely the same, in calling function gets to TTM_ACTIVATE and HWND_TOP but nothing happens
(i tried when is over edit return edit's or comboboex's id etc. but all failed)
all is fine when mouse is not over edit resp. when i open it without edit (CBS_DROPDOWNLIST only)
has someone this problem?
t!
|
|
|
|
|
I've been looking at Memory Leak detectors and I've found this one 'Memory Sleuth 3' by Turbo Power. You can get a trial version here ...
http://www.turbopower.com/trialrun
They say 'Trial-Run Editions of TurboPower products are fully-working versions of our software. The only restriction is that your compiler's IDE is running. In other words, you cannot deploy your applications with the Trial-Run Editions.'
This sounds pretty handy to me, am I missing the catch?
Just in case anyone missed me going on about Memory Detectors recently, I found this one called GlowCode which I realy like, and you can get a free time limited trial here ....
http://www.glowcode.com/update.htm
If you are looking for this kind of tool too, try them and let me know what you think, because I can't decided which to choose.
Ali
|
|
|
|
|
Have you looked at the one Software Verification advertise on CP ? I got a copy for winning the C# screensaver contest, and while I've not had a chance to look at it too deeply, I'm impressed with what I have seen. I believe Rama won one as well, and so did James, maybe ask them also.
I seem to recall you are in the UK, and they are too, so that's probably a plus as well, in terms of support.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Good idea, I'll give it a try.
Anyone else who might be interested the link is ....
http://www.softwareverify.com
(I've put that in because the advert is not always on screen.)
Ali
|
|
|
|
|
Have you tried Nu Mega's bounds checker?
I used a version on NT (a while ago). It worked quite well, however, it did not work too well when I was coding some low level RPC stuff.
Jeremy.
"Hey man, Taliban, Tali me Banana."
|
|
|
|
|
Hi,
I have seen some rulers designed by VC++, but is there a
ruler designed as a timecode (hour, minute, second and frame,
with 1 second = 30 frames)?
Did you have any purpose or ideas?
Thanks in advance!
chen
|
|
|
|
|
Couldn't you just take the code for an existing ruler, and modify it?
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hi all,
I would like to copy a file from a remote machine.Since the machine is running on WINDOWS 2000.I have to connect it using account name & password.Can anyone tell me how can i provide account name and password through program?.
With regards.
Shibu K.V.
Senior Research Associate.
VLSI ASIC Hardware Design Group
Electronics R&D Centre,Trivandrum
India
|
|
|
|
|
Use 'WNetAddConnection2'.
|
|
|
|
|
Hello, folks,
I got some trouble using MFC CDialog class in my DLL (MFC static linked DLL).
Though my DLL is made MFC static linked, when I use MFC classes to create a dialog (pop-up or child), I always got a window creation error.
I know I can create dialog using win32 SDK (i.e, using CreateDialog(..) or DialogBoxParam(..), I did them before !), but I still want to use MFC to create my dialog. Because I also have something like CListCtrl or CListView on that dialog.
Could anybody help me ? Or I should use win32 SDK instead ?
And, are "list control" and "list view" same ?
Any response would be appreciated.
|
|
|
|
|
Yo Yo~~ wrote:
Though my DLL is made MFC static linked, when I use MFC classes to create a dialog (pop-up or child), I always got a window creation error.
Post your code, pls ... The code is more likely to be wrong than the MFC dll
~RaGE();
|
|
|
|
|
/// on MyGUIDlg.cpp; a dialog based application
void CGUIDlg::OnViewLog()
{
DWORD r = 0;
r = ViewLogFile( this->m_hWnd );
}
/// on MyDLL.cpp; a MFC static linked DLL
DLLExport DWORD WINAPI ViewLogFile( HWND hParendWnd )
{
CWnd* pParentWnd = new CWnd();
pParentWnd->Attach( hParendWnd );
CEventLogDlg* pLogDlg = new CEventLogDlg( pParentWnd );
if ( pLogDlg != NULL )
{
pLogDlg->Create( IDD_EVENT_LOG, pParentWnd );
///IDD_EVENT_LOG is resource ID
pLogDlg->ShowWindow( SW_SHOW );
}
}
/// class CEventLogDlg
class CEventLogDlg : public CDialog
{
........
}
|
|
|
|