|
I write a program that call more than 1 log function and it give me this error message
"error C2668: 'log' : ambiguous call to overloaded function"
What can I do to resolve this problem??
Thanks in advance.
Best regards,
Pop
|
|
|
|
|
Cast the parameters so they exactly match one of the function definitions.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi there,
I am creating a program that allows me to create the PDF file without using the Distiller. I am stuck in embedding the font. I have tried to use CDC::GetFontData() to read the font data. But still doesn't work.
From PDF documentation, I must include the following tables:
- head - hhea
- loca - maxp
- cvt_ - prep
- glyf - hmtx
- fpgm - cmap
Currently, I used GetFontData() to get the font data and write the BYTE into the file.
Below is the function that I wrote to get the font data:
BYTE * GetFontDataByte(const CDC *pDC, DWORD dwTableName, DWORD & dwSize)
{
dwSize = pDC->GetFontData(dwTableName, 0, 0, 0); //get the buffer size
if(dwSize == -1) return NULL;
BYTE *lpData = new BYTE[dwSize];
if(pDC->GetFontData(dwTableName, 0, lpData, dwSize) == -1) //get the actual font data
{
dwSize = -1;
delete [] lpData;
return NULL;
}
return lpData;
}
Please note: the *pDC contains the selected font. (e.g. pDC->SelectObject(selectedFont);)
Once I got that byte (byte data), I write that byte into PDF Stream. The problem is that everytime I open the PDF file that I created (with embedded font), it always display "Unable to extract the embedded font ..." error message.
Can anyone please help me? I am pretty new with all of this stuff.
Thank you very much in advance.
Ryu Thomas
|
|
|
|
|
Hi to all MASTERs,
Can you please help me out with this problem? I have tried to find the answer through the Internet for past 4 weeks. I am very desperately needed the answer ASAP.
Please help me...
|
|
|
|
|
Do not worry about it anymore. I have solved the problem.
Samin Thomas
|
|
|
|
|
Hai Frens. . .
I need a help...In my application i have to provide a miltiple selection of rows in grid while the Ctrl key is kept pressed. How do i do this.
Can any one guide me. . .
Thanx
|
|
|
|
|
what grid ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Microsoft Flex grid . . .
Can U guide me please
Thanx
|
|
|
|
|
Hello,
I am pretty new to Win32 programming. How do I convert a string to a DWORD?
For example, I want to convert this value:
char *String = "WS_MAXIMIZE";
into a DWORD value. After the conversion, the String should be equal to WindowStyle ( see below )
char *String = "WS_MAXIMIZE";
DWORD WindowStyle = WS_MAXIMIZE;
Here are the correct numeric values:
String = 0x0046c104
WindowStyle = 16777216
I tried type casting:
char *String = "WS_MAXIMIZE";
DWORD WindowStyle = (DWORD)String;
But that made WindowStyle = 9093936 and that's not what I want.
Please tell me how to convert a string (hexadecimal) to a double word.
Thank You.
|
|
|
|
|
Hi
atol converts a string to a double.
char *String="16777216";
DWORD num=atol(String);
I dont think you will be able to convert "WS_MAXIMIZE" to the appropriate number anyway. WS_MAXIMIZE is a macro and macros within "" are not replaced.
Regards
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
What are you trying to achieve ? I can't see any point in
Iceberg76 wrote:
char *String = "WS_MAXIMIZE";
Are you storing some data in a CListCtrl or TreeCtrl ? Or playing with the registry ?
~RaGE();
|
|
|
|
|
WM_MAXIMIZE is a MACRO!!!! Only the compiler can convert it to the number it stands for. Convert a string run-time to the value the software has to know the value.
you could build an array to map these macro strings to their appropriate number.
Don't try it, just do it!
|
|
|
|
|
Well I have a configuration text file that I read in when the app starts. I am using it so I can make easy changes without recompiling and to give to other developers so they can configure the display the way they want to...
So I guess that's what I have to do since they are macros, huh? I'll just read the strings and compare them to an array of known macros and if they are the same I will set them accordingly.
Any other suggestions or ideas will be appreciated.
Thanks
|
|
|
|
|
Despite the fact that WM_MAXIMIZE is a macro...
If I set:
DWORD test = 30343168;
then the numerical value works the same with CreateWindow() as when I use:
test = WS_MAXIMIZE|WS_OVERLAPPEDWINDOW;
Is there no way to compute this numerical value without a compiler?
Is this hex converted to binary then to numeric form?
|
|
|
|
|
Hi Buddie,
I think you have to go for Comparison for performing above task.
like this way <br />
char *String = "WS_MAXIMIZE";<br />
DWORD WindowStyle;<br />
<br />
if(strcmp(String ,"WS_MAXIMIZE")==0)<br />
WindowStyle = WS_MAXIMIZE;
May be that would be right approach for solving this tyoe of problem.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
|
Iceberg76 wrote:
Thank You!
it very nice Hear Thanks
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
hi all,
I already created a Application using MFC,Visual C++6. Now I want to create a Web Interface that runs on Web-Server and users access it via WebBrouser....SO How do I create Such Web Interface...What is the easiest way to do it?...Is there a Componenet to convert Application to Web Interfaces?.
Any One know this,..please reply me soon..
Thanks in advance..
|
|
|
|
|
Nothing will do this for you - the easiest way is ASP.NET (VC#7)
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
HI ,
In SDI application , where can i check the Open Handler Function is written .
That is by Default in Menu File->Open.
thanx
Regards.
|
|
|
|
|
I think you are looking for -
CDocument class member function
virtual BOOL OnOpenDocument()
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
(My COM Blog - http://lovecom.blogspot.com)
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hello Friends,
I am using CListView in my project where I am loading few images from specified path and just below each image I am displaying some text description which is different for all the images.
My problem lies in selection part.
Whenever I select any image either by clicking or by using the arrow keys, the image is getting selected with some blue shade giving an indication of selection, which I don't want it. I had even tried disabling the properites LVS_SELECTED and LVS_SHOWSELALWAYS, but with that one I am not able to retrieve the index of the image.
please help me in solving the problem for the selection of the item in the list control.
Thank you in advance,
Neelesh K J Jain.
|
|
|
|
|
i all,if i want to write a program to close an running application in Windows,what should i do,help me plz!
tien mkjerhk wjh
|
|
|
|
|
Hi,
Get the handle of the running application using FindWindow function and send the WM_CLOSE message using SendMessage
like SendMessage(hWnd,WM_CLOSE,0,0);
Hope this will help you
Sujan
|
|
|
|
|
Is #pragma once needed to be included in header files when writing pure ANSI C/C++? I know that managed code takes pragma once instead of conventional #ifndef, #define and #endif.
The problem is, managed code usually is compiled in Microsoft compiler, so writing #pragma once is no problem.
But when writing ANSI C/C++, one concern is portability, I write ANSI C/C++ code in Microsoft compiler, then I may distribute the code online. Other people may not use Microsoft compiler, and the compiler that they are using may not support #pragma once.
So, do I need to include #pragma once in header files when writing pure ANSI C/C++ code, or do you recommend doing so?
Thanks.
-----------------------------
C++ without virtual functions is not OO. Programming with classes but without dynamic binding is called "object based", but not "object oriented".
|
|
|
|