|
Is the hex value stored as character strings?
If so use this formula for a 2 digit hex - (16 * A) + B where A is the digit on the left and B is the digit on the right.
|
|
|
|
|
This doesn't make a lot of sense. Hex is just a representation of a number. Is this what you want to do: you have a string containing two characters (in hex representation) and you would like to display the character from the ASCII table ?
If yes, you can use strtoul[^] to convert the number to an unsigned long and then assign it to a char (probably with a cast to avoid a warning).
|
|
|
|
|
|
Hi,
How to add a popmenu to CListCtrl.
When user right clicks on a item in a list control
i want to display a popup menu how to do this?
|
|
|
|
|
|
yaah i know that.
How to know the points (CPoint) of the right click from the list control.
|
|
|
|
|
|
|
Hi,
can i get some code examples in vc++ to install a package or an application, basically a .exe file.....
Thank You
|
|
|
|
|
See here: Deployment[^]
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi, everyone
I want to use database in my application , but when I add #include <afxdb.h> to the stdafx.h, it give me the above error message.
When I change the position of the #include<afxdb.h>, it give me other error message,
error C2146: syntax error : missing ';' before identifier 'ConvertToWin32ALG_ID'
so what is the problem?
the following code is the the stdafx.h file
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#if !defined(AFX_STDAFX_H__3D0D8E67_10EC_4002_9AE7_E8E9AE644C83__INCLUDED_)
#define AFX_STDAFX_H__3D0D8E67_10EC_4002_9AE7_E8E9AE644C83__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define STRICT
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
#define _ATL_APARTMENT_THREADED
#include <afxdb.h>
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;
#include <atlcom.h>
//used for token
#include <pkcs11/cryptoki.h>
#include <pkcs11/auxiliary.h>
#define PKCS_LIB_NAME "ST2pkcs11v10.dll"
#define ArraySize 1000
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#include <comdef.h>
|
|
|
|
|
If you want to use MFC you'll have to include afx.h, afxwin.h and maybe some others before afxdb.h.
Cheers,
Ash
|
|
|
|
|
Hi everyone,
I built an mfc application using visual studio 2008 (standard edition) c++ on a windows 7 OS. I've compiled the code as a "Release" build and it works great on my machine, but won't execute at all on any other machine (whether its Windows 7, xp, vista, etc). No error messages or anything. You briefly get the hour glass and then nothing.
I've set the following options:
"Use MFC in static library"
and I've set the Runtime library to "Multi-threaded (/MT)"
Any ideas?
Thanks!
P.S. The .net framework is the same version for my machine as for the others that I'd like it to run on, so that doesn't seem to be the problem.
|
|
|
|
|
Try using Dependency Walker to find out if there is any missing dependency.
Write the log or have messagebox to findout which function it is failing.
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi,
the dependency walker has a question mark besides the following dlls:
GPSVC.DLL
IESHIMS.DLL
Would I try to locate these on my machine and then keep them in same folder as executable?
|
|
|
|
|
Better you can try installing VC++ 2008 Runtime in the target maching and if it fails still, you can try other things like copying DLL etc..
You may get some useful information by checking the system event log as it may have details of what error happened when application failed.
--
"Programming is an art that fights back!"
|
|
|
|
|
Thanks. I thought that by setting it to statically link mfc that all the necessary dll's would be imbedded into the binary, thus avoiding having to install the redistributable. Am I wrong?
|
|
|
|
|
Generally if we link statically to mfc, runtime is not needed to install, but I had doubt it may have the missing component to run.
Please check the system event log once to see if there is any useful info.
--
"Programming is an art that fights back!"
|
|
|
|
|
b-rad311 wrote: I thought that by setting it to statically link mfc that all the necessary dll's would be imbedded into the binary
That wouldn't include other dll's you might be using explicitly.
|
|
|
|
|
b-rad311 wrote: the dependency walker has a question mark besides the following dlls:
GPSVC.DLL
IESHIMS.DLL
And where do these dlls come from - are they installed on the target systems? I suspect they are not part of MFC.
It's time for a new signature.
|
|
|
|
|
Put in some tracing[^] and see where your application fails on 'other' machines.
b-rad311 wrote: P.S. The .net framework is the same version for my machine as for the others that I'd like it to run on, so that doesn't seem to be the problem.
An MFC program doesn't depend on .NET framework.
Workout progress:
Current arm size: 14.4in
Desired arm size: 18in
Next Target: 15.4in by Dec 2010
Current training method: HIT
|
|
|
|
|
b-rad311 wrote: No error messages or anything. You briefly get the hour glass and then nothing.
make sure they have a matching run-time release for VS2008. A run-time that is older than yours will offer no error message, only exit. get the latest runtime for your other machines and hopefully all will be well.
_________________________
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
Shhhhh.... I am not really here. I am a figment of your imagination.... I am still in my cave so this must be an illusion....
|
|
|
|
|
Hi, I have an application that I am skinning. The trouble is that it has toolbars that are docked side by side (the side by side article helped with that). The trouble is that there is a divider placed between them. That divider is unfortunately a system color, and I want to either remove it or change that color (cant change system color).
I can't seem to figure out who is drawing that divider to intercept and cause my own cusomtized behavior. Custom drawing of a toolbar doesnt via notifications doesnt seem to cover that divider.
Any help appreciated, thanks in advance.
|
|
|
|
|
Are you talking about the "grippers" to let user drag toolbars around ?
The style CBRS_GRIPPER can be enable/disabled when creating the toolbars.
Watched code never compiles.
|
|
|
|
|
No. I have already removed the grippers. There is a vertical line drawn on either side of a toolbar. It unfortunately is the same as button face color, so most would not notice it except in my skinning, I don't use that color. I wish i could attach a picture...
|
|
|
|