|
From MSDN:
Visual C++ supports defining a wmain function
and passing wide-character arguments to your Unicode
application. You declare formal parameters to wmain, using
a format similar to main. You can then pass wide-character
arguments and, optionally, a wide-character environment
pointer to the program. The argv and envp parameters to
wmain are of type wchar_t*. For example:
wmain( int argc, wchar_t *argv[ ], wchar_t *envp[ ] )
|
|
|
|
|
But how to change it from project settings as in MFC?
manually change main to wmain, WinMain to WWinMain, DllMain to WDllMain?
|
|
|
|
|
exe/dll file size alignment is 512 bytes with option /OPT:NOWIN98.
Is 512 bytes minimum size alignment for exe/dll?
I hope change it to smaller, how to do it?
|
|
|
|
|
16 is the minimum size, but IIRC making it smaller than 512 can cause problems. (I also vaguely recall trying 16 on a project and running into a linking issue.)
|
|
|
|
|
Hi Joe, thanks.
I'd like to do a test, could you provide info for how to change the align size?
What does IIRC mean?
|
|
|
|
|
IIRC - If I remember correctly
To change the alignment use the linker option /ALIGN:xxx
|
|
|
|
|
Dear .
Here I have a HTML web page file,such as "MyWeb.html".
Now I read it into CString object,and use to Find some chinese characters.For example:
CString str="";
CStdioFile file;
CString strLine="";
if(!file.Open("MyWeb.html",CFile::modeRead | CFile::typeText,NULL))
{
CString strTemp;
strTemp.Format("Open file error:%d",GetLastError());
MessageBox(strTemp);
return;
}
while(file.ReadString(strLine)){
str = str + strLine;
}
MessageBox(str);
if(str.Find("some chinese characters.")>=1){
MessageBox("the characters is in the file.");
}
file.Close();
My operate system is Chinese Simplified,but this web page is utf-8.when use MessageBox to display all Cstring characters,the english characters display correctly ,but the chinese isn't,is all garbled.
Now what can I do ?
thanks !
Best Reguards !
|
|
|
|
|
did you set your project setting as _UNICODE?
|
|
|
|
|
|
i wanted to do an asignmnt which are look like this!
pictures:
http://lookpic.com/i/974/bowPXhWd.jpeg
from that pictures...the box 1 and 2...what should i use to make that?? edit control or richedit or static box or else??
the box 1 is for the data text...and the box two are for the display of the data 2...like animation>typewritter...
program file:
http://www.mediafire.com/?ymdzm2tjmdn
for your infomation..the box 1 are the text data...that the box 2 are display...
this are my first try...i did not know how to add function to the box...
http://lookpic.com/i/310/qXtrzfLG.jpeg
please lent me some idea..
for your information, i'm new with VS C++
Thanks!
modified on Thursday, October 15, 2009 9:45 PM
|
|
|
|
|
Take a look here[^] at some of the tutorials on The Code Project; they should offer lots of ideas.
|
|
|
|
|
Hi,
I had some code that I was using on a machine with a Low resolution I populated some data in a Rich Edit control
and aligned up things with GetTextExtent
Now when I ported the code to a machine with a higher resolution the text doesn't align properly
Thought GetTextExtent takes things like that into consideration
The one other difference is that the higher resolution machine runs Vista
Do I have to use GetDeviceCaps ???
thankx
|
|
|
|
|
GetTextExtent is used to get the width and height of a string.
But how and what do you mean by aligning it?
You will need to post the relevant code.
|
|
|
|
|
Here's is the code and I'll try to explain what I am doing
LPCTSTR teststr = "XXXXXX 01234567 89ABCDEF 01234567 89ABCDEF";
Myricheditctrl* Myrichptr = &Myrich;
CClientDC mydc(Myrichptr);
Csize.mysize = mydc.GetTextExtent(teststr,53);
I trying to dump storage 16 bytes per line
using tester to represent the number of spaces between character
I use Setsel and ReplaceSel to replace "XXXXXX" with 000010 ... 0000020
On two of my machines running Windows XP though I dont think this has anything to do with XP
I was able to re-size my Richedit control to fit 16 bytes of storage with a location on the left
using the above code now on My Laptop which has a sharper resolution then two machine the code wraps
Hope I explained it somewhat better
|
|
|
|
|
You may want to use SetFont[^] on your richedit control so that it always uses the same font.
The default font used by the richedit control in both machines are probably different.
|
|
|
|
|
|
When did you wake up, pal? You've posted answers at around 5 AM IST and all?! Did you not sleep at all?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I'm in the U.S right now on an assignment.
|
|
|
|
|
Thank God.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Those sleepless times are all long gone man.
|
|
|
|
|
Please Help I want c or c++ program to solve 8 puzzle problem using depth first search and breadth first search and each search print out cpu time and memory space of the queue
|
|
|
|
|
No one is going to "give" you code. You have to show your work and ask for help with problems you are experiencing
AF Pilot
|
|
|
|
|
Wrong forum: You should post in the gimme codez one.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
khatatbeh20092 wrote: I want c or c++ program
I want Megan Fox in her underwear serving me breakfast every morning.
|
|
|
|
|
Heres an exciting thought - you've probably got a better chance of getting what you want than the OP!!
|
|
|
|