|
something to add. I can now see the data when I am outside the function. I can iterate through and actually get the first key and the value associated with it. however when I try Lookup, it fails. The only difference I can spot is that when I iterate I am using a CString *var; When I am using lookup it is a CString var, however if you notice I am sending the address pointer Lookup(&stringVar, ArrayVar).
Does this make any sense?
Thanks
|
|
|
|
|
Why are you using CString* as the KEY and the ARG_KEY parameters of the CMap template. Declare it as CMap<CString, LPCTSTR, CStringArrarEx*, CStringArrayEx*> *m_EnhancementArray in your class declaration.
In your StoreEnhancements function, change m_EnhancementArray->SetAt(&returnVal, &EnhancementArray) to m_EnhancementArray->SetAt(returnVal, &EnhancementArray) .
And, in your GetEnhancement function, change CString *Keys to CString Keys .
Gurmeet S. Kochar If you believe in God, it's because of the Devil
My CodeProject Articles: HTML Reader C++ Class Library, Numeric Edit Control
|
|
|
|
|
It looks like that did it. Thanks! I actually did try changing the CMap to CString but I did for both parameters. I never thought of using LRCTSTR however.
|
|
|
|
|
I have this project which I worked on a year ago. I copy it from one CD to my PC, I make some modifications to the dialogs in the resource editor and I try to compile it and this is what I get:
e:\program files\microsoft sdk\include\iphlpapi.h(183) : error C2065: 'PMIB_ICMP_EX' : undeclared identifier
e:\program files\microsoft sdk\include\iphlpapi.h(183) : error C2146: syntax error : missing ')' before identifier 'pStats'
e:\program files\microsoft sdk\include\iphlpapi.h(183) : warning C4229: anachronism used : modifiers on data are ignored
e:\program files\microsoft sdk\include\iphlpapi.h(185) : error C2059: syntax error : ')'
The begining of the header file where iphlpapi.h is looks like this:
#include <stdafx.h>
#include <iphlpapi.h>
#include <ctype.h>
#include "MacNSn.h"
Can someone tell me where this error is coming from and what steps should I take to fix it? This project used to compile and run just fine.
// Afterall, I realized that even my comment lines have bugs
If the sun were to blow up, it would take us 7-8 minutes to realize it.
|
|
|
|
|
may be iphlpapi.h utilizes types declared in some other header.
i suggest you to check APIs used by your app
and make sure that all necessary headers in right sequence are included.
|
|
|
|
|
|
hi everybody,
i wanted to test a functionnality of my own, and i nedded to open a file. as i was quite in a hurry, i decided to use fopen which is easy to use.
but i really don't know why, it doesn't want at all to open my file !
i tried this : FILE* src = fopen("source.txt", "r"); but it always returs NULL.
does anybody have an idea ?
thanks...
TOXCCT >>> GEII power
|
|
|
|
|
try giving the absolute path like "c:\\yourprojectdir\\source.txt"
God is Real, unless declared Integer.
|
|
|
|
|
will it appreciate white spaces and long names ?
(E:\Nicolas\Projets Visual C++\CPParser\Debug)
TOXCCT >>> GEII power
|
|
|
|
|
damn it, it works !!
hem, in fact, i'll need later to pass theses paths to main directly, and the user won't necessarily give the entire path...
what can i do ?
TOXCCT >>> GEII power
|
|
|
|
|
humm, well i dont know exactly, but i would not like to have relative paths, i prefer complete path... there are ways you can make the user give the complete path. like using the fileopen dialog to ask the user to select the file.
God is Real, unless declared Integer.
|
|
|
|
|
erf, yes of course, but i am writing a little console project...
no dialog so.
TOXCCT >>> GEII power
|
|
|
|
|
if the path is relative then current directory is cosidered as the working directory.
so if you just specify the file name like test.txt then test.txt should be in the same directory as the .exe file that you are invoking.
But invoking it from the visual c++ editor(i.e ! button) will not work as it sets the current working directory to something else (i dont know what, may be the project directory, one below debug)
God is Real, unless declared Integer.
|
|
|
|
|
that's what i was thinking too.
thanks for your answer guy.
i can now continue
TOXCCT >>> GEII power
|
|
|
|
|
One thing to remember is that the current directory is not the same as the program directory. This is a very common mistake made by programmers.
In your case, I don't think that will be an issue since it doesn't look like you are trying to open a file in the same directory as the program.
BTW, with VS7 (and maybe 6), the working directory is not the "debug" or "release" directory. It is the project directory.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
If there is someone who could help me with this...
I want to (have to) disable access to System Clock via doubleClick...
I tried hiding it ( it works - but Double click is not disabled ), disabeling
the clock window, and still there is Double click access..
so if someone could help me.. please don't hesitate to do so...
thanks for the help...
bela
|
|
|
|
|
Why would any one wants to diable the system time to be shown?
God is Real, unless declared Integer.
|
|
|
|
|
In industrial applications, you might want to prevent the user from goofing with the system.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
Mr.Prakash thank you for you're response, but it would really be a help if you told me what is the usual way for disabeling the acces to System Clock...
it would help me verry much ...
please reply to this message.
bela
|
|
|
|
|
The wndclass of the system clock is TrayClockWClass may be you could figure it out what to do with the window after using FindWindow on it.
God is Real, unless declared Integer.
|
|
|
|
|
well .. i have already done that...
i have found the window and disabled it, hidden it .. but double click still works...
So i need it because i have written a program that uses system clock..
and do not want other users to change it...
i don't mean programmers.. but the usual user who knows to double click the sysTray ...
so any other ideas?..
bela
|
|
|
|
|
You need to subclass the window so that you can handle the doubleclick event and do what you want to do (ignore it).
God is Real, unless declared Integer.
|
|
|
|
|
renjith_sree wrote:
that means you want to disable the double click event in
SystemTray. isnt?
wow you got it rite, may be you should start translating every post to more sensible post so that every one can understand it.
Thanx a lot.
God is Real, unless declared Integer.
|
|
|
|
|
Does Monitor need a "Root-Enumerated driver"?
Because when I ran sample Win2K installer as:
c:\install "775FT.inf" "Monitor\GSM42D1"
I got the following error:
UpdateDriverForPlugAndPlayDevices FAILURE: (0xe0000219)
We know:#define ERROR_NO_ASSOCIATED_SERVICE (APPLICATION_ERROR_MASK|ERROR_SEVERITY_ERROR|0x219)
(Monitor has not a services! Is it OK?)
How can I solve this problem!?
Notice: DDK2K install sample has a problem, So first see:
http://www.codeproject.com/script/comments/forums.asp?msg=801613&forumid=1647&mode=all&userid=67503#xx801613xx[^]
Thanks you.
|
|
|
|