Remove the window styles (SetWindowLong(hwnd,GWL_STYLE,GetWindowLong(hwnd,GWL_STYLE)&~WS_BORDER);) for frames WS_BORDER, WS_DLGFRAME, WS_THICKFRAME etc. or call the CreateWindowEx() without these styles.
I have an MFC application in which I take records from a table in one database (Let's say database A, table A), and insert them into a table in another database (Let's say database B, table B). This is a sort of "database conversion".
The thing is, that in database A the record numbers are not necessarily consecutive (for instance there could be records #1,2 and 4), But in database B the records are inserted to table B with an automatic record number.
Table A (Database A) Table B (Database B)
record #1 ------------> record #1
record #2 ------------> record #2
record #4 ------------> record #3
My problem is that I need to save the record numbers of the records in database/table A, in order to use them later (for database relationship purposes).
(For instance - i need to know that record #3 in database B was actually record #4 in database A).
I used a CArray object to keep the indexes of the records of database/table A, but after I do the "database conversion" I need to use the indexes (of database A) in another application. how can I do this?
By the way, I am using C++ (and MFC) in .Net 2003.
Hello all friends,
I Start to use Visuall Studio .Net 2005(about 40 minutes)
But I open my project in the viuall c
First the project converted to visuall 2005 It's not problem(good)
Now why in the compile my project many errors(terrible)
But in the visuall .Net 2003 it's without errors, then project is created
How to disable "support socket" in the program.?
when i created the project , i selected "support socket".. but in another class, i need to use
<winsock2.h>, so i guess both of them are clashing.. i need to disable the one i which i selected on the wizard... how to go?
I'm trying to list all volumeIDs of a removable storage which has two
partitions. In the Disk Management interface, Windows limits to 1 the
number of partition that you can mount from a removable storage. I'm
trying to programmatically get the volume ID of this second partition
and mount it. I use the piece of code below which works great but list
only the first partition of the removable device.
- Is the VolumeID of the second partition created somewhere but it's
"simply" not listed or isn't it created at all (which would be bad)?
- If it exists, how to get the VolumeID of the second partition and
then mount it?
- If it doesn't exist, how to create it? Or How to modify the storage
type from "removable" to "basic"?
#define BUFFER_SIZE 10240
int g_count = 0;
caDrive = 'A';
caDrive = ':';
caDrive = '\\';
caDrive = 0;
g_count = 0;
// Get all drives in the system.
dwDriveMask = GetLogicalDrives();
if(dwDriveMask == 0)
// Loop for all drives (MAX_DRIVES = 26) for(nLoopIndex = 0; nLoopIndex< 26; nLoopIndex++)
// if a drive is present, if(dwDriveMask & 1)
caDrive = 'A' + nLoopIndex;
//Get its volume info and store it in the global variable. if(GetVolumeNameForVolumeMountPoint(caDrive, volume, BUFFER_SIZE))
g_drives[g_count].letter = caDrive;
dwDriveMask >>= 1;
// success if atleast one removable drive is found. if(g_count == 0)
DWORD dwRequiredSize ;
// GUID_DEVINTERFACE_VOLUME is interface Guid for Volume class
guid = GUID_DEVINTERFACE_VOLUME;
// Get device Information handle for Volume interface
hDevInfo = SetupDiGetClassDevs(&guid, NULL, NULL,
if(hDevInfo == INVALID_HANDLE_VALUE)
// Loop until device interfaces are found. for(dwIndex = 0; ;dwIndex ++)
devInterfaceData.cbSize = sizeof(devInterfaceData);
// Get device Interface data. if(!SetupDiEnumDeviceInterfaces(hDevInfo, NULL,
devInfoData.cbSize = sizeof(devInfoData);
pDevDetail = (PSP_DEVICE_INTERFACE_DETAIL_DATA)buffer;
pDevDetail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
// Get device interface detail data to get // Device Instance from SP_DEVINFO_DATA and // Device Path from SP_DEVICE_INTERFACE_DETAIL_DATA
pDevDetail, // SP_DEVICE_INTERFACE_DETAIL_DATA
&devInfoData); // SP_DEVINFO_DATA // Get the device instance of parent. This points to USBSTOR.
// Get the device instance of grand parent. This points to USB root.
// Get the device ID of the USB root.
CM_Get_Device_ID(devInstParent, buf, BUFFER_SIZE,0);
// Append \ to the DevicePath of SP_DEVICE_INTERFACE_DETAIL_DATA
nLength = wcslen(pDevDetail->DevicePath);
pDevDetail->DevicePath[nLength] = '\\';
pDevDetail->DevicePath[nLength+1] = 0;
MessageBox(0,buf, pDevDetail->DevicePath, 0);
// Get Volume mount point for the device path. if(GetVolumeNameForVolumeMountPoint(pDevDetail->DevicePath, volume,
MessageBox(0,volume, L"VolumeID", 0);
for(nLoopIndex=0; nLoopIndex< g_count; nLoopIndex++)
// Compare volume mount point with the one stored earlier. // If both match, return the corresponding drive letter. if(wcscmp(g_drives[nLoopIndex].volume, volume)==0)
MessageBox( 0, pszdrive,L"Drive",0);
I want to have the mainframe of the app show up, but dont want the childframe view that is automatically created and shown when the app is run (this is just what the appwizard created).Instead I want to use the File menu to launch some other window that I will create later.
How do I get the childview to not show up?
Last Visit: 31-Dec-99 19:00 Last Update: 6-Dec-23 17:24