|
is it normal that CEdit::SetSel(-1, -1); donnot erase my EditBox ?
from the MSDN, i read this :
void SetSel(
int nStartChar,
int nEndChar,
BOOL bNoScroll = FALSE
);
nStartChar
Specifies the starting position. If nStartChar is 0 and nEndChar is –1, all the
text in the edit control is selected. If nStartChar is –1, any current selection is removed.
i so thought that calling say m_peMyEdit->SetSel(-1, -1); (where m_peMyEdit is declaredas as a CEdit* and well initialized also) would clear the content of my Control.
should i feedback this to Microsoft ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
It does not clear the content of the control.
It removes the selection.
(e.g. if you press shift you can select chars in an edit control by pressing arrow keys) calling the setsel with -1 as startchar removes the selection... The text is still there completely, only any text that was 'selected', appears as normal now...
Hope this helps you,
Davy
|
|
|
|
|
effectively, now you say it, i realize i didn't read it right...
thanks a lot
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi Tox,(Long time no see)
Why don't you use CEdit::SetWindowText("") for clearing the Edit Control
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
Hi Tox,(Long time no see)
yeah, i'm here, but with a lot of work, so no much time to be connected (moreover, our servers are still cuting off during the morning and the afternoon...).
ThatsAlok wrote:
Why don't you use CEdit::SetWindowText("") for clearing the Edit Control
yes, that's what i do, but i wondered why i could not do this actually...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
One of my article is waiting for you comment, hope you find some time for it from your busy Schedule. BOB and other already commented on it
here is link Article[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
there any wizard in MFC for creating a Windows Service?
If not, Please help me with a complete code for developing a Windows Service
I need it very much and immediately
|
|
|
|
|
Yes, assuming you're running VS 2003.
- Shift+Ctrl+N to invoke New Project dialog box
- Expand Visual C++ Projects folder
- Select ATL folder
- Select the ATL Project type
- Specify name and location
- Click enter
- When the ATL Project Wizard displays, select the Application Settings tab
- Specify Server type of Service
- Click Finish
Voila! You now have a service with the guts of communicating with the SCM and a worker thread done for you.
|
|
|
|
|
Check here[^]
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Tank you very much for your Help.
But I need a Source code for crete and develop a Windows Service because
I`m not a professional programmer in VisualC++ and I do`nt have much information about Windows Service
|
|
|
|
|
|
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Thank you for your help!
There is a good code in item "Five Steps to Writing Windows Services in C".
But some links are not enabled.(Such as "Listing 1, Listing 2, Figure 1, Figure 2"
I want to see this links and figures.What shude I do?
Please guide me immediately.
|
|
|
|
|
Hi,
How to get the sectors/clusters of a particular file?
I am working on Windows 2000.
Hoping to get a reply soon.
TIA.
regards,
Jahfer V P.
|
|
|
|
|
Hi Jahfer,
I think you just need to reach to cluster, then following function would let you know how many sectors are there in one cluster & bye info of sector.
BOOL GetDiskFreeSpace(
LPCTSTR lpRootPathName, // pointer to root path
LPDWORD lpSectorsPerCluster, // pointer to sectors per cluster
LPDWORD lpBytesPerSector, // pointer to bytes per sector
LPDWORD lpNumberOfFreeClusters,
// pointer to number of free clusters
LPDWORD lpTotalNumberOfClusters
// pointer to total number of clusters
);
Then you need to iterate for sectors.
Regards,
Sumit Kapoor
+91-98-990-59818(M) Delhi >> INDIA
sumit_kapoor1980@rediffmail.com
Never consider anything impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
I need to get the sectors/clustors of a file.
A file may be in contiguous sectors or may be scattered, on the disk. I want to get this sector information.
Jahfer V P.
|
|
|
|
|
I don't know it is fully possible or not with another API..
DeviceIOControl(). This API is used for similar type of work, even file related. Check MSDN for more detail.
I think it would be only help that I can do. Let me know if you get any direct method(by e-mail).
Regards,
Sumit Kapoor
+91-98-990-59818(M) Delhi >> INDIA
sumit_kapoor1980@rediffmail.com
Never consider anything impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
Because of the HAL, I think you'll need to create a device driver if you want that level of access.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Respected All
Regards!
I already sent my problem to the forums but no reply till now now i am going to explain a bit more my problem.
" I loaded a bitmap in the form of Electric Circuit from my VC++ program and that bit map has some Resistors and Voltage, when I execute the program the bitmap became load and voltage from battry came Randomly after every one second by settimer() function and according to voltage the current is calculated from V=IR formula , now i want that when current flow through the circuit(which is not real , here i just show on bitmap that current s flowing) exceeds from certain limit the Resistor(which is on bitmap)change his color to RED, GREEN etc at run time.plz help me while doing so.
Best wishes.
David
david
|
|
|
|
|
Load bitmaps which represent your resistor in different colors, and draw it on your background bitmap.
Could you post some code which show what you have already done ( in a new thread, this one is too old) ?
~RaGE();
|
|
|
|
|
Hi,
Any one can suggest how to do this.
I am using a list control with ICON property. I want text lables to be displayed right side of the icon. Now they are displayed below the icon as default property.
Thanks.
|
|
|
|
|
without cookies, I just click a button from my program ,and then the program load the username and password from a local file,then open an ie to show the web page that logon already?
Is this possible? Thank you all here.
Thank you very much.
|
|
|
|
|
Buy a Microsoft fingerprint reader, it will do all that for you, and looks cool on your desk.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I do that for some websites.
I use a Proxomitron filter that inserts my username and
password as 'value' arguments in the appropriate
fields of the login . It also adds a javascript
function ( formsubmit()--which automatically submits the
form ) and inserts an "onload" call to formsubmit() it
the tag.
You could probably do it with GreaseMonkey or Privoxy too.
Steve T
|
|
|
|