|
hi all
i want to convert wstrint to WCHAR* how to do that?
i am getting following error:
error C2664: 'UnicodeToUtf8' : cannot convert parameter 1 from 'std::wstring *__w64 ' to 'const WCHAR *'
|
|
|
|
|
use the c_str() method of wstring for instance:
std::wstring myWideString = L"FOO";
const WCHAR * pMyWideString = myWideString.c_str();
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.
|
|
|
|
|
C_str()
"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
|
|
|
|
|
How can we hide a column in a list control, an option is to set the column width to zero, but it can be visually identified by maipulating header of zero width column.
|
|
|
|
|
|
Thanks
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hi,
I want to define preprocessor constants in command line.
In source it would be something like this:
#define STR_SOMETHING "something"
Now how can I get the same result in command line using /D?
I tried in VS 2005, in Project Property Pages->Configuration Properties-> C/C++->Preprocessor-> Preprocessor Definitions…
Adding STR_SOMETHING=”something” doesn’t work. In Command line it looks like this:
/D "SOMETHING="something"".
The problem is with "".
Any idea how to do this?
|
|
|
|
|
IMHO you can't, because MSDN ([^]) states:
/D has much the same effect as using the #define directive at the beginning of your source file.
However, /D strips quotes on the command line and #define retains them.
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.
|
|
|
|
|
hi guys,i want to know how to set up a timer to read text from a file repeatedly after time interval of 1 second on to the child window
Shanky
|
|
|
|
|
Handle WM_TIMER message which will be called after each specified time interval. Use SetTimer to specify the time interval. And use KillTimer to cancel the timer.
--
=====
Arman
|
|
|
|
|
|
hi i have to copy an exe to a specified path when a button is clicked and then have to run the exe automatically. how to do this
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Use CopyFile() to copy the exe to a certain location and then use ShellExecute()
Didn't get you on this.system tray
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
deeps_cute wrote: system tray
deeps_cute wrote: hi i have to copy an exe to a specified path when a button is clicked and then have to run the exe automatically. how to do this
What does the title and the question have in commen???
Copy a file (any extension)
CopyFile
The CopyFile function copies an existing file to a new file.
BOOL CopyFile(
LPCTSTR lpExistingFileName,
LPCTSTR lpNewFileName,
BOOL bFailIfExists
);
ShellExecute
Opens or prints a specified file.
HINSTANCE ShellExecute(
HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
);
</code>
MSDN these functions .....
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: What does the title and the question have in commen???
May be because all the characters in "System Tray" are used in his question.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Your question is about CopyFile/ShellExecute(AnShUmAn answered to you) but if you need to info about system tray see here[^]
|
|
|
|
|
Hi all
When I try to run a exe which is a gSOAP client I get an error
"program too big to fit in memory" . What is the reason ? A search in google says RAM size could be small , pagefile big etc. I have 1GB RAM , Windows XP SP2
Anyone help me pls ?
redindian
|
|
|
|
|
Can you more explain about your program.
|
|
|
|
|
Being that this is a rather rare error, my first guess would be that the EXE is corrupted somehow (or was built with some seriously messed up linker options). Unless you have an EXE file that is larger than 2GB, that is...
If it is a .NET application, it might have something to do with your .NET runtime/installation...?
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
hi all,
i created dll using vc++. it succesfully compiled.
but while registering i am getting error like
Library(path )
Failed - Invalid access to memory location.
so please help me for rectify this error.this is very argent
praveen Rao
|
|
|
|
|
You're missing a semicolon on line 427.
Or, in the real world, having code that compiles means it's syntactically correct, but doesn't mean it's not full of bugs. You need to work out what line is causing the error, and fix it, or post it here if you want meaningful help.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: You're missing a semicolon on line 427.
:->
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Christian Graus wrote: You're missing a semicolon on line 427
|
|
|
|
|
Hi all,
I want some help in setting the tab order for controls in a dialog.
The scenario is like in the main dialog i have a tab control and 4 buttons.
In the tab control i have added dialogs.
When the main dialog is opened the focus should be on the tab control. Next it should go to the other buttons.
I have given the tab order normally giving one for the tab control. But the
when i open the dialog the focus is not the tab control it is on the next button i.e the one which is set to 2..
Can u please suggest me...
Thank U
|
|
|
|