|
Think about a class structure. Basic class maybe "CObject" and derive other classes with additional features. They all can you put in a CObjArray. (MFC)
This is a real student task.
Greetings from Germany
|
|
|
|
|
Hi all,
How to find programmatically (C++/MFC) whether entered text is LTR - Left To Right (English) or RTL - Right To Left (Arabic) text.
Thank you
|
|
|
|
|
HI. Is this question is regarding a particular control or edit box / OR / any for string?
Nice talking to you. If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
|
This depends on the actual system language better check this with GetLocaleInfo(...)
Greetings from Germany
|
|
|
|
|
What if Locale is Set to English, and Arabic is selected from Language Bar. GetLocaleInfo() won't help..
|
|
|
|
|
Each entered character has a UNICODE code point. It is possible to look at the numerical value of that code point and determine what language it is from by what range of numbers it is in. I don't have the windows code to hand as I'm not at work today but you'll probably want to look at The UNICODE consortium[^] for a start to get an idea of what LTR and RTL languages are defined. Part of the information windows will give you on any given character is an RTL flag. This on its own is not enough to determine language though as both Hebrew and Arabic RTL languages are supported on Windows.
I spent most of last year developing a mixed LTR/RTL English/Arabic/Chinese/Japanese/Korean capable edit control for Windows CE and my brain only partially melted
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
|
|
Hi all,
I am from c,c++ background... i am working on VC++ from last few month.. i want to know about the interview question that can be asked... can anybody guide me...
Thankns in advance...
Tasu
|
|
|
|
|
you want interview questions?
Just i am posting a link for asp.net but it not contails only asp dot net. it contains all interview questions.
Many interview questions
Nice talking to you. If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
Thanks Haranadh ....
definitly it will help me
Tasu
|
|
|
|
|
Hi,
I am trying to run two process (Process A & Process B) in User credentials. Process A is running with Admin credentials (Process A runs with CreateProcessWithLogon API) and Process B running with User credentails. I am trying to get the handle of Process B in Process A but it is returning NULL handle.
I would like to know how can I get the process handle of Process B, which is running under User credentials using Process A, which is running with Admin credentials.
Any idea / view on this would help.
Thanks
Suhas
SNI
|
|
|
|
|
More information would be nice. Try the OpenProcess API perhaps.
Steve
|
|
|
|
|
Steve,
I am using Openprocess to get the handle of Process B in Process A. I get the handle to the window of process B and find out the Process ID (which is I am receiving correct), but when I tried to get the handle using OpenProcess it is returning NULL. The reason behind this could be Process A runs with Admin credentails and Process B running with User creadentails.
I need to find out the way how to get the process handle for Process B.
Thanks
SNI
SNI
|
|
|
|
|
Perhaps if you post some code the problem may be noticed by someone.
Steve
|
|
|
|
|
Here is the code where I am trying to get the handle of process B is Process A
--------------------------------------------------------------------------------
HWND hwnd = ::FindWindow(NULL,"Process B");
DWORD dwThreadId, dwProcessId;
dwThreadId = GetWindowThreadProcessId(hwnd, &dwProcessId);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS |PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,FALSE,dwProcessId );
Here hProcess becomes NULL.
Thanks
SNI
|
|
|
|
|
Try putting a breakpoint after the OpenProcess call and then enter the following in the watch window of your debugger:
@ERR,hr
What problem does the debugger report when the breakpoint is hit?
Steve
|
|
|
|
|
I Ran Process B in User credentials and after hitting berak point @ERR,hr valus is S_OK.
jhghjghj
|
|
|
|
|
Interesting. Perhaps try this:
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, dwProcessId);
If this doesn't work then I'm not sure what to suggest.
Steve
|
|
|
|
|
Steve,
Thanks for your reply. But it is not working. I'll explain you once again how I am running these processes. I have write a program where I am executing Process B using shellexecute with out any credentials and Process A with CreateProcessWithLogon API with admin credentials. Now when both processes are running Process A tries to get handle to the Process B and it fails.
The code given above will work only when I am running these two processes indiviually. but not thru any program as I explained.
If you any idea how can one get the handle to the process B when running thru third program / utility.
Thanks
SNI
|
|
|
|
|
I too had problem in opening the process created by another user.I can even open system process but not process created by another user. That problem not solved yet.
|
|
|
|
|
Nave,
Can you tell me how do you achieve this. pls spedify code if possible.
Thanks
SNI
-- modified at 5:53 Wednesday 4th July, 2007
|
|
|
|
|
Hello,
I want to find computers and network shares with in My network places using C++/MFC code.
I can find files and folders using FindFirstFile and FindNextFile but how can I find network shares and computers in work group?
can any one help me please?
Regds
Buddhika
Annasi
|
|
|
|
|
check the NetShareEnum() function in msdn. A sample is also there.
|
|
|
|