|
Press Ctrl + D , then use your left button to click the controls!
|
|
|
|
|
Hello,
I do a whole line selection in a CRichEditCtrl (Version 2.0, embedded in a CRichEditView) by the following
1. Caret is left on the line start of a empty or not empty line with at least 2 lines following after this line
2. Select whole line with Shift + Down-arrow (only one key press)
=> There are differences in the selection behaviour depending on the following line (the line after the line that has the caret before selecting) beeing empty or not.
- All seems to be ok when the second line is NOT EMPTY => only ONE line is shown as selected.
- But when the second line is EMPTY => TWO lines are shown as selected after one key-press what is very unusual for me.
Example:
(the "#" stands for the blue selection, the "|" is the caret position before the line selection)
Normal behaviour:
line n: "|line with caret at start"
line n+1: "not empty line below"
line n+2: "..."
Shift+Down => Selection looks like this:
line n: "########################" (one line selected)
line n+1: "not empty line below"
line n+2: "..."
Strange behaviour:
line n: "|line with caret at start"
line n+1: "" (empty line )
line n+2: "..."
Shift+Down => Selection looks like this:
line n: "########################" (line is selected)
line n+1: "#" (following empty line is selected also !?)
line n+2: "..."
I would like to have a behaviour like the Visual Studio editor e.g. where with Shift+DOWN only one line is selected in every case. Does somebody know how I can achive this? (The CEdit-class for example does not have this selection behaviour.)
Or is there a reason for this behaviour?
Thank you in advance for your ideas
Sebastian
thank you
modified on Tuesday, June 2, 2009 9:13 AM
|
|
|
|
|
I am happy with every little hint!
thank you
|
|
|
|
|
|
|
hi,
How to query the device manager in Windows?
Thanks
SYAMLAL
|
|
|
|
|
The device manager uses the SetupDixxx APIs to enumerate all classes of devices installed on the system.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi,
I wanted to answer the same question and ended up posting an artice about it here Device Information[^]. Please note this demo solution contains three projects, 2 of which use WTL and one that runs in a Command Window.
|
|
|
|
|
Thanks a lot.. Jonathan
SYAMLAL
|
|
|
|
|
Hi Jonathan,
i tried to use your logic in my application. I have a VC6.0 Win32 console based applicaion, in which i need to enumerate the serial ports. But the CLSIDFromString(wBuf, &Guid) function always fills Guid with zeroes. Do you have any idea what could be the problem.
NB:- guiddef.h header file is not there in my installation, i commented this header inclusion and the code compiles.
Also, your console based demo application works fine in my PC, and list out all ports perfectly.
SYAMLAL
|
|
|
|
|
Hello,
I need to fill the button in a ComboBox with GradientFill(). How can I access it?
And also - how to add borders to the ComboBox when the mouse is over?
I looked this: http://www.codeproject.com/KB/combobox/listboxexByEricSanchez.aspx, but there appears an error, when I try to use the simular idea with combo ![Frown | :(](https://www.codeproject.com/script/Forums/Images/smiley_frown.gif)
|
|
|
|
|
Hi all,
I want to use SHCloseApps function in VC++,please anyone can tell me how can i use it in vc++.
becoz its need aygshell.dll and aygshell.lib files.
please help me for this.
if possible please explain me with example.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
The API is for Windows CE and Windows Mobile.
You cannot use it for Win32 or x64.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Are you coding for windows CE / Pocket PC ?
|
|
|
|
|
Yes i m coding for Pocket pc but use on Win32 or x64.
Actually i have created a code that is access the windows based mobile and send sms thru this with using of my application.
everything is working fine.
for sending msg i m using RAPI function and use CeCreateProcess .
but when i continous sending message than the phone memory is full and the phone and the exe both are looking hanged, so i want to release the memory of phone after each CeCreateProcess or each msg sending.
please help me for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: Yes i m coding for Pocket pc but use on Win32 or x64.
And I guess you have installed Windows Mobile SDK? If so that lib comes with the SDK. isnt it?
|
|
|
|
|
Yes , i have installed it ,and include aygshell.lib include from project property window.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Then whats the problem in using it?
|
|
|
|
|
It give this error
error LNK2019: unresolved external symbol _SHCloseApps referenced in function "public: void __thiscall CTestDlg::Test_Function(void)" (?Test_Function@TestDlgg@@QAEXXZ)
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
And have you specified the aygshell.lib in the addition dependency column of project settings("project settings->liner->Input->addition dependencies")
|
|
|
|
|
Yes.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Please tell me now what can i do?
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Dear Mr/Ms
Now I have one problem. Pls help me.
I create one process(Temp.exe) and set affinity is CPU 0, in this process, can I create other thread with affinity is CPU 1?
(I already using SetThreadAffinityMask but error raised ERROR_INVALID_PARAMETER)
(OS :WinXP, Core 2 Duo CPUs)
This is my code:
pls help me.
//Create Process with CPU 2 (all thread of this process run in CPU 2)
BOOL result = CreateProcess(NULL,_T("C:\\CPU.exe"),NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi);
SetProcessAffinityMask (pi.hProcess,2L);
in CPU.exe when press button [Check]
HANDLE hThread;
DWORD dum;
hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)threadFunction,NULL,0,&dum);
// but i want this thread run in CPU1 not CPU2
DWORD dWord = SetThreadAffinityMask (hThread,1L); // threadFunction run in CPU 1
// dWord = 0 : raise error, canot set affinity for this thread
Pls help me more information about it.
|
|
|
|
|
Thread affinity can only be a subset of the process affinity.
You would probably be able do do this if you set the process affinity to 3.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
thanks you so murch.
i understood.
because my project have all thread (Thread 1,2,3...) of this process run on CPU 1, except specical (Thread 10,50) thread will run on CPU 2.
Can you give me other solution?
|
|
|
|