|
Hiya fellow cpain's..
Just looking at the member list for CListCtrl but cant find anything to do hide a row using CListCtrl. I was looking for SetRowHeight or something similar. Am i missing something?
|
|
|
|
|
flippydeflippydebop wrote: but cant find anything to do hide a row using CList
Row in a list ctrl cannot be made hidden. Only way is to delete it.
nave
|
|
|
|
|
I dont try it but I think if you derived CListCtrl when you want to write items you can skip of this item
|
|
|
|
|
|
can u explain more? I dont understand what u need?
nave
|
|
|
|
|
I guess you need to check a thing,right?
|
|
|
|
|
Do you need to CListCtrl::FindItem ?
|
|
|
|
|
hi,
Given a window handle, is there any way we can know what it consists of
like child windows, Window title, menu items etc.
It would be very helpful if anyone can point to the API s or the MSDN documentaion, so that i can the use them in my win32 application.
Thanks in Advance,
Pvvr
|
|
|
|
|
Vissu89 wrote: Given a window handle, is there any way we can know what it consists of
like child windows, Window title, menu items etc.
See EnumChildWindows(...)
Also:
typedef struct {
DWORD cbSize;
RECT rcWindow;
RECT rcClient;
DWORD dwStyle;
DWORD dwExStyle;
DWORD dwWindowStatus;
UINT cxWindowBorders;
UINT cyWindowBorders;
ATOM atomWindowType;
WORD wCreatorVersion;
} WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
GetWindowInfo(...)
This gives some information about a window's handle that you have.....
Do not know whether this would suit your needs or not exactly?
-- modified at 2:42 Friday 22nd September, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks you very much, i will try this.
Pvvr
|
|
|
|
|
and passing the application's HWND to GetWindowText() would retun you the window caption(title).
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Hello everyone on forum,
Is it possible to convert a cstring to a char pointer
if yes then how
basically i have a cstring and i want to use one function which takes char * parameters now i want to pass the value that is in cstring to this function how can i do that
Thanx.
|
|
|
|
|
for this purpose you can use
strcpy(char *,CString)
It will help you.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
You can use the operator LPCTSTR ( ), like this:
CString cs = "Hello";
char * cp = (LPCTSTR) cs;
Operator LPCTSTR is built in the CString class, so it's safe to use.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
hello "kakan"
I used the method u specified but its giving the following error
C:\Program Files\Microsoft Visual Studio\MyProjects\interface\interfacedialog1.cpp(245) : error C2440: 'initializing' : cannot convert from 'const char *' to 'char *'
Thanx
|
|
|
|
|
Hello.
That's right, operator LPCTSTR returns a const char * (The 'C' stands for 'const')
The reason for returning a const char * is that the contents of what the const char * points to must be unaltered.
So if you call a function that acually changes the content of the CString, then you have to use the CString methods GetBuffer() and ReleaseBuffer().
GetBuffer() returns a LPTSTR (a char *).
But if you use GetBuffer(), then you must call ReleaseBuffer()
So in your case, use GetBuffer() and ReleaseBuffer().
And check out the CString documentation at MSDN.
I.e here[^]
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
namy1 wrote: basically i have a cstring and i want to use one function which takes char * parameters now i want to pass the value that is in cstring to this function how can i do that
Well if _UNICODE is defined then you will have to do some additional chores for converting to char* (Read this[^] for more info), else it's quite easy
CString csStr = "Non unicode string";
char *szStr = csStr.GetBuffer(0);
AFunctionToCall( szStr );
csStr.ReleaseBuffer(); Well if you need a const char* , it's much more easier
CString csStr = "Non unicode string";
const char* szStr = csStr;
AFunctionToCall( szStr );
|
|
|
|
|
use CString::GetBuffer() with CString::GetLength() to copy the enitre string into the char*.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[ ]--
[My Current Status]
Link2006 wrote:Let's take it outside of CP
Jeremy : Please don't.I would love to see this.I'm making the popcorn already.
|
|
|
|
|
Unless a copy is actually what is desired, there is no need to copy the data for this. GetBuffer returns a valid char* that can be used until you call ReleaseBuffer (at which time the CString object will be updated with the changes you made to the buffer).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
CString is replacable with char, ie you can put in a CString when a char[] is required.
try putting in a reference to your CString ie &string
|
|
|
|
|
I use SHBrowseForFolder to display folder select dialog. How detect folder change (create new, delete, ...) while this dialog displaying.
Thank for your answer.
|
|
|
|
|
Can you be more specific.
|
|
|
|
|
I use SHBrowseForFolder to display BrowforFolder dialog box.
And i create a button to create new folder.
Then, i don't know how to refresh the BrowseforFolder dialog box to update this folder i've created.
Yes, i know in SHBrowseForFolder has the new style dialog which may help us to create new folder.
But i want to create by my self and update to BrowforFolder dialog box is displyaing.
thank for your help.
|
|
|
|
|
Hope I understood your question
if you want to insert your buttons to SHBrowseForFolder for update or delete I see exmples of SHBrowseForFolder on codeproject
|
|
|
|