|
Or would it be better to use the TreeView_EditLabel macro?
|
|
|
|
|
The following code should be what I need, but the label is not being opened in edit mode.
SetFocus () ;
HWND hWnd = TreeView_EditLabel (m_treeCtrl.m_hWnd, hItem) ;
Any thoughts on why the tree item would not be opened for edit?
|
|
|
|
|
hmmm... I don't think I need the code/class presented in that article. I have most of the functionality that i need already.
Using TreeView_EditLabel seems to do what I need as far as calling a begin edit for the tree item.
The problem now is that it does not stay in edit mode. So the item is being opened for edit in OnInitDialog, but then an end edit is being called before the page displayed.
So the desired result is not being achieved. I wonder if the focus is being lost so an end edit gets send ?
Any more thoughts on this?
|
|
|
|
|
At the end of OnInitDialog() , set focus to the tree and post a TVM_EDITLABEL message to the dialog. Return FALSE from OnInitDialog() to indicate that you set the focus to a control.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Perfect. That's exactly what I needed. Thanks Michael.
|
|
|
|
|
Hello Everyone, I want to get user name. I changed user name. Now when I call GetUserName() I get old User name instead of new one. Is there any way to get new/current user name.
First deserve then desire. Let be deserved first.
|
|
|
|
|
GetUserName() gets the user name of the current thread. Perhaps you made the change in another thread.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Sorry, I think I gave uncomplete information. Scenerio is this : I am talking about Windows Log-In user. I changed name of User account and I logged in with that new name. But when I use GetUserName() I get old name of account and not new one with which I currently logged in. Any way out.
Thanks for reply.
First deserve then desire. Let be deserve first.
|
|
|
|
|
Shivaji Patil wrote: I want to get user name. I changed user name.
which username are you talking about.. is it the Windows user or your Application local user.. GetUserName reterive the UserName of Currently logged Windows user name
|
|
|
|
|
Sorry, I think I gave uncomplete information. Scenerio is this : I am talking about Windows Log-In user. I changed name of User account and I logged in with that new name. But when I use GetUserName() I get old name of account and not new one with which I currently logged in. Any way out.
Thanks for reply.
First deserve then desire. Let be deserved first.
|
|
|
|
|
What to do for changing ComboBox height ?
|
|
|
|
|
Your question is a bit unclear. Perhaps this article/code will help.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
When I change pc to one that the screen size is big then my screen, i was the problem of size et position.
Since I use CLayoutHelp class I have solve this problem, but ComboBox control don't change their size. That my problem
|
|
|
|
|
Where is this article ? I don't see it
In zip file there are
two file smartDropdown.cpp and .h
send me this article please
I learn my self
|
|
|
|
|
It may posssible by setting font of the Combo box
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
I don't understand anything by to set font of combox.
Can you show clearly what i can do .
|
|
|
|
|
You just create the variable of the your combo box
CFont *m_font=new CFont();
m_font->CreatePointFont(200,"Tahoma");
m_Test.SetFont(m_font);
m_Test.AddString("1");
m_Test.AddString("2");
m_Test.AddString("3");
m_Test.AddString("4");
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
I have created a MDI application , such as "MDIEx".When I call function OnFileNew() in CMDIExApp,a MDI child will be created
How to creat a MDI child from CMDIExDoc? (Function CWinApp::OnFileNew() can't be accessed from CDocument)
Thank you!
Chao tat ca cac ban!
|
|
|
|
|
I guess you could do a AfxGetMainWnd( )->SendMessage( ) with WM_COMMAND and ID_FILE_NEW as parameters (look at the help for WM_COMMAND to figure out what WPARAM and LPARAM should be, I can't remember it from the top of my head...)
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Hi all:
I am doing a OpenGL project. I want to create a function tracking the mouse motion so that the object in the window can spin or rotate according the mouse motion. I know there is a
void glutMotionFunc(void (*func)(int x, int y));
registration function. Does anybody know how to achieve the functionality please?
Thanks in advance!!!
Asura
|
|
|
|
|
Hi all,
I am using VFW.
I know i can set a call back message capSetCallbackOnFrame and then receive the callbak in:
LRESULT CALLBACK FrameCallbackProc(HWND hWnd, LPVIDEOHDR lpVHdr)
where lpVHdr->lpData is the buffer containing the video information to be shown(drawn)
my question is how do i add a drawing to that video? i want to see the captured frame from my webcam and ontop of that i want to draw something....
can any1 show me piece of code for that?
thanks in advanced
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
I'd like to capture video from usb cam, what's the VFW?
9ine
|
|
|
|
|
|
hi
I am Working on a printing issue in MFC.I want the header to be printed in multiple lines.so I am using DT_WORDBREAK.It works fine when the string contains spaces(eg:1.Sample Print1 2.Sample Print2.....) but when the string contains no spaces the output is clipped at both ends
(eg input :1.SamplePrint12.SamplePrint2.....).
the output I am getting as follows:
mplePrint12.Sample
rint2.Sampl
the code I used is as follows
pDC->DrawText(String,rectArea, DT_CENTER | DT_WORDBREAK);
what could be the problem?Can anyone clearly explain me the functionality of DT_WORDBREAK.Am I using it in the correct way?
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|