|
Hello honae,
What kind of tests?? CPU arithmetic tests, 3D capabilities, memory bandwith, file I/O performance etc... ??
|
|
|
|
|
|
I am porting an App to a PDA (a Dell Axim), and have encountered two problems ...
GetFirstDevice / GetNextDevice works well in the emulator and appears to do what the documentation suggests, but when run on the Axim it always returns INVALID_HANDLE_VALUE . My code is taken straight from the VS2005 documentation.
<br />
DEVMGR_DEVICE_INFORMATION devInfo;<br />
HANDLE hFind = FindFirstDevice(<br />
DeviceSearchByLegacyName,<br />
L"COM*",
&devInfo );<br />
Using
<br />
HANDLE hCom = CreateFile(<br />
lpszName,<br />
GENERIC_READ | GENERIC_WRITE,<br />
0, <br />
NULL, <br />
OPEN_EXISTING, <br />
0, <br />
NULL );<br />
works well enough if I guess correctly the name of the device I want to discover.
My second problem is connected with the use of DocLists. If I use a CDocListTemplate in place of the normal SDI template, all the controls on my CFormView derived view class dissappear
Any ideas would be much appreciated.
P.S.
Why is debugging in VS2005 so unbeleivably slow ? I am getting through a cup of coffee every time I press F10.
mtzlplyk
|
|
|
|
|
I have an NT Service that was written to periodically check a directory to see if a file was present. If a file was present then the service would create of an instance of a VB object, containing various functions, using the CreateInstance call. This then would take the file and carry out the required tasks. Which works fine when it runs on NT. However when I take the DLL's and the NT service executable and install it on a machine running Windows 2003 Server I get a problem where it can't create the instance for the VB object. In the past this has been because I did not associate the VB DLL object with the NT service (the old binary compatibility issue).
I do also seem to have problems in trying to stop the service. It seems to timeout in its attempt to close down, but still seems to stop.
I have tried to build the service on a machine running Windows 2003 Server using Visual C++ 6.0, but this does not seem to correct the problem. If I take the newly created NT service executable and the VB DLL object and place it on an NT machine it all works fine. The machines are acting as Web servers so IIS is also running, since the files that are checked for are being deposited into the ftproot directory.
Is there anything I need to change or add to get the service to run correctly on the Windows 2003 Server machine.
Regards,
Simon
|
|
|
|
|
Maybe you should consider compiling those sources on a machine with VC++ 7.X/8.0 installed. It should work just fine. Good luck!
|
|
|
|
|
Do we have any way to restrict the edit control to only support accepting english characters/numbers?.
If we make a simple edit control i.e. non-rich edit control, is it dependent on the target system and the keyboard settings that edit control accepts the character, for eg. if we create a simple edit control, and run our application on chinese system, would the user be able to type in chinese characters in to this control, if yes, is there any way to force the user to enter the text only in english language irrespective of his system language.
Thanks for you responses in advance!
Regards
Suyash
|
|
|
|
|
Suyash wrote: ...is there any way to force the user to enter the text only in english language irrespective of his system language.
Is that useful? Wouldn't that be irritating to the Chinese user?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: Is that useful? Wouldn't that be irritating to the Chinese user?
Hello All,
Thanks for your replies and suggestion to the given problem, I would try to apply ES_NOIME solution as suggested.
Regarding this requirement, actually we do have a poker table client, wherein various players from various contries(usa, china etc. etc.) will be able to play on the same table. Each player may have his/her own different language version of our software. However we also provide a chat facility, its all lobby chat, and personal chat is allowed. and its possible that 2 chinese player, if allowed to chat in chinese language(which other players may not know), can collude and cheat other players, so thats the reason we wish to restrict the chat input window to support only the english characters. Though we understand that there is no way to prohibit languages that uses english character set, like german.
Thanks again!
Regards
Suyash
|
|
|
|
|
override the WM_CHAR even for that editBox...
but as David told, consider seriously thinking about why you need this (what problem you're trying to solve), and if you cannot solve your problem another way...
|
|
|
|
|
With Richedit controls you can set the EM_NOIME style, this will prevent the user from being able to type chinese characters.Edit controls do not have this feature so you would have to go one step further and handle the WM_IME_CHAR and WM_IME_COMPOSITION yourself. But they would still have the option of being able to paste.
Really there is no simple way to prevent it. You could override the WM_CHAR, but this would involve comparing each character entered against those in the charset GB5 for traditional and GB2312 for simplified. Or limit it even further by only allowing charcters a-z and A-Z, but here you would have problems telling the difference between single byte and multibyte characters.
Another option is to set the font for the control to a font other than system and chinese. This would cause the control to display a special character (usually a box,star or Question mark) for those characters not found in the font.
|
|
|
|
|
Walder, welcome back
i'm sorry to be opposed to you again, but i'm not the one who asked the question
sorry for the disapointment :->
|
|
|
|
|
LOL, don't worry. I'm just under a bit of pressure to get this application finished. But one things for sure, I won't be asking questions again if I can help it.
|
|
|
|
|
lol
hey, don't worry, i'm cool
if you have particuliar points that you cannot find/understand/learn alone, then I'd be glad to help you in this
cheers,
|
|
|
|
|
waldermort wrote:
With Richedit controls you can set the EM_NOIME style...
Perhaps you meant ES_NOIME ?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
haha, so I did. I have no excuse, the 'S' and 'M' are too far apart to blame the keyboard. So, if anybody ask's, it was the wife
|
|
|
|
|
Hi,
Somebody has example on how calling managed (C#) DLL from unmanaged code (VC++ 6) ? I need it for backward compatibility reason.
Thanks before.
|
|
|
|
|
write a regular DLL in managed C++
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
Any direct link or reference in easier language, pls ? Your blog is half chinese and unfortuantely I don't understood any single letter of it.
Thanks anyway
|
|
|
|
|
|
Hi,
i made a MFC ActiveX Control with Visual Studio 2005!
i just take the default MFC ActivX Control Project!
than i added 3 methodes:
long CActiveX_ControlCtrl::Add(long x, long y);<br />
long CActiveX_ControlCtrl::Sub(long x, long y);<br />
void CActiveX_ControlCtrl::ViewResult(void);
than i read this article:
http://msdn2.microsoft.com/en-us/library/95357zak(vs.80).aspx
i manually added the methods in the DISPATCH_MAP:
------------------------------------------------
BEGIN_DISPATCH_MAP(CActiveX_ControlCtrl, COleControl)<br />
DISP_FUNCTION_ID(CActiveX_ControlCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)<br />
<br />
DISP_FUNCTION(CActiveX_ControlCtrl, "Add", Add, VT_R4, VTS_R4 VTS_R4)<br />
DISP_FUNCTION(CActiveX_ControlCtrl, "Sub", Sub, VT_R4, VTS_R4 VTS_R4)<br />
DISP_FUNCTION(CActiveX_ControlCtrl, "ViewResult", ViewResult, VT_EMPTY, VTS_NONE)<br />
<br />
END_DISPATCH_MAP()
and 4 lines are added to the control's .IDL:
--------------------------------------------
[ uuid(1103A7D0-19C1-41B5-9EE3-090B71B9ECFF),<br />
helpstring("Dispatch interface for ActiveX_Control Control")]<br />
dispinterface _DActiveX_Control<br />
{<br />
properties:<br />
methods:<br />
<br />
[id(DISPID_ABOUTBOX)] void AboutBox();<br />
[id(1)] long Add(long x, long y);<br />
[id(2)] long Sub(long x, long y);<br />
[id(3)] void ViewResult(void);<br />
};
the implementation of the methode Add:
--------------------------------------
long CActiveX_ControlCtrl::Add(long x, long y)<br />
{<br />
int result = x + y;<br />
stringstream str1;<br />
str1 << x;<br />
MessageBox(str1.str().c_str() , "info");<br />
return result;<br />
}<br />
when i test the activX control with ActiveX Control Test Container the Messagebox show the value "1073741824" when i call the methode with add(3, 3);
hm, any idea?
greets surf
|
|
|
|
|
Try this
long CActiveX_ControlCtrl::Add(long x, long y)
{
int result = x + y;
CString strMsg;
strMsg.Format("%i", result);
MessageBox(strMsg, "info");
return result;
}
Or this
long CActiveX_ControlCtrl::Add(long x, long y)
{
int result = x + y;
char szBuff[20];
itoa(result, szBuff, 10);
MessageBox(szBuff, "info");
return result;
}
-- modified at 11:41 Tuesday 28th March, 2006
|
|
|
|
|
i found the problem;)
i changed my code to:
dispinterface _DActiveX_Control<br />
{<br />
properties:<br />
methods:<br />
<br />
[id(DISPID_ABOUTBOX)] void AboutBox();<br />
[id(1)] long Add(long x, long y);<br />
[id(2)] long Sub(long x, long y);<br />
[id(3)] void ViewResult(void);<br />
BEGIN_DISPATCH_MAP(CActiveX_ControlCtrl, COleControl)<br />
DISP_FUNCTION_ID(CActiveX_ControlCtrl, "AboutBox", DISPID_ABOUTBOX, AboutBox, VT_EMPTY, VTS_NONE)<br />
<br />
DISP_FUNCTION_ID(CActiveX_ControlCtrl, "Add", 1, Add, VT_I4, VTS_I4 VTS_I4)<br />
DISP_FUNCTION_ID(CActiveX_ControlCtrl, "Sub", 2, Sub, VT_I4, VTS_I4 VTS_I4)<br />
DISP_FUNCTION_ID(CActiveX_ControlCtrl, "ViewResult", 3, ViewResult, VT_EMPTY, VTS_NONE)<br />
<br />
END_DISPATCH_MAP()
any idea why i cant take the DISP_FUNCTION like before?
cu
|
|
|
|
|
VTS_R4 is a float, VTS_I4 is a long. doesn't match your function definition. I didn't notice that before.
You should use the wizard & class view this is alot easier
-- modified at 14:13 Tuesday 28th March, 2006
|
|
|
|
|
You should use the wizard & class view this is alot easier ... but how can i call the wizard??????
i only can use CActiveX_ControlCtrl - Add - Add Function than i see the Add Member Function Wizard!
but i manually have to add the definition in the Dispatch map... and the definition in [ uuid(1103A7D0-19C1-41B5-9EE3-090B71B9ECFF),
helpstring("Dispatch interface for ActiveX_Control Control")]
dispinterface _DActiveX_Control
{
properties:
methods:
[id(DISPID_ABOUTBOX)] void AboutBox();
[id(1)] long Add(long x, long y); <---------------------------
right?
i use visual studio 2005!!!
cu
|
|
|
|
|
No your clicking on the actual class. Go to your interface node in the tree and right click and Add --> Add Method... It will generate everything for you.
|
|
|
|
|