|
Thanks Christian,
The reason I want to do this is that the executable is running on a remote machine, which (if I do any alterations on the app) I will be updating over a telephone line. If the exe is large it can take for ever to download, hence trying to remove the bitmap from the file and storing it on the remote machine so I only have to download it the once.
Now, to look at the MSDN examples - Ive been away from my PC for a day or two!
Thanks again
Mike
|
|
|
|
|
Do you test WM_PAINT and CImage
the functions CImage are powerful for read and write files (bmp,jpg,png,...) and
in the class are functions for reduce size,...
|
|
|
|
|
does anyone have any ideas for creating a frameless MDI child
|
|
|
|
|
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.
|
|
|
|
|
Hi,
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.
For instance:
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.
|
|
|
|
|
Hi!
The guys over at the managed c++ board sent me looking for answers
to questions regarding standard c++ over here, so here goes.
How can i draw some sort of box (a border) in the console window?
Something like shown at: <ahref=""rel="nofollow">http://www.classicgaming.com/ascii/download_files/textworld/textworld.jpg[^]
A double border isn't necessary, I just want to know how to create such a border
with standard c++.
And how can I determine the size of the console screen (the DOS screen)
and set it so the user cannot change its size?
Thank in advance!
Regards,
Peter
P.S. if anyone tells me that this post doesn't belong on a Visual C++ board, then go yell
at the guys of the Managed C++ board since they sent me here.
|
|
|
|
|
Standard C++ has no support for GUI. You'll need to use a third-party library for that.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
Now that screenshot brings back fond memories.
Peter Charlesworth wrote: A double border isn't necessary, I just want to know how to create such a border
with standard c++.
Here's one example of drawing a box. Convert it to "standard C++" as per your definition.
printf("%c%c%c%c%c\n", 201, 205, 205, 205, 187);
printf("%c %c\n", 186, 186);
printf("%c%c%c%c%c\n", 200, 205, 205, 205, 188); Just make it as big as you need to. Also look at the console functions like SetConsoleCursorPosition() , WriteConsoleOutputCharacter() , and WriteConsole() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks, David!
That's just what I needed.
Now I just have to fiddle around with it until I get how it works...
Regards,
Peter
|
|
|
|
|
|
hi, how can i make controls inside a frame ( not a dialog) , i want to build an application with menu and forms inside the main window ? can anyone help plz?
thanks
|
|
|
|
|
use the CFormView class instead of the default CView class when creating you project.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
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
and run
I use public Classes and methods
Thank you for answer
|
|
|
|
|
Visible_Info wrote: Now why in the compile my project many errors(terrible)
Without knowing what those errors are, and what the code looks like that caused them, it's anybody's guess.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Visible_Info wrote:
Now why in the compile my project many errors(terrible)
Let people know what kind of errors you are getting and someone might be able to help.
|
|
|
|
|
computerguru92382 wrote: Let people know what kind of errors you are getting and someone might be able to help.
My sentiments exactly!
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Just a guess, but I would think the errors are comming in because the new compiler has stricter compliance to the C++ standard than the old one did. The errors are because your code does not conform.
It could also be because the framework you are using (MFC?) has changed in some small way and you are coming up against those changes.
You may be right
I may be crazy
But it just may be a lunatic you’re looking for
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
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?
(VC7)
VuNic
|
|
|
|
|
You can include winsock2.h as many times as you want. However, you might want to just include it once within stdafx.h .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
David Strikes rocks again.;)..
VuNic
|
|
|
|
|
Hello,
Can I apply windows vista look and feel like Windows Media Player 10.0 and Microsoft Office 2003 look and feel.
|
|
|
|
|
yes, of course, please do.
~RaGE();
|
|
|
|
|
Hello,
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.
Questions:
- 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"?
Gregoire
#define BUFFER_SIZE 10240
struct tagDrives
{
WCHAR letter;
WCHAR volume[BUFFER_SIZE];
} g_drives[26];
int g_count = 0;
BOOL GetAllRemovableDisks()
{
WCHAR caDrive[4];
WCHAR volume[BUFFER_SIZE];
int nLoopIndex;
DWORD dwDriveMask;
caDrive[0] = 'A';
caDrive[1] = ':';
caDrive[2] = '\\';
caDrive[3] = 0;
g_count = 0;
dwDriveMask = GetLogicalDrives();
if(dwDriveMask == 0)
{
return FALSE;
}
for(nLoopIndex = 0; nLoopIndex< 26; nLoopIndex++)
{
if(dwDriveMask & 1)
{
caDrive[0] = 'A' + nLoopIndex;
if(GetVolumeNameForVolumeMountPoint(caDrive, volume, BUFFER_SIZE))
{
g_drives[g_count].letter = caDrive[0];
wcscpy(g_drives[g_count].volume, volume);
g_count ++;
}
}
dwDriveMask >>= 1;
}
if(g_count == 0)
{
return FALSE;
}
else
{
return TRUE;
}
}
WCHAR GetSpecificDrive(
LPTSTR lpDevID)
{
HDEVINFO hDevInfo;
GUID guid;
BYTE buffer[BUFFER_SIZE];
DWORD dwRequiredSize ;
WCHAR buf[BUFFER_SIZE];
DEVINST devInstParent;
DWORD dwIndex;
WCHAR volume[BUFFER_SIZE];
int nLength,nLoopIndex;
SP_DEVICE_INTERFACE_DATA devInterfaceData;
SP_DEVINFO_DATA devInfoData;
PSP_DEVICE_INTERFACE_DETAIL_DATA pDevDetail;
devices.
guid = GUID_DEVINTERFACE_VOLUME;
hDevInfo = SetupDiGetClassDevs(&guid, NULL, NULL,
DIGCF_DEVICEINTERFACE |
DIGCF_PRESENT);
if(hDevInfo == INVALID_HANDLE_VALUE)
return 0;
for(dwIndex = 0; ;dwIndex ++)
{
ZeroMemory(&devInterfaceData, sizeof(devInterfaceData));
devInterfaceData.cbSize = sizeof(devInterfaceData);
if(!SetupDiEnumDeviceInterfaces(hDevInfo, NULL,
&guid,dwIndex,&devInterfaceData))
break;
ZeroMemory(&devInfoData, sizeof(devInfoData));
devInfoData.cbSize = sizeof(devInfoData);
pDevDetail = (PSP_DEVICE_INTERFACE_DETAIL_DATA)buffer;
pDevDetail->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
SetupDiGetDeviceInterfaceDetail(hDevInfo,
&devInterfaceData,
pDevDetail,
BUFFER_SIZE,
&dwRequiredSize,
&devInfoData);
CM_Get_Parent(&devInstParent,devInfoData.DevInst, 0);
CM_Get_Parent(&devInstParent,devInstParent, 0);
CM_Get_Device_ID(devInstParent, buf, BUFFER_SIZE,0);
nLength = wcslen(pDevDetail->DevicePath);
pDevDetail->DevicePath[nLength] = '\\';
pDevDetail->DevicePath[nLength+1] = 0;
MessageBox(0,buf, pDevDetail->DevicePath, 0);
if(GetVolumeNameForVolumeMountPoint(pDevDetail->DevicePath, volume,
BUFFER_SIZE))
{
MessageBox(0,volume, L"VolumeID", 0);
for(nLoopIndex=0; nLoopIndex< g_count; nLoopIndex++)
{
if(wcscmp(g_drives[nLoopIndex].volume, volume)==0)
{
WCHAR pszdrive[5];
pszdrive[0]=g_drives[nLoopIndex].letter;
pszdrive[1]='\0';
MessageBox( 0, pszdrive,L"Drive",0);
}
}
}
}
SetupDiDestroyDeviceInfoList(hDevInfo);
return 0;
}
|
|
|
|
|
How can I make a service application from a win32 console application written in c/c++ ?
|
|
|
|
|