Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » about the using of unicode in win32 platform
about the using of unicode in win32 platform [message #39016] Thu, 07 February 2013 05:40 Go to previous message
LeiMing is currently offline  LeiMing
Messages: 21
Registered: September 2009
Location: China
Promising Member

today I'm thinking about how to deal with commandline parameter,
and finding that ultimate++ currently using WinMain with LPSTR lpCmdLine parameter.

I think it's better to using unicode via wWinMain with LPWSTR lpCmdLine parameter. I change the macro a little, becoming

C:\upp\uppsrc\CtrlCore\Win32GuiA.h
#define GUI_APP_MAIN \
void GuiMainFn_();\
\
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR lpCmdLine, int nCmdShow) \
{ \
	UPP::Ctrl::InitWin32(hInstance); \
	UPP::coreCmdLine__() = UPP::SplitCmdLine__(UPP::ToUtf8(lpCmdLine)); \
	UPP::AppInitEnvironment__(); \
	UPP::AppExecute__(GuiMainFn_); \
	UPP::Ctrl::CloseTopCtrls(); \
	UPP::Ctrl::ExitWin32(); \
	UPP::AppExit__(); \
	return UPP::GetExitCode(); \
} \
\
void GuiMainFn_()


It works fine for me.
Do you consider about this? I think it's a improvement in internalization.

by the way, is there any official way to get access to argument of execute commandline? I don't know if coreCmdLine__ is the interface for library user.

regards,
LeiMing

[Updated on: Thu, 07 February 2013 05:45]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: compiler's output message of vc10free Chinese edition
Next Topic: 'Upp::Value::Value' : ambiguous call to overloaded function,why?
Goto Forum:
  


Current Time: Fri Apr 19 03:41:40 CEST 2024

Total time taken to generate the page: 0.02982 seconds