|
Well, the strategy as stated crashed because for some odd reason (I had declared an extern xdontcare[64]), copied a blank string when I did strcpy(xdontcare,"dontcare"), so instead I did
extern char* xdontcare
and in OnInitialUpdate I did:
xdontcare = new char[64]
strcpy(...)
then it worked. Wondering why? Maybe it has to do with the positioning of my xdontcare as a global...
(and yes, I havent implemented the Globals.h idea yet... )
|
|
|
|
|
It's crashing because the compiler may store string literals in read-only memory, because you aren't supposed to modify literals. Write it like this instead:
char xDontCare[] = "dontcare";
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
OK I have code that I thought I was ready to distribute - sadly it seems I "spoken" too soon.
I am compiling the code in release mode (code generation in Multithreaded DLL, no debug info), with linker settings havine debug info
I build all the code, run the installer - works fine on my system (Windows 2000 sp2, MSVC6 sp5, latest Win32 SDK)
I install the program on another Win2K box - bamm dialog complaining about missing MSVCRTD.dll - this is the debug version of the runtime !!! How can this be ? I run it through dependency checker (the latest version from the website) and get no mention of MSVCRTD.dll? WTF !!! All it shows is MSVCRT.dll links
Argggg!
|
|
|
|
|
use the dependency walker
WUSIWUG
|
|
|
|
|
Are you sure no other DLL dependency (may be loaded explicitly) is Debug build or is dependent of msvcrtd.dll?
C# is fundamentally broken. - Christian Graus
|
|
|
|
|
Well that's what I had hoped the newer version of dependency walker would show - if I open every node I see NO mention of MSVCRTD.dll
However i do see two warnings
APPHELP.dll had this:
Warning: At least one delay-load dependency module was not found.
MPR.dll had this
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
MPR has NO dependencies on MSVCRTD.dll according to dependency walker
|
|
|
|
|
DOH !!! I found it !
What a dumbass - I had changed the name on a dynamic loaded DLL and put the wrong version !! Sh*t !
|
|
|
|
|
Hello:
I was wondering if is possible to display a string in a CStatic control. The purpose of this is to display information. Any answer is more than welcome.
Thanks,
Luis E. Cuadrado
)
|
|
|
|
|
there is 2 ways
1)((CStatic*)GetDlgItem(ResourceId of ur control here))->SetWindowText("Enter your text here") ;
2) make a control variable with classwizard and
your controlvariable.SetWindowText("your text here") ;
this will work....
WUSIWUG
|
|
|
|
|
I don't understand that difficult is that...
Use SetWindowText
May be your question is differente.
Saludos
Best Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hello again:
I tried SetWindowText and it worked. I tryied the 1st way that renjith pointed out and it wasn't working (Maybe I forgot something). Then I tried the second way (Creating the member variable with ClassWizard) and called SetWindowText and it worked.
I know the question sounded very newbie(or stupid), the reason that I asked is because I'm new in MFC and all this Windows 32 API programming stuff. Thanks to this web site, I leanred a lot of stuff.
Thanks for your help guys,
Regards,
Luis E.
PS
Saludos Carlos, gracias por tu ayuda.
Luis E. Cuadrado
)
|
|
|
|
|
You are welcome....
Luis, Bien venido
Cheers
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I have a #import for msado25.tlb in one file, and the namespace is defined as "ADO" . SO all stuff in this file has to be addressed as ADO::something. Now I had another database class that was referring to the ADO stuff as ADODB::. All was working fine until I rebuilt the project (Rebuild all). Now it told me that it didnt know what ADODB was, and finally I had to put my #import statement in that file as well, plus change all the ADODB's to ADO:: Question is, why in the world was it working fine until I rebuilt all? I cannot explain this!
Any clues?
Thanks,
ns
|
|
|
|
|
Because the file that was using it earlier and was not rebuilt. So it had all the information it needed. Now ith your change when you did a rebuild you created a conflict.
Try and put your import in a single file and make sure that the file is included where ever it is needed rather than making multiple imports of the same library.
|
|
|
|
|
How dangerous is it to have #import twice declared. Its not too clear to me how to get it consolidated to one statement. Ones in an ADOX class, and ones in an ADO class. I really dont see why I should put adox.h into ado.h, but it I'm playing with fire I'll work at this. So really, am I going to get in unexpected trouble here?
Thanks,
ns
|
|
|
|
|
All of a sudden anywhere (really anywhere at all in valid places!) I put a breakp[oint in my program it says "breakpoint cannot be set, execution will stop at the beggining of the program" .Then the breakpoint goes white and indeed execution stops at some odd place. WHat can I do to get out of this situation?
thanks
ns
|
|
|
|
|
close VC, delete your apps .NCB file, rebuild all.
-c
Greenspun's Tenth Rule of Programming:
"Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp."
|
|
|
|
|
|
Assume that when certain query is executed, the record set object will contain 20 results. But i want my record set object to contain results from 11 to 20 among all these. How can i do so ???
|
|
|
|
|
I have never done this in VC++ before, however the ADO object should be essentially the same . Here is a link on how you can page your recordset in ASP, again many of the ideas should be the same, such as the usage of the AbsolutePage , and PageCount properties.
Paging a recordset[^]
HTH
Nick Parker
|
|
|
|
|
You need to use pagesize to 10... and move between pages and records...
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I want to create a template class, with unlimited # parameters, basically I need a special template that is like a collection, but I can access each member directly.
I want to create something like this
class myclass : public mybaseclass
{
public:
myclass();
DWORD myvalue1;
DWORD myvalue2;
DWORD myvalue3;
};
I need to be able to have a different # of members "myvalue1" etc. each time.
the difficult part is that the members must also be used in a function, that is part of the template also
myclass::ReadMembers()
{
myvalue1=1;
... etc
}
so that I do not have to enter them again, I know macros let U do this kind of thing, but they do not work to well for this application so far.
Templates are foweful, but not enough, I even looked at BEGIN_MESSAGE_MAP macro from MFC, because that idea might do it, but it can't as far as I can see.
GRRR.... Maybe I need a 4GL language, not C++.
Conrad - conradb@adroit.co.za
Always do badly to start off, that way when you get the hang of it suddenly, everyone is surprised.
|
|
|
|
|
Something like this should work (I don't have a compiler handy, so beware of errors):
template <int n> class C;
template <> class C<0>
{
public:
void read_members()
{
}
};
template <int n> class C: public C<n-1>
{
typedef C<n-1> super;
public:
int value;
void read_members()
{
value=1;
super::read_members();
}
};
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a requirement to fill the listbox with 2 columns.
I know how to implement a listbox with single column?
Could someone tell me how to do it?
Thanks
|
|
|
|
|
use a CListCtrl instead.
-c
Greenspun's Tenth Rule of Programming:
"Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common Lisp."
|
|
|
|