|
EM_LINELENGTH message wants the index of a character (of the wanted line) as WPARAM , hence, if you need the lenght of the third line, use:
INT iCharIndex = SendDlgItemMessage(hwnd,IDC_INPUT,EM_LINEINDEX,(WPARAM)2,(LPARAM)0);
INT iLineLen = SendDlgItemMessage(hwnd,IDC_INPUT,EM_LINELENGTH,(WPARAM)iCharIndex,(LPARAM)0);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All
How can i use short cut key for open and close dialog box?Plz help me
|
|
|
|
|
|
Normally and SDI an application mainframe can split using splitterWnd from CMainFrame,
Can i split the new fromview in the same application which is not the main view
|
|
|
|
|
Cant you code it explicitly using a static splitter?
|
|
|
|
|
Hi' I'm new to C++?
This code to show current date.
#include <iostream.h>
#include "string.h"
#include "time.h"
#include <stdlib.h>
int main()
{
tdclass TimeDateClass;
cout<<"Today is "<<TimeDateClass.date()<<endl;
system("pause");
}
How to compare date we input and compare is it less or more from the current date?
Tq
|
|
|
|
|
One idea is to convert the dates to corresponding number of days and compare.
|
|
|
|
|
Can you show me more details!
|
|
|
|
|
For example,
days1 = day1 + month1*31 + year1*365;
days2 = day2 + month2*31 + year2*365;
if( days1 > days2 )
{
do something
}
else
{
do something
}
|
|
|
|
|
You can use COleDateTime[^] class. It have comparison operators such as ==, <, <=, etc[^] which can be used for comparison.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi,
Using synchronization object, I can restrict the number of instances of my application to one. How can I achieve the same, when the system is on network?
|
|
|
|
|
What about broadcasting a custom UDP message over the network? If any of your application is running over somewhere in the network, sent back another reply.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
What exactly do you mean by system is on network ?
- Malli...!
modified on Friday, December 12, 2008 2:38 AM
|
|
|
|
|
Hmmm - is it possible that you want to achieve this so you can ensure there's only one person accessing a resource on the network somewhere? If it's a file, you could try locking the file appropriately...or you could do the job the safe and assurable way, and hide the resource behind a server, so the server is the only thing that can access it, giving you control again.
|
|
|
|
|
Hi Friends,
I have two NT services running on my machine.NTService1 is dependent on NTService2.
When i was trying to debug the code related to NTService2,i tried attach to process. But the process related to NTService2 is always grayed out.
This is happening only on Vista machine.
I tried searching the Microsoft forums,but could not find a solution.
Any help is appreciated.
Thanks in Advance.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
Visual Studio needs to run with elevated privileges to attach to processes...
Are you doing that?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes..I am doing that.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
Hi all,
I m using a ListCtrl of ReportView type.
i have 5 coloumns here.
i want to add checkbox or button in header or in coloumn 4.
please tell me how can i do this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
See here[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
thanks i m already check this article.
this is use number of project in ne application and it is not working properly,
this is use number of class for this.
i have already derived me listctrl from other class.
there is any other easy way to implement this.
please help me.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Did you check this article[^]? Please read section - 2. Adding check box for head ctrl .
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
I want to add check box other than first coloumn.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hai!
Suppose a user has to enter some specified characters like only 'A', 'D', 'F'. in an edit box of a dialog, so is there any event handler through which i can check what character is being entered by the user, if the user enters a wrong characer other than the above mentioned i will not allow it.
Thanks !
|
|
|
|
|
you can do it in EN_CHANGE handler.
1. If the user has entered a correct char store it in some string,
2. Check for the next character.
3. if it's valid then replace the string stored earlier with the new one.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
i want to pack some files with vc++ application.After that i need to edit & copy that files.how i do that.
|
|
|
|