|
Hello Friends,
I am a just begineer in vc++.Since vc++ is very vast field , I have started to learn MFC programming.
Can any one tell me in which area in MFC programming I should concerte for becoming a better MFC programmer. The areas I mean is networking programming , Graphics programming,Database programming or System based or embbed based programming.
I have started to learn from the very base of MFC programming after finishing. I do not know the area of application should I concentrate.
Hoping for a favorable reply on this regard.
Phijo
|
|
|
|
|
You already wrote a number of fields you'd like to learn, why don't you start with the first and go from there....
Knowning a bit of each is easy, but knowing enough that you can say that you know how to program databases, graphics or embbeded system is another big step in learning.
depending on your career decisions, what you want to do, will determine what you will learn more deeply.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
After I installing "SDK WinXP SP2"(Febuary 2003), I got LNK1103 error in VC++6! My OS is WinXP (Without SP).
I had seen the following question:
Debugging Information Corrupt[^]
I can NOT dowload older version (because it is NOT good solution).
Can anyone help me?
|
|
|
|
|
Have you tried deleting the entire debug folder and doing a rebuild from scratch?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Yes, I deleted Debug and Release folders and *.opt, *.ncb, *.aps and any temporary files.
But I have problem still.
|
|
|
|
|
I think the only place to find usernames and their hashes is SAM. in the registry ro in system32\config.
which is access denied to all users including admin
but Cain 2.5 can Dump user names and their password hashes and it is written with vc++.
u can download Cain at http://oxid.it
I want to know how does it do it.
|
|
|
|
|
When I follow the documentation program, I cannot compile the mex program successfully. It has the error:
mexLapack.cpp(20) : error C2065: 'dgemm' : undeclared identifier
I have followed all the procedures for this section. ie. include the lapack library, include "mex.h",
what's wrong of my program?
Is that I need to install lapack in matlab setup stage? Or I need to install the lapack downloaded from the internet?
Thanks
|
|
|
|
|
Hi,
i have a problem using the OnHotKey-event. I'am using CTRL+F1 as a Hotkey. My problem is
that i want to know if the CTRL button has been released. How can i check if the CTRL key is released in the OnHotKey-event? I tried GetKeyboardState, GetKeyState and so on. Can anyone post a short code to check a state of a key in the OnHotKey-Event.
e.g.
OnHotKey()...
if (wParam = 100) //CTRL+F1 has been pressed
{
//here i need to check if the CTRL key has been released!
//if not: repeat until we have the release signal!
//something like a wait for event... only if the real CTRL key at the keyboard
//has released we go on here...
}
and that little problem: how can i detect which window is in foreground? GetForegroundWindow of course but it seems not to work with PC Games. I need to know the active application who is currently running the focus.
THX to all!!!
JR20
|
|
|
|
|
Can I set break points in th COM project and use the debug mode?
I want to trace for values of some variables and memory bindings.
|
|
|
|
|
Yes. One way is to insert a break point with _asm int 3; . This will cause (uless you catch it, I suppose) an exception, and allow you to opt to debug (retry) from the usual exception dialog. (This dialog can be configured to no allow the debug option, but the default usually has a retry/debug button.)
Your PDB should load when VC attaches to the process, et voila.
|
|
|
|
|
write a program that accepts 4 integers and incrypt it as ff:
-replace each digit by (the sum of that digit plus 7) modulus 7.
swap the 1st digit with the 3rd, swap the 2nd with the 4th
then print the ecrypted integers.
pls help me solve this problem...or just give an idea on how to
create this prog...thanks a lot!
godspeed!
|
|
|
|
|
If there are any Crypto++ V5.x dev's out there I sure could do with some help. I've used V4.x but am having trouble wrapping my head around using V5.x to encrypt and decrypt strings.
In essence I want:
bool Encrypt( string& sencryptedb64, const string& splaintext, const string&
skey );
and vice-versa.
I've read the Wiki/FAQ and so far have this:
byte key[AES::DEFAULT_KEYLENGTH], iv[AES::BLOCKSIZE];
memset( key, 0, AES::DEFAULT_KEYLENGTH );
memmove( key, (unsigned char*)skey.c_str(), min( skey.size(), AES::DEFAULT_KEYLENGTH ) );
AutoSeededRandomPool rng;
rng.GenerateBlock( iv, AES::BLOCKSIZE );
CFB_Mode<AES >::Encryption cfbEncryption( key, AES::DEFAULT_KEYLENGTH, iv );
string cipher;
StringSink* sink = new StringSink( cipher );
Base64Encoder* base64_enc = new Base64Encoder( sink );
StreamTransformationFilter* aes_enc = new StreamTransformationFilter( cfbEncryption, base64_enc );
StringSource source( splaintext.c_str(), true, aes_enc );
for Encryption, but the cipher result doesn't look right (it ends in a 0x0a) so I suspect I'm off track.
Not sure how to go about Decryption and my attempt so far certainly isn't right.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Hey all.
I had a DLL project (using MFC) that I recently decided to convert to a statically-linked library. Everything seemed to go smoothly, but when I try to use my library in a test application, all the resource-loading calls in the library fail.
That is to say, the library project has a resource file containing some resources used in the library; a string table, a couple of bitmaps, a dialog box or two, etc. Elsewhere in the library code, there's a routine that, say, wants to get a string from the string table. So I have something like this:
CString str;<br />
VERIFY(str.LoadString(IDS_STRINGID);
When I run an application that uses this part of the library, the LoadString() function fails (returns 0). The same seems to apply for dialog boxes, bitmaps, and all other resources. A quick debug trace revealed that it was passing the correct numeric value for the resource ID; it just seemingly could not load the resource.
I've never tried making a static library containing resources before, so I really have no idea what needs to be done. I'm assuming there is something in particular that I need to do so that the resources can be loaded correctly from the library. Does anyone know what I could do in this situation? Any help would be greatly appreciated.
|
|
|
|
|
I have the same problem - cannot load resources that are compiled into the static library. I know that a solution to the problem exists because there are resources in the static MFC library.
When I compile using VS 2002 I get warning on the .res file corresponding to the .rc file in the static library.
warning LNK4221: no public symbols found; archive member will be inaccessible
I think that may be a clue to the answer.
Did you ever find an answer?
Thanks
-Rodney
|
|
|
|
|
Actually, I did find a solution! I did a little hunting around on Google, and I found this page: http://www.differentpla.net/~roger/devel/tips/vc/resources_in_libs/[^]
It's not an incredibly elegant solution, but it's very simple, easy to use, and it works well. (On Visual Studio 6, at least; I assume it will work equally well on VS 2002, but I haven't tried it. ...Come to think of it, I've been using VS 6 ever since it came out. Oh well, if it ain't broke, don't fix it! )
[Insert witty and relevant signature here]
|
|
|
|
|
I am new to dealing with dlls and installers. I have a project where I am using Inno Setup over InstallShield and I need to create a dll that does application specific processing. I have been experimenting with Inno Setup and their sample files and I understand how it works. My problem lies in the dll that I have to create. How do I go about creating the dll? My experience with dlls has been limited to MFC dlls, which create classes. I am not sure Inno Setup can call a class from the MFC dll. The sample files that come with Inno Setup, one is a C dll, which is nothing that I have ever created. I am hoping someone has some experience with dlls and Inno Setup and can give me some direction. Thanks!
|
|
|
|
|
Inno Setup can only call 'C' style functions, not classes.
I created my DLL project using File, New Project, Visual C++ projects, MFC, MFC DLL, MFC using MFC shared DLL.
The following are some excerpts from an Inno Setup DLL I use.
This is a function in my DLL that is called by my Inno Setup script:
extern "C" __declspec(dllexport)
void __stdcall RegistryScrub(char *product,char *install_path)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
}; and this is the declaration in the [Code] section of my Inno Setup script:
procedure RegistryScrub(product : String;
install_path : String);
external 'RegistryScrub@files:VersamarkSetup.dll stdcall'; You can pass strings to DLL functions as char * , int 's, etc.
My DLL is included in my setup via the following:
[Files]
Source: "VersamarkSetup.dll"; Flags: dontcopy
Software Zen: delete this;
|
|
|
|
|
Thanks - I implemented the dll in a similar fashion to what you are recommending and I have the Inno Setup Script implemented in a similar fashion. It will build in Inno Setup but when I go to run the install, I get the message that my dll cannot be imported. I have my dll located in the same directory as the other dlls that I am using the installer to copy so it should be in the correct place. Any ideas?
|
|
|
|
|
If the DLL can't be loaded when you run the compiled setup program, I would guess that your DLL has a dependency (a DLL it needs) that can't be found. Use the 'Dependency walker' program (DEPENDS.EXE) that comes with Visual Studio to find out.
One possibility: did you compile your DLL for debug? If you did, it will need the debug DLL's, which may not be on the target machine where you're testing your installation.
Software Zen: delete this;
|
|
|
|
|
Some Windows functions (like LoadImage) can take both certain constants and pointers as parameters. Is there a definite range of values that can be used which cannot be pointers? I'm guessing its the max a WORD can be, since MAKEINTRESOURCE casts to a WORD. And do all the different ways of allocating memeory return pointers that are not in that range (malloc, c++ new, LocalAlloc, CoTaskMemAlloc etc...), and is it the same on all versions of Windows (Win16, Win32, Win64)?
- thanks
|
|
|
|
|
I have built a serial com program, where I store incoming data by a thread to a CString array in a queue FIFO. The Worker thread then access this psudo CString queue, process the data and store it into a file. My problem is that the program memory grows in time none stop. I am not an avid VC++ programmer, I just need to find a way to control the memory leak. Variables are not re-created, they are all placed as global variables, in hopes to not great the same variable each time routines are run. How to I clear unused memory that the OS has put a side to do the calculations it needed?
stefane_filion@yahoo.com (please e-mail)
|
|
|
|
|
Is it possible to find out if a
type was declared const?
Thank You
Bo Hunter
|
|
|
|
|
const ness is a compile time hint.
const int tata = 5;
...
tata = 4;
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
If you mean "writing generic code which knows whether a given type is const or not" you can have something like that:
template <class T>
my_generic_class
{
};
template<class T>
my_generic_class<const T>
{
} Other than that, Boost.TypeTraits[^] features an utility called is_const which determines at compile time the const ness of a type. I'm not sure if tihs is what you're after.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Want a Boost forum in Code Project? Vote here[^]!
|
|
|
|
|
How to idntification device manufacture of pocket pc?
|
|
|
|