|
hsdfhkgkhshk wrote:
To make a program unicode aware, do you put the TEXT() macro around single characters? for example TEXT('*')
Yes.
hsdfhkgkhshk wrote:
does anyone know if its more efficient to use API functions like lstrcpy and CharLower, or _tcscpy and _tcslwr?
It's exactly the same because _tcscpy() etc. are simply macros that expand to the appropriate function calls depending on whether yuo're compiling for unicode/MBCS/ANSI.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
TEXT() or _T(...) for short.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
hsdfhkgkhshk wrote:
To make a program unicode aware, do you put the TEXT() macro around single characters? for example TEXT('*')
You don't have to if you you're using an ASCII character since the conversion is automatic (and valid by C++ standard.) Except for zero, I tend to do it though.
hsdfhkgkhshk wrote:
Also, does anyone know if its more efficient to use API functions like lstrcpy and CharLower, or _tcscpy and _tcslwr?
Generally, lstrcpy results in smaller code while _tcscpy results in faster code. (The same with _tcscat and _tcslen .) For the rest, I prefer the Windows API, especially lstrcpyn which guarantees a null terminated string, since the performance is usually a wash.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I'm studying about window achitecture,, and assembly language..
Where can I get a information about Window Protected-Mode?
If you know, tell me.. except Microsoft web site or MSDN? (it sucks)
|
|
|
|
|
First, Windows doesn't have protected mode, the Intel CPU does.
See the following:
Ian Mariano - Bliki | Blog
"We are all wave equations in the information matrix of the universe" - me
|
|
|
|
|
experience it... use low-level debuggers and explore...
Don't try it, just do it!
|
|
|
|
|
http://www.webopedia.com/TERM/P/protected_mode.html
http://my.execpc.com/~geezer/johnfine/segments.htm
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have read the article :
http://www.codeproject.com/useritems/KeyHook.asp
Tell me please what HOOKS is it? Their main purposes, etc.
Thanks in advance !
|
|
|
|
|
Basically, hooks are procedures that allow your to intercept events occurred outside of your applications. Events that otherwise are invisible to your applications, for example, key strokes in other windows, mouse cursor moves in other windows, a file is being run, etc. How can your applications be aware of those events and even interfere/react with those events? Use hooks.
|
|
|
|
|
Ok , thank you very much - it is very nice and clear answer.
But i have one more question : in that you article mentioned key strokes.
What are the difference betwen Global HotKeys and KeyStrokes hooks . I mean hook - it is just flagged message about appropriate keystroke in some application or the action - that can grant or deny processing of that key combination ?
(I downloaded your project, but i (win2K) cannot see any events in your app. , and cannot check what hooks is !)
Thank you !
|
|
|
|
|
You probably forgot to press the "Install Hook" button first, I've updated the demo project so that now it installs the hook in the OnInitDialog function automatically. Redownload the demo and try again.
|
|
|
|
|
hook is a system interface in windows system.hook can itercept and capture and treat with the message passed to other application program,and finish the fuction that other common program can not do . hook can itercept all kinds of events and message of system or process.once hook itercept the message ,it will treat .
usually ,such as itercept keyborad message,or mouse message...
|
|
|
|
|
*Why* did the app wizard put both of these #includes in my mainfrm.cpp:
<br />
#include "MainFrm.h"<br />
#include ".\mainfrm.h"<br />
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
It's one of many benign bugs in the wizard code. If you remove it, then add a handler, it adds it back.
(It also does dorky things like not indent items properly.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Its one of the annoying things it does with the current class header. I have taken to remove the #include "MainFrm.h" one so that it doesn't put it in again!
Ant.
|
|
|
|
|
I've a problem using splitter windows.
The function that replaces views in a pane sets the old view to SW_HIDE status and activates the new view with SW_SHOW. A pointer to the old view is returned by the funtion. The old view isn't activated again in the program. My problem is that the memory allocated by the old view isn't freed during runtime, because no DestroyWindow is called and the view's destructor isn't called. So the program leaks during runtime.
I tried calling pOldView->DestroyWindow in the ReplaceView function. This doesn't work, because after doing this it could be possible, that the old view executes messagehandlers (like OnKillFocus) handlers which causes errors, because the view is destroyed.
A second try was using the returned pointer to the old view after 30 seconds to cleanup and then calling pOldView->DestroyWindow(). This causes an endless loop after some time ( I think this can be seen on WIN NT but not on WIN 2000). I had a look at the MFC Code and think this could be caused by a recursive call within the Implementation of DestroyWindow.
Does anyone know a solution how to get the memory of the unused views freed?
|
|
|
|
|
Hi dear...
I'm also facing same problem...
Please let me know if u find any solution..& I'll also if I find any clue...
OK! Good bye..
---Sumit Kapoor---
|
|
|
|
|
hi!
I migrated an existing vc++ 6.0 application using activeX objects to VC++.Net (7.0) environment.
Initially I had problems with the ActiveX objects since they were not being supported in the recent version,the old code had the activex objects being accessed using the GetDlgItem() function,moreover this made sense since the function in which the objects were used were static.
I however created objects and accessed them using the cDialog ptr.
Things compiled well and the program works,but when I close the application I get a lot of memory leaks which is not acceptable... it says something like oleinit.cpp(i guess it might be something to do with the ActiveX objects).Secondly the application is being run in debug mode,I have to expilicity close the debug mode even after the close the window??
Is there anyway to close the activeX objects or delete them so that the memory used by them is to be freed explicitly..
Why is this happening?? any comments ..please help
thanks
rahul
|
|
|
|
|
I guess I've been using CString for too long because for the life of me I can't remember how to assign a value to a character array (not through initialization). I thought I could do something like
szTerm = " \r\n"; but that just gives me errors. Am I completely off with this and do I have to use strcpy and it's associated functions...? Thanks.
- Aaron
|
|
|
|
|
char szTerm[4] = {0};
szTerm[0] = ' ';
szTerm[1] = '\r';
szTerm[2] = '\n';
Maxwell Chen
|
|
|
|
|
|
(1)char szTerm[4]={'a','b','c'};
(2) char szTerm[4]="abc";
|
|
|
|
|
you can also use strcpy(szterm, " \r\n"); from <string.h>
TOXCCT >>> GEII power
|
|
|
|
|
Thanks for info guys. I guess I have been using CString too long.
- Aaron
|
|
|
|
|
I'm doing some dialogs in Visual Stupido.NET, and I can't seem to find a way to may a simple etched frame. I don't want divider lines, and I don't want captioned group boxes. I want what I used to be able to do in Visual C++ 6.0's resource editor.
Does anyone know if what I want to do is even possible?
So far, I'm not impressed with this new crap from MS...
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|