Click here to Skip to main content
15,914,165 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Download a web page Pin
murali_utr11-Jan-04 20:19
murali_utr11-Jan-04 20:19 
GeneralRe: Download a web page Pin
Ravi Bhavnani11-Jan-04 20:57
professionalRavi Bhavnani11-Jan-04 20:57 
Generalcompiler / equation editor Pin
OCARA11-Jan-04 13:50
OCARA11-Jan-04 13:50 
GeneralRe: compiler / equation editor Pin
Christian Graus11-Jan-04 14:43
protectorChristian Graus11-Jan-04 14:43 
GeneralRe: compiler / equation editor Pin
Roger Allen12-Jan-04 0:40
Roger Allen12-Jan-04 0:40 
GeneralRe: compiler / equation editor Pin
OCARA12-Jan-04 21:16
OCARA12-Jan-04 21:16 
QuestionHow do i get full path to "My Documents" dir? Pin
lobanovski11-Jan-04 10:43
lobanovski11-Jan-04 10:43 
AnswerRe: How do i get full path to "My Documents" dir? Pin
Rob Manderson11-Jan-04 10:59
protectorRob Manderson11-Jan-04 10:59 
AnswerRe: How do i get full path to "My Documents" dir? Pin
Ian Darling11-Jan-04 11:03
Ian Darling11-Jan-04 11:03 
AnswerRe: How do i get full path to "My Documents" dir? Pin
GeraldoLuiz11-Jan-04 11:10
GeraldoLuiz11-Jan-04 11:10 
GeneralRe: How do i get full path to "My Documents" dir? Pin
Tim Smith11-Jan-04 12:00
Tim Smith11-Jan-04 12:00 
GeneralRe: How do i get full path to "My Documents" dir? Pin
Navin11-Jan-04 12:16
Navin11-Jan-04 12:16 
GeneralRe: How do i get full path to "My Documents" dir? Pin
GeraldoLuiz11-Jan-04 12:21
GeraldoLuiz11-Jan-04 12:21 
GeneralRe: How do i get full path to "My Documents" dir? Pin
Rob Manderson11-Jan-04 13:46
protectorRob Manderson11-Jan-04 13:46 
AnswerRe: How do i get full path to "My Documents" dir? Pin
murali_utr11-Jan-04 18:29
murali_utr11-Jan-04 18:29 
Generaldebugger problem Pin
User 58385211-Jan-04 9:55
User 58385211-Jan-04 9:55 
GeneralRe: debugger problem Pin
Roger Allen12-Jan-04 0:45
Roger Allen12-Jan-04 0:45 
GeneralWhen should I delete ServerSocket when client shutdown Pin
white jungle11-Jan-04 5:21
white jungle11-Jan-04 5:21 
GeneralRe: When should I delete ServerSocket when client shutdown Pin
valikac11-Jan-04 6:03
valikac11-Jan-04 6:03 
GeneralRe: When should I delete ServerSocket when client shutdown Pin
white jungle11-Jan-04 6:59
white jungle11-Jan-04 6:59 
GeneralLV & TV strange behavior Pin
GeraldoLuiz11-Jan-04 1:49
GeraldoLuiz11-Jan-04 1:49 
Hi, I've never used label editing in TreeView & ListView before, so I guess it's a simple question. I used the EditLabels property (LVS/TVS_EDITLABELS) and create the controls. But a strange thing happens. I click on the label to edit and it's ok, but when I press any key (in both the TV and LV) the dialog is dismissed. Also, when I press ENTER (without any char has been pressed), they behave differently: the LV accepts it but the TV close the dialog.
What is happening ? What is missing here ?

I create a very simple test: a new Win32 App,typical HelloWorld, and include this lines in teste.rc:

CONTROL "List1",100,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
LVS_SHOWSELALWAYS | LVS_EDITLABELS | LVS_NOSORTHEADER |
WS_BORDER | WS_TABSTOP,7,7,132,30
CONTROL "Tree1",200,"SysTreeView32",TVS_HASBUTTONS |
TVS_HASLINES | TVS_EDITLABELS | TVS_SHOWSELALWAYS |
WS_BORDER | WS_TABSTOP,7,43,158,24,WS_EX_CLIENTEDGE

and include InitCommonControls(); at WinMain and
#include "commctrl.h" and put comctl32.lib in the project settings

finally I put this on the About function:

case WM_INITDIALOG:
LVCOLUMN col;
col.mask = LVCF_TEXT | LVCF_WIDTH;
col.pszText = _T("Col1");
col.cx = 100;
ListView_InsertColumn(GetDlgItem(hDlg, 100), 0, &col);

LVITEM lv;
lv.mask = LVIF_TEXT;
lv.pszText = _T("Txt1");
lv.iItem = 0;
lv.iSubItem = 0;
ListView_InsertItem(GetDlgItem(hDlg, 100), &lv);

TVINSERTSTRUCT tv;
tv.hInsertAfter = TVI_LAST;
tv.item.mask = TVIF_TEXT;
tv.hParent = TVI_ROOT;
tv.item.pszText = _T("root");
TreeView_InsertItem(GetDlgItem(hDlg, 200), &tv);
return TRUE;

and that's it. I didn't include the handlers to LVN/TVN_BEGINLABELEDIT and ENDLABELEDIT , but I think this is not the problem. Why the dialog is dismissed when I press any key ? Why the ENTER key is OK with LV but close the dialog in TV ? Did I forget to handle some message or notification here ?
Did they act differently in Windows and Dialogs ?
GeneralRe: LV & TV strange behavior Pin
GeraldoLuiz11-Jan-04 11:49
GeraldoLuiz11-Jan-04 11:49 
Generalc++ file transfer between client\server Pin
Anonymous11-Jan-04 1:33
Anonymous11-Jan-04 1:33 
GeneralRe: c++ file transfer between client\server Pin
Johnny ²11-Jan-04 2:40
Johnny ²11-Jan-04 2:40 
GeneralRe: c++ file transfer between client\server Pin
valikac11-Jan-04 6:07
valikac11-Jan-04 6:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.