|
rasha2003 wrote:
I am sorry but it was really silly mistake and if I add I will get too many comments on that …
If the comment you receive is from a professional, it would probably have something constructive in it. Otherwise, if the comment was laced with this-is-crap, what-were-you-thinking, and isn't-it-obvious remarks, you can ignore those anyhow as they serve no other purpose than to humiliate.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi..
thank you for that next time i will remember that
|
|
|
|
|
I have a control which when i used in c#. i get the method ShowPropertyPages() through which it displays its properties but when i try the same in VC.NET i will get the error that there is no method ShowPropertyPages defined in the class. what am i doing wrong or what i have to do so that this error will overcome
Thanx in advance
Regards
INAM
Inam
|
|
|
|
|
In my application I am creating an exe file. In that I have embeded an icon. The correct icon is being displayed in windows explorer. But when "on right-click on the exe"/"General tab" displays some other icon. This strange behaviour has been observed in Winodows 98, 95 operating systems.
I have verified the embeded icon inside the exe using "icon grabber" & "resource hacker" applications. It has embeded the correct icon. It does not have the worng icon. (which is getting displayed when "on right-click on the exe"/"General tab")
-Koti
|
|
|
|
|
Does the icon contains both 16x16 and 32x32 bitmaps ?
|
|
|
|
|
Yes. Icon contains both bitmaps.
Thanks,
-Koti
|
|
|
|
|
Hi
I want to write an application , which whenever connects with a FTP Server could tell me wether contents on FTP server has changed since last visit , if changed highlight the changes.
Is there some option in FTP RFC.Thanks
No Worries!
|
|
|
|
|
AFAIR, the FTP-RFC does not define any command or standard by which you could determine if the contents of a server have changed.
But this function would be quite easy to implement:
You request the directory you want to watch. The contents are then saved in a file for future reference. The next time you request that directory, you simply compare the two to check for changes.
Greetings from Germany
Sebastian
|
|
|
|
|
Can someone help me with the code on how can I import the registry information a a specified location to an access database? I am doing a project in Visual C++ to import all installed software information from registry to a database and would appriciate very much for inputs.
|
|
|
|
|
First, you need code that reads information from the registry. Second, you need code that adds information to a data source. Once you have these two in place (they can work independently at first), you can make the appropriate changes such that the output from the former is the input to the latter.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
how do i programatically determine wheather the user has chosen webview or not programatically.
I have tried ShGetSettings but no luck.
Thanx in advance.
Toughest Steel Comes From Hottest Furnance
|
|
|
|
|
Hi,
I'm using CHtmlEditView/CHtmlEditDoc in VC 6.0. It's working well but in testing I found one bug and I could not trace it out yet. i.e. In some times while the user working with editor, suddenly the view becomes blank and the source file size becomes zero. Still I could not find which action makes it blank, I could not trace it out.
Kindly help, what could be the problem to make the entire file blank and is there any chance to happen this in edit/view mode of CHtmlEditView/Doc?
Is anybody hit with this problem?
Very thanks.
Regards,
Palani VS
|
|
|
|
|
I have a bitmap in my app that contains two icons.
I load the bitmap into an image list and associate it with a list control
During run time I set the bitmap list this
LV_ITEM lvItem;
lvItem.mask = LVIF_IMAGE;
lvItem.iItem = itemIndex;
lvItem.iImage = imageIndex;
m_listTest.SetItem(&lvItem);
where imageIndex is 0 or 1
In debug mode this works fine I can swap between icons no worries but in release mode I always get the icon at position 0 no matter what imageIndex is set to!
Im so sick of release problems with MFC. Can anyone help.
|
|
|
|
|
I'm currently trying to obtain some information about my mother board using WMI in VC++6. I've had a read of the MSDN documenation on the Win32_BaseBoard class but I'm still not sure of how WMI all works. Would someone who knows a bit about WMI please provide some code samples to get me started.
Much appreciated.
|
|
|
|
|
Here's one way:
HRESULT hr;
_variant_t v;
ULONG ulReturned;
DWORD dwAuthLevel;
IWbemLocator *pLocator;
IWbemServices *pService = NULL;
IEnumWbemClassObject *pEnum = NULL;
IWbemClassObject *pClass;
hr = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLocator);
if (S_OK == hr)
{
hr = pLocator->ConnectServer(_bstr_t(L"root\\cimv2"), NULL, NULL, NULL, NULL, 0, NULL, &pService);
if (WBEM_S_NO_ERROR == hr)
{
hr = CoQueryProxyBlanket(pService, NULL, NULL, NULL, &dwAuthLevel, NULL, NULL, NULL);
hr = CoSetProxyBlanket(pService, RPC_C_AUTHN_DEFAULT, RPC_C_AUTHZ_NONE, NULL, dwAuthLevel, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE);
hr = pService->CreateInstanceEnum(_bstr_t("Win32_Baseboard"), WBEM_FLAG_RETURN_IMMEDIATELY | WBEM_FLAG_FORWARD_ONLY, NULL, &pEnum);
if (WBEM_S_NO_ERROR == hr)
{
do
{
hr = pEnum->Next(WBEM_INFINITE, 1, &pClass, &ulReturned);
if (WBEM_S_NO_ERROR == hr)
{
hr = pClass->Get(L"Caption", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("Caption = %S\n", V_BSTR(&v));
hr = pClass->Get(L"ConfigOptions", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
{
LONG lBound;
BSTR Value;
SafeArrayGetUBound(V_ARRAY(&v), 1, &lBound);
while (lBound >= 0)
{
SafeArrayGetElement(V_ARRAY(&v), &lBound, &Value);
TRACE("ConfigOptions[%u] = %S\n", lBound, Value);
lBound--;
}
}
hr = pClass->Get(L"Depth", 0, &v, NULL, NULL);
if (VT_NULL != v.vt)
TRACE("Depth = %f\n", V_R4(&v));
pClass->Release();
}
} while (WBEM_S_NO_ERROR == hr);
pEnum->Release();
}
pService->Release();
}
pLocator->Release();
}
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I have a template Collection class defined as so (only a small portion of the class is shown here):
template < class T >
class Collection
{
public:
Collection();
virtual ~Collection();
public:
long add (T* pObject);
T* getAt (long nIndex);
...
}
I declare an instance of a Collection like so:
Collection< Foo > m_collectionOfFooObjects;
My project compiles fine, but I get several unresolved symbol link errors, one for each Collection method that returns a T* or void . The linker seems to have no problem finding methods that return long (eg: add() ). I'm sure I'm doing something wrong but can't figure out what. Any help would be appreciated. Thanks!
(PS: The Collection class does more than store a collection of objects, hence it's more convenient to brew my own than use an STL or MFC object.)
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Where are these functions declared? They can not be placed in a cpp file. They must be in with the H file.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Yes, they're in a .cpp file. Drat, I wanted to hide their implementation from the user, but I guess that may not be easy/possible.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
guess that may not be easy/possible.
Not possible (since templates are a compile-time thing). There was a bit of talk a while back about (proprietary) compiler extensions to allow template implementations to be hidden in a .LIB but I haven't anything about that for a while.
Lets be honest, isn't it amazing how many truly stupid people you meet during the course of the day. Carry around a pad and pencil, you'll have twenty or thirty names by the end of the day - George Carlin
Awasu 1.2.1 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Thanks! Nemanja's article explains why what I was trying to do won't work.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
It's a template, not a class! Thanks, I get it now!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
bascially i have an IP Address contained in a CString "10.10.10.1"
i need a unsigned long representation of it.
here is the function im using below but
im not sure, if its right..
its hit and miss, works sometimes not others..
can anyone recommend an easier way of doing it
or point out errors in the function
int check1;
CString m_ipSrc;
unsigned long srcIp
check1 = convertAddress(m_ipSrc, &srcIp)
int DlgClass::convertAddress(const char *sIp, unsigned long *lIp)
{
int octets[4];
int i;
const char * auxCad = sIp;
*lIp = 0;
for(i = 0; i < 4; i++)
{
octets[i] = atoi(auxCad);
*lIp |= (octets[i] << (i*8));
auxCad = strchr(auxCad, '.');
auxCad++;
}
return 0;
}
|
|
|
|
|
|
I have created a dialog to handle the joystick inputs, just to check that I obtain the data.
However the move joystick and joy button changed events dont seem to be firing.
BEGIN_MESSAGE_MAP(CMSCPPDlg, CDialog)
//{{AFX_MSG_MAP(CMSCPPDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_GET_STATUS, OnGetStatus)
ON_BN_CLICKED(IDC_START, OnStart)
//}}AFX_MSG_MAP
ON_MESSAGE(MM_JOY1BUTTONDOWN, OnJoy1ButtonDown)
ON_MESSAGE(MM_JOY1BUTTONUP, OnJoy1ButtonUp)
ON_MESSAGE(MM_JOY1MOVE, OnJoy1Move)
END_MESSAGE_MAP()
I start the capture via:
void CMSCPPDlg::OnStart()
{
/* This procedure starts or stops the capture of the Joystick movement and
button presses. */
static bool capture = false;
int error;
if(!capture)
{ // Start the capture
error = joySetCapture(this->m_hWnd, JOYSTICKID1, NULL, FALSE);
if (error == MMSYSERR_NODRIVER)
MessageBox("The joystick driver is not present", "Error when capturing", MB_ICONERROR);
if (error == MMSYSERR_INVALPARAM)
MessageBox("Windows 95/98/Me: Invalid joystick ID or hwnd is NULL.", "Error when capturing", MB_ICONERROR);
if (error == JOYERR_NOCANDO)
MessageBox("Cannot capture joystick input because a required service (such as a Windows timer) is unavailable.", "Error when capturing", MB_ICONERROR);
if (error == JOYERR_UNPLUGGED)
MessageBox("The specified joystick is not connected to the system. ", "Error when capturing", MB_ICONERROR);
else
{
MessageBox("The joystick has been captured");
capture = true;
}
}
else
{ // Release the Joystick capture
joyReleaseCapture(JOYSTICKID1);
capture = false;
MessageBox("The joystick has been released");
}
}
I have placed breakpoints in the OnJoy1Move & JOY1BUTTONDOWN and they are never reached.
grahamfff
|
|
|
|
|