|
|
Do you need to multilangues on your program?
|
|
|
|
|
Hi,
Yes i need multilanguage support in my application..
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
|
Until recently my windows app has been running fine without the need to link any additional files, but when I began using the stl vector class, I recieved about 50 linker errors, all of which were pointing towards windows functions. A quick google revealed that I would need to link with user32.lib, so I did, and all of the error have dissapeared, bar one;
Error 1 error LNK2001: unresolved external symbol _wWinMain@16 MSVCRT.lib
Any suggestions?
|
|
|
|
|
This usually happens when you defined _UNICODE in your project settings. You have to set the entry point as wWinMainCRTStartup in this case.
project settings->Link tab->From the category combo select "output"
You can find a Entry-point symbol edit box. in that, paste wWinMainCRTStartup
|
|
|
|
|
I can't find the project settings that you're talking about Where should it be?
Also worth noting is that this only appears in release mode. Debug mode works fine.
|
|
|
|
|
Which version of visual studio are you using..?
Did you check your pre processor definition to see whether _UNCIODE is defined in debug and release?
|
|
|
|
|
I'm using Visual C++ 2008 Express Edition.
I never explicitly defined unicode. It's just something that's popped up all on it's own it seems
I went into the project's property pages and "Character Set" is set to "Use Unicode Character Set" for both debug and release builds.
|
|
|
|
|
In VS2008, UNICODE definition is default.
In the project's property pages, under the linker node->Advanced, you can find the "Entry point" check whats the value in it...
|
|
|
|
|
this field is empty in both debug and release.
I tried setting it to wWinMainCRTStartup like you said but now neither release or debug will compile.
|
|
|
|
|
have you linked your project with MSVCRT.lib ?
|
|
|
|
|
Nope, but you just helped me find the problem :P
I linked user32.lib in the debug mode, but it didn't get automatically added to the release build :P
Sorry for the trouble :P
|
|
|
|
|
Sauce! wrote: I linked user32.lib in the debug mode, but it didn't get automatically added to the release build
Thanks for telling. Now I know another reason for getting the above error...
|
|
|
|
|
The help for LNK2001 (in VC8 at least, I don't use 9) mentions this exact error message.
|
|
|
|
|
I always go straight to the help files for any errors I get that I don't know a solution to, and I knew it was something to do with a dodgy lib file or incorrect setting, I just couldn't find what that setting was :P
|
|
|
|
|
Hi,
My application is now being ported to Vista.. At some point of code we have SendMessageTimeOut( ) api being used. But it fails in Vista both as an administrator and standard user..(It is working fine in Win-2003). Can I know what would be the alternative for SendMessageTimeOut( ) in VC++.
Thanks,
Venkat
|
|
|
|
|
Did you use GetLastError() to know why it fails??
Regards,
Sandip.
|
|
|
|
|
Ya.. Its returning 1460 as error code. But its not clear what is this error code meant
|
|
|
|
|
In the Error Look up utility it shows me this
This operation returned because the timeout period expired.
From winerror.h
//
// MessageId: ERROR_TIMEOUT
//
// MessageText:
//
// This operation returned because the timeout period expired.
//
#define ERROR_TIMEOUT 1460L
So i think it is working as intended and timing out after time interval specified.
Documentation says
If the function fails or times out, the return value is zero. To get extended error information, call GetLastError. If GetLastError returns ERROR_TIMEOUT, then the function timed out.
Microsoft Windows 2000: If GetLastError returns zero, then the function timed out.
I hope it helps..
Regards,
Sandip.
modified on Wednesday, September 10, 2008 3:11 AM
|
|
|
|
|
thanks.. But I wanted to know why SendMessageTimeOut( )call is timing out.. Its not timing out in Win2003,but only in Vista.
|
|
|
|
|
What does the code look like?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What functionallity should i add in following handlers to restrict user to right click in edit box........
means menu should be disable or he cant copy or paste etc
void CMyedit::OnContextMenu(CWnd* pWnd, CPoint point)
{ // TODO: Add your message handler code here
}
void CMyedit::OnCopy(WPARAM wParam,LPARAM lParam) {
// TODO: Add your message handler code here
}
void CMyedit::OnPaste(WPARAM wParam,LPARAM lParam) {
// TODO: Add your message handler code here
}
|
|
|
|
|
ani_ikram wrote: What functionallity should i add
Overiding the above functions is enough. do not call the base class functions from it...that all
|
|
|
|
|
Hi, I'm completely new to C++ as a whole, so there might be a simple answer to my question, so here goes.
I'm trying to write a program that will have the screen broken up into zones, or areas, each with a Point (location) a Size, an Image, and an array of terrain types (an enum). Trying to include a bitmap in my class made the compiler tell me that I couldn't mix managed and unmanaged types. To try to work around this, I tried extending the PictureBox control, but this has given me even more headaches.
Basically, I can't figure out how to declare/use an array in an extended control.
#pragma once
using namespace System::Drawing;
using namespace System::Windows::Forms;
using namespace cli;
namespace MapEdit
{
const int MAX_TERRAIN = 3;
public ref class Zone : public System::Windows::Forms::PictureBox
{
public:
enum Terrain
{
Plain,
Hill,
Wood,
Marsh,
Stream,
River,
ShoreLine,
Impassable
};
array<byte^> ^TerrainTypes;
int TerrainTypes[3];
...
All of my errors (except the parts where I try to use these faulty enum/ array) come from this block. Frankly, I'm at a loss as to how to fix this.
Also, if someone could tell me how to include a Bitmap in an unmanged class, that would be nice too.
Thanks,
Christian
|
|
|
|