|
I am new to VC++. Can you please elaborate the solution.
Ram
|
|
|
|
|
Ram, you could experiment with resizing the toolbar area but I am not sure if this would work. Most of the time when you try to resize a Microsoft piece such as the taskbar it will not allow it.
Creating a floating toolbar window and placing it near the clock is the most straight forward. This would involve creating a window and message handler within the main program to display the text.
|
|
|
|
|
Hi all
Could anyone help me with a recursive function to
1) Search all the files in a given directory path ?
2) To search specific files (fr ex *.jpg etc)
I am newbie to this area .
Any one to tell me ?
redindian
|
|
|
|
|
dharani wrote:
Could anyone help me with a recursive function to
1) Search all the files in a given directory path ?
2) To search specific files (fr ex *.jpg etc)
Why don't you use CFileFind class directly
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
have you tried FindFirstFile and FindNextFile already?
|
|
|
|
|
I have an application, which does not have a window handle.
I need to get a CString data from another window of different process.
Can i use WM_COPYDATA to send the CString data? How?
The other window application is also written by me.
- NS -
|
|
|
|
|
NS17 wrote:
I have an application, which does not have a window handle.
I need to get a CString data from another window of different process.
Can i use WM_COPYDATA to send the CString data? How?
Nope you cannot use WM_COPYDATA in you listed Scenario... but what you can use shared memory in this scenario...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Create a global ATOM that has the string then pass the ATOM value between applications with a user defined message (WM_USER).
|
|
|
|
|
Help me please, cos there's no help on the web either for this topic.
The platform is Windows XP service pack 2.
I have installed VS.Net 2003 and several other compilers such as Metrowerks CodeWarrior for Symbian OS C++, Symbian OS SDK.... and that's all. Well also the SDKs for Java and J2EE.
But Im baffled, when I try to install from the Hard drive it goes into the installer but fails to go beyond " Searching for installed components ". Why is this happening ? I tried several times but failed. I even uninstalled the Metrowerks compiler hoping that there might be some dependencies, but that doesnt work either. I didnt remove VS.Net yet cos I dont want to go thru the trouble of reinstalling it again. What do u suggest I should do.
P.S. A month back I tried installing VS6 from a CD. But I think the CD was corrupt, since the installation went fine, except for copying certain files. However the installation aborted cos these files were corrupt. Im jus thinkin, if that "half installation" could have effects on this strange behaviour.
|
|
|
|
|
I have a C# code below:
Header=Encoding.ASCII.GetString(Header_byte);
How to convert it into visual c++?
I really weak in programming, can somebody help me..
|
|
|
|
|
Anyone know if Access 97 can work on Windows XP. Hoping there is a conversion, 'cause I can't get it to work
HELP
|
|
|
|
|
I am writing a small application using ODBC API calls to display unicode character. For example, euro sign, the hex value is 0x20AC. How can I display the euro sign character through its hex value in VC++?
Thanks,
- Colin
|
|
|
|
|
For our next release, we need to import data from a competitor's product. They use Microsoft Access/Jet. I do know I'll need to install a run-time on the user's system, but am not sure what package that I should be looking at.
As a side note, does anyone have suggestions on the best run-time solutions to read (not write) Access/Jet files? Is there a third party tool available that can read the files directly and do a data dump?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
You don't need much, just MDAC and the Jet drivers. Both of those are distributed as part of the OS with Windows 2000 and above, but not for NT4. No idea about Windows 9x/Me.
Links: MDAC[^] and the Jet drivers[^].
|
|
|
|
|
Thanks much (I was confused about the relationship of MDAC with Jet.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
hi, maybe someone can help me to with my code.
I need to sort some tchars which are stored in a struct array by "szNtDeviceName". I tried to use qsort but I'm a noob in C++ and not familiar with pointers, so I can't get it running.
here is the code:
#define _WIN32_WINNT 0x0501
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
#include <cstring>
#include <string.h>
#include <stdlib.h>
#define BUFSIZE MAX_PATH
#define MAXDRIVELETTERS 25
struct DriveInfo
{
bool bIsValidLogicalDrive;
TCHAR szDriveLetter[4];
TCHAR szVolumeName[BUFSIZE];
TCHAR szNtDeviceName[BUFSIZE];
};
int compare( const void *, const void * );
int _tmain(int argc, _TCHAR* argv[])
{
BOOL bFlag;
TCHAR Buf[BUFSIZE]; // temporary buffer for volume name
TCHAR Drive[] = TEXT("c:\\"); // template drive specifier
TCHAR Temp[] = TEXT("c:\\"); // template drive specifier
TCHAR I; // generic loop counter
int i = 0;
char szNtDeviceNameTemp[BUFSIZE]; // temporary buffer for NTDeviceName
int iVolumeMountPoints = 0;
DriveInfo* Arr = new DriveInfo[MAXDRIVELETTERS];
// Walk through legal drive letters, skipping floppies.
for (I = TEXT('c'); I < TEXT('z'); I++ ){
// Stamp the drive for the appropriate letter.
Drive[0] = I;
//LogicalDrivesArray[i].szDriveLetter=I;
bFlag = GetVolumeNameForVolumeMountPoint(
Drive, // input volume mount point or directory
Buf, // output volume name buffer
BUFSIZE // size of volume name buffer
);
if (bFlag){
//found MountPoint add them to array
lstrcpy(Arr[iVolumeMountPoints].szVolumeName, Buf);
Arr[iVolumeMountPoints].bIsValidLogicalDrive = true;
// remove end backslash for query
Temp[0] = Drive[0];
Temp[1] = Drive[1];
Temp[2] = '\0';
lstrcpy(Arr[iVolumeMountPoints].szDriveLetter, Temp);
// get NTDeviceName from DriveLetter
if (QueryDosDevice (Temp, szNtDeviceNameTemp, MAX_PATH)){
lstrcpy(Arr[iVolumeMountPoints].szNtDeviceName, szNtDeviceNameTemp);
}
iVolumeMountPoints++;
}
}
// unsing quicksort to sort by .szNtDeviceName
qsort( Arr, sizeof(Arr[0].szNtDeviceName ), sizeof(Arr[0]), compare );
if (iVolumeMountPoints>0){
printf("%i VolumeMountPoint(s) found\n", iVolumeMountPoints);
for (i=0; i<iVolumeMountPoints; i++){
//if (Arr[i].bIsValidLogicalDrive){
printf("\n%s %s %s", Arr[i].szDriveLetter, Arr[i].szVolumeName, Arr[i].szNtDeviceName);
//}
}
}
else{
printf("no VolumeMountPoint found");
}
//cleanup array
delete[] Arr;
return 0;
}
int compare( const void *a, const void *b )
{
DriveInfo **pa = (DriveInfo **) a, **pb = (DriveInfo **) b;
/* Compare */
return strcmp( (*pa)->szNtDeviceName, (*pb)->szNtDeviceName );
}
|
|
|
|
|
qsort (Arr,
MAXDRIVELETTERS
sizeof (DriveInfo)
compare);
int compare (const void *a, const void *b)
{
DriveInfo *pa = (DriveInfo *)a, *pb = (DriveInfo *)b;
return _tcscmp(pa->szNtDeviceNmae, pb->szNtDeviceName);
}
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
How will I be able to call VB forms and get along with their forms and dialogs? is it possible? if not, is there a way to link VB and VC++ together?
|
|
|
|
|
as far as i know there is not
direct way to use a form created by VC
in a VC++ application.
If u get to know inform me also.
U can create an Active X and then use it .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I just found out that using COM/ATL will allow you to make dll files in VC++ to be used and called by VB.
|
|
|
|
|
Hi,
I am doing a project in win32. I need to delete a registry key and before that I want to set the permissions of that particular key to be able to delete it.
how do I set the permissions and what permissions do I set in order to delete the key.
Pls help.Thanks.
|
|
|
|
|
Something like this comes to mind:
RegOpenKeyEx()
GetSecurityInfo(hKey, ...)
BuildExplicitAccessWithName(..., DELETE, GRANT_ACCESS, CONTAINER_INHERIT_ACE)
SetEntriesInAcl(1, ...)
SetSecurityInfo(hKey, ...)
RegCloseKey(hKey)
RegDeleteKey()
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
That's an odd situation you're describing. You're saying that you don't have permission to delete the key, but you do have permission to change the permissions?
|
|
|
|
|
Hi
I copied source files and its interfaces from one project to another , and even I've copied the Dialog resource.When I compile it gives errors
error C2065: 'IDC_MASS_RANGE_PANEL' : undeclared identifier
'IDC_MASS_RANGE_MIN_BOXES' : undeclared identifier
The source code is
m_rangeLabelsPanel->Create("", WS_VISIBLE | WS_CHILD, rect, this, (IDC_MASS_RANGE_PANEL));
The only solution I do is to modify the resource.h file each time I get this error with some random numbers.Is it the correct way? Is there anything I must change ? any help is highly appreciated..
|
|
|
|
|
Did you copy or cut and paste the needed entries from resource.h?
Dave
|
|
|
|