|
You can't do that within the IDE.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hmmm...
I'm very surprised/disappointed.
Thanks,
Tom
|
|
|
|
|
OS: win2000
VC: VC6
defaults are win32 debug and release, I can not find place to build an UNICODE exe in project settings.
How to build an UNICODE MFC exe project?
|
|
|
|
|
Replace _MBCS with _UNICODE in the preprocessor definitions.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
|
includeh10 wrote: t is not working.
Interesting.
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]
|
|
|
|
|
includeh10 wrote: it is not working.
Well, what is that supposed to mean? At best, I can tell you that 'it ought to work'.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Mr.Univoter starts boring me.
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]
|
|
|
|
|
CPallini wrote: Mr.Univoter starts boring me.
But its not serious problem for you because you cant see that votes. 
|
|
|
|
|
Hey man, you're wrong, I have the CPMRU as par of my MVP 's toolkit.
http://www.codeproject.com/script/Forums/preview.aspx?prefix=ctl00$MC$
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]
|
|
|
|
|
Make the _MBCS -> UNICODE change as mentioned, but for an executable, you will also need to change the entry point to wWinMainCRTStartup (Project | Settings -> Link tab)
|
|
|
|
|
Hello,
like in title described i have this problem!
That because, if i click in my CListCtrl i try to find what is the text in this cell!
I do it now like this:
LPNMLISTVIEW lpItem = (LPNMLISTVIEW)pNMHDR;
LVITEM lvItem;
lvItem.mask = LVIF_TEXT;
lvItem.iItem = lpItem->iItem;
lvItem.iSubItem = lpItem->iSubItem;
this->m_cListAll.GetItem(&lvItem);
CString csItemText;
CString csIndex;
csIndex = m_cListAll.GetItemText(lpItem->iItem, 0);
csItemText= m_cListAll.GetItemText(lpItem->iItem, 1);
Thanks for Help!
termal
|
|
|
|
|
termal wrote: // this works(but why not the sample above with LVITEM?):
Try this and see what happens
LVITEM lvItem = {0};<br />
led mike
|
|
|
|
|
Hi,
thanks for answer, but this dont woks!
regards
termal
|
|
|
|
|
When you debug that code what is the value of lpItem->iSubItem ?
led mike
|
|
|
|
|
Why not use the code that works? If you're using MFC, let MFC do the work.
You can also trace into the working code and see how it differs from your code.
Back to your broken code...
The docs for LVM_GETITEM state:
"If the LVIF_TEXT flag is set in the mask member of the LVITEM structure,
the pszText member must point to a valid buffer and the cchTextMax member
must be set to the number of characters in that buffer. Applications should
not assume that the text will necessarily be placed in the specified buffer.
The control may instead change the pszText member of the structure to point
to the new text rather than place it in the buffer."
How much of that have you implemented correctly?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
you r in right, i have it now!
Thenks for Help!
termal
|
|
|
|
|
Why didn't you initialize lvItem.pszText (with a valid buffer) and lvItem.cchTextMax (with the relative size)?
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,
*shame* i never use LVITEM to retrive some data, only to store to list!
But now i know how to use in both ways!
regards
termal
|
|
|
|
|
Don't bother, it's a bit tricky, indeed.
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]
|
|
|
|
|
Hello,
I am using GetProfileString to read from registry, the registry keys are created via setup and i should check if there is an option set, and the program should act accordingly.
For example;
MyApplication
Data
Data01
I have to check if Data01 available, if yes then read its setting from the registry, otherwise do the default handling.
However when i check if Data01 available, GetProfileString creates that entry for me , if that entry is there no problem but if it is not, then it automatically creates. You can see how i am trying to check.
CString category(_T("Data\\"));
category+=dataCode;
path = GetProfileString(category,_T("InitPath"));
How should i check if an entry there using GetProfileString or how can i do it?
Thanks in advance.
Bekir.
|
|
|
|
|
beko wrote: How should i check if an entry there using GetProfileString or how can i do it?
Use RegQueryValue() for the registry.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
See 'Checking Existence of Keys and Values' in this[^] article.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hello?
Is there any way to convert:
char* to const char*
const char* to char*
string to const string
const string to string
thanks in advance
It is never late to learn
|
|
|
|
|
Could you be more specific? Please post the relevant code.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|