|
I do not know if I am right, but I think you have an image within a window and you want to adjust the size of the image dynamically to fit within the window. All you need is to resize the image when the window size is adjusted. Calculate the window size after resize and draw your image in the memory according to the window size and then put it into the window.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I have a C code files. I have to create a Win32 DLL using the .c and .h files. Now when i included this file one by one. Now i am getting the error as "error LNK2005: _DllMain@12 already defined in SPLibrSync.obj". Will anyone please come ahead and solve this problem. Please do the needful.
Thanks.
|
|
|
|
|
The error is telling you that you have two functions with the same name, paramaters and return type defined more than once. It sounds like you are trying to combine the source codes for 2 DLL's into one, if so then you need to also combine the two _DllMain functions into one.
|
|
|
|
|
No, Sir, I dont have two _DllMain functions in my code. I have checked it out.
|
|
|
|
|
Did you put include guards at the top of each of your .h file? Something like this:
#ifndef MYFILE_H
#define MYFILE_H
#endif
(Of course, MYFILE_H changes for each file)
Is the DllMain function declared in a header file ?
You are using a file that is called SPLibrSync.c or SPLibrSync.cpp (or something like this). Is it one of your file ?
|
|
|
|
|
Hi,
I am working on Unicode conversion and getting a problem to convert a character in to UTF-8 format.
can anybody suggest that how to do this conversion.
Regs
Vineet
Vineet Kumar Singhal
Sr.Software Engineer
Mumbai
Tough Time Never last, but Tough People do.
|
|
|
|
|
SKVineet wrote: I am working on Unicode conversion and getting a problem to convert a character in to UTF-8 format.
look at MultiByteToWideChar
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
MultiByteToWideChar() is for converting to UTF-16 only.
|
|
|
|
|
Michael Dunn wrote: is for converting to UTF-16 only.
just a ?.... codepage argument take UTF -8 ?.. is MSDN documentation wrong?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
The codepage argument to MultiByteToWideChar() says what the encoding of the MBCS string is. MultiByteToWideChar() converts from that encoding to UTF-16.
|
|
|
|
|
You'll need the text in UTF-16 first, then call WideCharToMultiByte() passing the CP_UTF8 value for the code page.
|
|
|
|
|
Hi,
I tried with that , but could not found the desired result.
In fact the stepa which I followed are as:
1. First I got the characters in the rtf string for a character(say chinese) I typed.
ex:\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fmodern\\fprq6\\fcharset134 SimSun;}}{\\colortbl ;\\red0\\green0\\blue0;}\\viewkind4\\uc1\\pard\\cf1\\lang5124\\f0\\fs20\\'cc\\'d8\\par}"
This is for the character 特
2.Now I convert the character values in to equavalant unicode number, which I got for this is 29305.
3.Now I want to convert this unicode number in to equavalant UTF-8 character.
Can u suggest something with this scenerio .
Regs
Vineet Kumar Singhal
Sr.Software Engineer
Mumbai
Tough Time Never last, but Tough People do.
|
|
|
|
|
LPCWSTR wszUTF16 = L"\x7279";
char szUTF8[16] = {0};
WideCharToMultiByte(CP_UTF8, 0, wszUTF16, -1, szUTF8, 16, NULL, NULL);
|
|
|
|
|
I would like to know how to modify or add a registry setting?
Please help!
|
|
|
|
|
LaHaHa wrote: I would like to know how to modify or add a registry setting?
I would like to know how to use the search[^] feature. Can it find articles related to the words I type in?
Please help!
|
|
|
|
|
U can access the registry settings by
C:\WINNT\system32\regedt32 file where u can view and edit system registry.
|
|
|
|
|
Suresh H wrote: U can access the registry settings by
C:\WINNT\system32\regedt32 file where u can view and edit system registry.
He intends to do it with his program, I believe and not by opening the registry editor!
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
But the person did not tell.. its through the programs right
|
|
|
|
|
Suresh H wrote: But the person did not tell.. its through the programs right
means if the person ask you notepad ( real one) you will provide him virtual one!.. it is obvious that person on programming forum will ask only programming not regedit.exe
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Suresh H wrote: But the person did not tell.
What do I call you? He need not tell it. You need to know it by yourself! This is a programming forum.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Sorry! I mean write a program to do the registry editing!
Please help!
|
|
|
|
|
LaHaHa wrote: Sorry! I mean write a program to do the registry editing!
try CRegKey... it's very simple!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
The following functions would be helpful to deal with the registry.
<br />
RegOpenKeyEx()<br />
RegQueryValueEx()<br />
RegSetValueEx()<br />
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Thank you very much!
I will try it!
|
|
|
|
|
Hi
I want my appication should display menu in japanese. so how to use loadResString for this.
atul
|
|
|
|