|
|
Should I understand that is not enough to find somewhere altimage.h and include in foolder project ? Because my error is :
E:\Flaviu\Temp\ImageComparator\ImageComparator\stdafx.h(44): Could not find the file atlimage.h.
|
|
|
|
|
it cannot be included from external source, it is the part of atl library. And VC6 doesnot contains it.
atlimage.h is found from vs2003 or maybe vs2002 and above.
you can use WIN32 way to accomplish your task.
Regards,
Vishal
|
|
|
|
|
I think that I understand now thank you.
|
|
|
|
|
Hi, I am facing a strange font problem
<br />
Font Name : Aparajita<br />
Language : Hindi<br />
<br />
Platform : C++ Win32 (NO MFC)
I created a dialog with a simple edit control.
When i enter the path displayed below in the edit control,
Everything is displayed in correct size,
But only the hindi text is displayed very small. Just unreadable.
Path Entered: C:\Hello World\सरकारी\Files
I have tested this with Chinese Font. It is ok.
How to over come this problem. Please help.
Thanx 4 everyone, problem solved.
Regards,
Vishal
modified on Wednesday, June 8, 2011 12:11 AM
|
|
|
|
|
Make all the text smaller and no one will notice... 
|
|
|
|
|
i can't, becoz if i make all the text smaller the hindi text seems like dot dot dot...
Regards,
Vishal
|
|
|
|
|
I've never played with different texts... so can't help too much there...
|
|
|
|
|
1) Is Aparajita is Hindi font and
2) Is सरकारी is unicode string or ascii string?
If it is unicode than you must choose the font as Mangal and than check.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
SP 24 wrote: 1) Is Aparajita is Hindi font and
Yes
SP 24 wrote: 2) Is सरकारी is unicode string or ascii string?
Unicode String
SP 24 wrote: If it is unicode than you must choose the font as Mangal and than check.
Checked with Mangal. The result is same.
Actually the string contains both english and hindi.
Regards,
Vishal
|
|
|
|
|
I am facing this problem with Bengali and Oriya only but not in Hindi. Please check that you have Mangal font installed in your system?
It should be in SystemDrive:\Windows\Fonts folder. One more thing that I do is copy the font of mangal in Windows 7 or Vista and installed it in your pc. Might be your problem is resolved.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
can you check you aprajita font in font folder, what is the maximum size it's support?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi Alok ji,
Please ask this question to Vishal .
BTW the string is Unicode than there is no need to set the Hindi font. He can set Mangal instead.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
SP 24 wrote: Please ask this question to Vishal .
yeap.... thanks!
SP 24 wrote: there is no need to set the Hindi font. He can set Mangal instead.
some times it's project requirement to use some particular fonts and never depend on UNICODE based on size and shape they take
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok yeap.... thanks!
ThatsAlok some times it's project requirement to use some particular fonts and never depend on UNICODE based on size and shape they take
Yae but for English and Unicode font, I don't think so that it is being used.
For an example if I have English string might be "abcd" and I set some Hindi font. If any shape is mapped in that Hindi font than it might be a hindi value without meaning. So for English font we have to take care of it.
Example :
In some Hindi font "a is mapped with shape क" and in some other font may be "a is mapped with shape अ".
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
Aprajita Font maximum size is 72. I had tried Mangal Font also, but no success.
Regards,
Vishal
|
|
|
|
|
Did you check the font in fonts folder ??
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
SP 24 wrote: Did you check the font in fonts folder ??
Yes checked.
Same problem with bengali font. Oriya not checked.
Regards,
Vishal
|
|
|
|
|
vishalgpt wrote: Yes checked.
It means that your font is in font folder. Right.
Now open Winword and write the path that you want to show in edit control and select all and set the font Mangal and check it is same as displayed in your edit control. If yes than try to check with different size.
Or copy the Mangal font from vista and windows 7 machine. New version of Mangal font looking nice.May be your problem is resolved by installing it in your system.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
SP 24 wrote: It means that your font is in font folder. Right.
YES.
It is ok with winword. But not with Edit Control. I am on Windows 7.
Regards,
Vishal
|
|
|
|
|
Please share your code where you set the font in Edit control.
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)
"Your thoughts are the architects of your destiny."
|
|
|
|
|
Can't say a thing without seeing your code.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
So, got no idea why this is not working but it simply not working.
SIZE_T BASE_BUFFER_SIZE = 512;
BYTE * bInitialBuffer = NULL;
bInitialBuffer = (BYTE *)VirtualAlloc(0,
BASE_BUFFER_SIZE, MEM_RESERVE, PAGE_READWRITE);
if(bInitialBuffer == NULL)
{
TRACE("VirtualAlloc failed!");
return NULL;
}
DWORD dwReadBytes;
while (FALSE != ReadFile(hDevice, bInitialBuffer, BASE_BUFFER_SIZE,
(LPDWORD)&dwReadBytes, 0) && dwReadBytes > 0)
{
TRACE1("got buffer! %d",dwReadBytes );
}
if(dwReadBytes <= 0) TRACE("failed!");
GetLAstError() returns Invalid access to memory location.
I am dealing with virtual alloc for a first time :P
What am i doing wrong?
Thanks
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|
|
csrss wrote: VirtualAlloc(0,
BASE_BUFFER_SIZE, MEM_RESERVE, PAGE_READWRITE);
Just a hunch. The doc says that MEM_RESERVE flag Reserves a range of the process's virtual address space without allocating any actual physical storage in memory or in the paging file on disk.
If you're actually going to do something with the memory, MEM_COMMIT may be a good option (you could combine flags, like MEM_RESERVE | MEM_COMMIT ). At least the doc[^] says so.
You also failed to tell what's "not working". I'm assuming that your ReadFile call failed, and GetLastError returns invalid access to memory location. Reading that, I'm assuming that since you're just reserving memory with your VirtualAlloc call, and not committing it before using, you're getting an invalid access error.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
Yep, you are right. But here with this stuff i got more and more problems. For example, i cannot return bytes from function, (this code is a function, which should read a file into BYTE array and return this array among with nr of bytes read).
BYTE *ReadBytes(HANDLE hDevice, LPDWORD lpdwBytesRead)
{
SIZE_T BASE_BUFFER_SIZE = 512;
BYTE * bInitialBuffer = NULL;
bInitialBuffer = (BYTE *)VirtualAlloc(0,
BASE_BUFFER_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
if(bInitialBuffer == NULL)
{
TRACE("VirtualAlloc failed!");
return NULL;
}
DWORD dwReadBytes;
while (FALSE != ReadFile(hDevice, bInitialBuffer, BASE_BUFFER_SIZE,
(LPDWORD)&dwReadBytes, 0) && dwReadBytes > 0)
{
TRACE1("got some buffer! %d", dwReadBytes);
lpdwBytesRead += dwReadBytes;
}
return bInitialBuffer;
}
and if i call it:
DWORD read = 0;
BYTE *DataBuffer = ReadBytes(hFile, &read);
read is always zero, and i got no bytes returned from function... And i cannot use just defined size (skip memory allocation).
Help ;(
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|