|
Hi,
When I convert a Visual C++ 6.0 project to Visual C++ .NET by opening the project using .NET environment, and accepting all VC 7.0 conversion defaults, the resulting project would not compile, and gives this error:
Compiler error C2065: '_mbstowcsz': undeclared identifier.
But this functions compiles ok on VC++ 6.0.
This function has these parameters:
in VC6.0++:
int _mbstowcsz(wchar_t*, const char*, size_t) ;
in VC++.NET:
int _mbstowcsz(wchar_t*, const char*, ULONG) ;
Since VC++6.0 and VC++.NET put this function in different locations, I did change the Properties setting for included path, and make it use Dynamic ATL since in VC++.NET this function is in atlmfc/include. I also change Properties/C/C++/Language/Treat wchar_t as Built-in Type to "No". But nothing works.
Please help.
Thanks.
|
|
|
|
|
could it be that it is ATL::_mbstowcsz instead of _mbstowcsz?
|
|
|
|
|
Yes, this works, Thank you
|
|
|
|
|
The c++ compiler take the two function as different function,because the third parameter is different, modify this parameter type to ULONG and try again,good luck!
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
Changing the parameter type to ULONG does not fix the compiler error. But thanks anyway.
|
|
|
|
|
I have dialog application. One of the controls is the Internet Explorer instance (CHtmlCtrl).
The problem is, that my dialog keyboard accelerators works fine until the IE has the cofus. How to force IE to send accelerators other than IE's standard accelerators to parent window ?
Thanx
rrrado
|
|
|
|
|
Hello,
I'm using this:
void CTCCDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
DWORD dwStyle;
if ((nID & 0xFFF0) == SC_RESTORE)
{
nID = SC_MINIMIZE;
}
CDialog::OnSysCommand(nID, lParam);
}
but the window doesn't get minimized.
thank you in advance.
|
|
|
|
|
Hi
instead of nID = SC_MINIMIZE; try SendMessage(WM_SYSCOMMAND, SC_MINIMIZE, 0, 0);
hope this helps
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Is there a relatively easy way to get video in to a Window using Visual c++ ?,
i.e. using a webcam or a video camera connected to a graphics card.
|
|
|
|
|
|
hi there,
if i add a handler ON_WM_KILLFOCUS() for modalless dialog box and if i try to go to some other dialog box or try to loose the focus then the killfocus function is not getting called at all.
why?
cheers
rajs
|
|
|
|
|
This article http://www.codeproject.com/dialog/killfocus.asp[^] may be of help.
Roger Allen
Sonork 100.10016
This is a multiple choice question, choose wisely
Why did the hedgehog cross the road?
A: To show he had guts?
B: To see his flat mate?
|
|
|
|
|
WM_ACTIVATE can also be used.
The handler gets the new window and the old one.
Max.
|
|
|
|
|
How can I query "my own" DLL version (i.e. the version a DLL which is loaded into the current process, and where the code to query the version is implemented in=
I have a horribly complex (and ugly) class that does this for any DLL, I wonder if there's an easier way for a DLL that is loaded.
TIA
Peter
Those who not hear the music think the dancers are mad. [sighist] [Agile]
|
|
|
|
|
1) Using the GetFileVersionInfo Win32 API, refer to MSDN for usage;
-OR-
2) Add a export function,say GetVersionNember,into your DLL for query its version number by its customer(client),the following is a simple example,
const WORD LOW_VER_NUM = 0;<br />
const WORD HIGH_VER_NUM = 1;<br />
DWORD GetVersionNumber()<br />
{<br />
return MAKELONG(LOW_VER_NUM,HIGH_VER_NUM);<br />
}
Hope this helps!;P
|
|
|
|
|
How to get the height of line in CEdit when there are lots of text with different fonts.
|
|
|
|
|
When I use LoadBarState to load state of my toolbar it is shifted by 4 pixels from the frame.
So it is impossible to save toolbar X and Y position less than 4.
To reproduce this bahaviour:
1. create empty MFC SDI project
2. add LoadBarState("barState"); at the end of CMainFrame::OnCreate
3. add WM_CLOSE handler to CMainFrame
4. Add SaveBarState("barState"); at the beginning of CMainFrame::OnClose
Run the app, close it, then tun again -> toolbar is shifted
|
|
|
|
|
Hello,
How can i check a installed language on user systems ?
For example check the Arabic language !
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
|
Hi,
Check this in MSDN, may be helpfult to you:
The GetUserDefaultUILanguage function retrieves the language identifier (LANGID) for the current user language.
LANGID GetUserDefaultUILanguage(void);
|
|
|
|
|
can anyone tell me how to put the whole content of scrollview into one bit bitmap?by the way, I don't know the content of the window,is it difficult?
thanks
|
|
|
|
|
I have to create a Visual Studio Installer Project
in order to install my application (a single executable file)
and a Freeware Tool (as in example Acrobat Reader).
I can't find the way to let the Freeware Tool installation
executable file to be launched by the Visual Studio Installer Project
(during the installation of the mine application) !!!
Which settings have I to do in my Visual Studio Installer Project?
Thanks a lot !!!!
|
|
|
|
|
|
If I have well understood, you suggest me to insert a line of code
in my application in order to launch the installation file.
I'd like to don't modify the source code of my application.
I'd prefer that the installation package makes this operation.
Is it possible ??
|
|
|
|