|
Can we convert BMP to JPG image using VC++. If so what is the code that has to be written in VC++.
|
|
|
|
|
There are many solutions such as
CImage of MFC(or ATL), some third party libraries such as jpeglib.lib , CImageX etc.
Unmanaged in a .NET world
|
|
|
|
|
Take a look at the CxImage class here at cp.com
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You also have the ability to do it in GDI+.
|
|
|
|
|
Hi,
I have a normal Doc/View application, and i see that even if i call AfxEnableControlContainer() the m_pOccManager of the AFX_MODULE_STATE remains NULL - and then all my OCX's crash...
any ideas? tried CoInitialize(NULL); as well, nothing seems to help
10x!
|
|
|
|
|
Hi All,
How to make Localised .dll for my project. I want to a separate .dll for Localisation. It will be loaded during application initialisation.
Waiting for your positive response.
Regards
Patra
|
|
|
|
|
You create an empty DLL, copy all the resources of the original project to it. Translate and compile.
In the application app-class InitInstance , call AfxLoadLibrary to load the DLL. Save the return value in a HINSTANCE member of the class. Call AfxSetResourceHandle with this HINSTANCE to use the localized DLL. Finally, in ExitInstance , call AfxFreeLibrary with the HINSTANCE .
|
|
|
|
|
|
Take a look at SmartTrans. It works well for single exe projects. It will take your .EXE and using a glossary you supply (english to other language), will create a new EXE with all the resources translated.
I've written an update to handle multiple dll projects, but not submitted it yet. Basically it will scan all the sub projects and create a single resource DLL with all the translated resources. Then you load this DLL when necessary.
|
|
|
|
|
Does anyone know where I can find an API to create snapshot documents (like Access does), but I want to use MFC/C++.
Cheers
|
|
|
|
|
whats a snapshot document?
like a screen capture?
|
|
|
|
|
A snapshot document is sort of like a PDF.
It's a self contained report document that includes text, formatting, pictures etc, and can be viewed on any Windows PC via the SnapShot Viewer (free download).
It's normally created from a report by Microsoft Access, but I thought there may be another way.
I could write a PDF file, but I don't really want to pay for a library to do it, and the free examples I've seen don't really cover everthing I need to do.
|
|
|
|
|
Hi,
We had the shortcuts in our program. However, after implementing the keypressed handler, we cannot use the shortcuts. We will be very glad if anyone proposes a solution.
Thanx in advance,
|
|
|
|
|
A solution might be proposed if the amount of information was a little less scant What kind of "keypress handler"? Defined where? What does it contain?
|
|
|
|
|
I'm working on an application (Visual C++, MFC, Windows NT/2000/XP) which can be run on a pen tablet computer or a desktop computer. I'd like to detect whether a keyboard is connected or not.
How can I detect the physical presence of a keyboard ? Since the BIOS can tell us if there is no keyboard, this should be possible. The associated information available on the WMI (Windows Management Instrumentation) layer of Windows don't seem reliable...
Tarzan.
|
|
|
|
|
|
Hi!
Is there anyway to access the harddisk in byte mode? I mean I want to
get the bytes and modify them or delete them for real... I found some
examples for the assembly language... well is it possible
with c++ without mfc?
Thank you very much for your answers in advance!
Well... I am a beginner ...
|
|
|
|
|
You can mix your assembly codes into your C++ codes
like
ULONG ulReturn = 0x00000000;
__asm
{
mov eax, ulReturn
................
mov ulReturn, eax
}
Don't you like C++ for this.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Wow... I didn't know that! Thanks a lot!
Well... I am a beginner ...
|
|
|
|
|
Accessing the disk directly is not possible on NT-based machines. Goggle for HAL to see why/how it keeps non ring-0 applications from accessing the hardware. You can create a driver to do this, however, but that is not a trivial task.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
"directly" is ambigious, i think.
Under NT, it is much easier to access a hard disk than it is in Win 9x.
All you need to do is call the CreateFile() function with a "filename" of \\.\PHYSICALDRIVE0 for the first physical hdd and so on, or for logical drives: \\.\C:
You can read (not write), data using the ReadFile() function.
Writing would need a device driver.
Under 9x, you cannot use this method. You have to revrt to using the INT13 or INT13 Extended functions for the purpose. And that means writing a 16-bit VxD in VC++ 2.x or Borland C++.
Bikram Singh
|
|
|
|
|
hDriver = CreateFile("\\\\.\\physicaldrive0", ...) uses a generic symbolic link to get access to the driver that represents the first physical drive.
bikram singh wrote:
You can read ... data using the ReadFile() function.
Certainly you can. ReadFile(hDriver, &data, 512, &dwRead, NULL) will work just fine for reading the MBR of the first physical drive.
Access to PhysicalDrivexx devices is restricted to administrator-level accounts. To bypass HAL (e.g., virus scanner) would require a device driver.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
Certainly you can. ReadFile(hDriver, &data, 512, &dwRead, NULL) will work just fine for reading the MBR of the first physical drive.
It works for for any sector on the hard disk. Except the ones the hdd controller has marked as "bad" in it's cmos memory.
DavidCrow wrote:
Access to PhysicalDrivexx devices is restricted to administrator-level accounts. To bypass HAL (e.g., virus scanner) would require a device driver.
Thats true. Win some, lose some!
ps. have you worked on a FSFD? When I made mine, I was just so totally confused! The IFS DDK I dont have access to, so it was a really jittery experience!
Bikram Singh
|
|
|
|
|
bikram singh wrote:
It works for for any sector on the hard disk. Except the ones the hdd controller has marked as "bad" in it's cmos memory.
My bad. I read your earlier post as "You can not read..." which is why I was providing an example that showed otherwise. I'll need to not be so quick with my trigger finger!
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hello,
anyone knows if any libraries for creating a wav file (RIFF complaint) exists starting from an mp3 ( or even only creating it with audio-bytes in memory..
thanks
|
|
|
|