|
NS17 wrote: For example, the treectrl of the workspace in VC-6 IDE is doing the same. If we placed the worksapce toolwindow to right, the tooltip will not go outside of the screen.
NS17 wrote: Can anybody help me to reposition the default tooltip that is shown by a treectrl when the item text is clipped inside the ctrl?
This depends on the mouse position. Tooltips always appear relative to your mouse position.
NS17 wrote: I simply want to avoid the clipping of this tooltip when the ctrl is near to right edge of the screen. In this case the default tooltip is clipped by the screen. So I want to move it to left to avoid this clipping.
You will have to sublcass CToolTipCtrl and handle TTM_POPUP . Check mouse co-ordinates to display tooltips accordingly.
Nibu thomas
Software Developer
|
|
|
|
|
Hi
Have what I think is a pretty easy question for most of you,
but I dont know how to solve it unfortunately... so here goes.
Have programmed a Progressbar in a dialogue and want to keep
track of the progress. Works perfect, but sometimes the entire
window stops updating during the calculation and only updates
when everything is 100% done. The same effect can be simulated
when some other window gets focus, then my main window does
not update anymore until the function is done.
Have tried things like:
CWnd *Main=AfxGetMainWnd();
Main->RedrawWindow();
in my function to update the window, but it does not work.
Any one of you have a simple solution?
Regards
Abris
|
|
|
|
|
Abris wrote: Have programmed a Progressbar in a dialogue and want to keep
track of the progress. Works perfect, but sometimes the entire
window stops updating during the calculation and only updates
when everything is 100% done
Use a Timer.
For more info take a look at WM_TIMER .
Nibu thomas
Software Developer
|
|
|
|
|
Use Thread to update the Progress bar,
|
|
|
|
|
You can write the thread that will update ur progressbar window as well in the mean time you can handle other stuff.
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
-- modified at 4:16 Monday 3rd April, 2006
|
|
|
|
|
Hmmm, seems like threads is the solution then?
Tried the Timer thing, but it did not work at all.
Added the following code to the OnTimerEvent in my main dlg.
this->Invalidate();
this->UpdateWindow();
this->RedrawWindow();
m_TheFileDownLoadProgress.RedrawWindow();
m_TheDownLoadProgress.RedrawWindow();
When inside the Filedownload function and the dlg looses
focus this code does not help however, it still does not update
the Progress bar. Only thing that it gave me was an very annoying
blinking window from all the updates
Threads I have so far never tried, seems like a complicated
solution? I'll take a look, but I would have guessed there was
some simpler way to do it....
|
|
|
|
|
Abris wrote: Hmmm, seems like threads is the solution then?
Correct.
Abris wrote: Threads I have so far never tried, seems like a complicated
solution? I'll take a look, but I would have guessed there was
some simpler way to do it....
See http://flounder.com/workerthreads.htm for more.
"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
|
|
|
|
|
Hi all,
I'd like to add a "print in progress dialog" in my applicaiton when some printing is going on. How can I do this?
Thanks in advance,
Sarvan AL
|
|
|
|
|
There is no direct way to determin if something is in the process of printing or if it has finished. Once you have created your document and passed it on to the print spooler your app has finished with it.
One thing you could do is hook the spooler window, and display your messages that way.
|
|
|
|
|
Hi all,
In my MDI application, I've used ResizeParentToFit() function for all of my formview children. If the MDI parent window is maximized, everything works fine. If it is in default size, the child windows are getting the scrollbars. I'd like to have the child windows without scrollbars.
If anybody could show me some path, I'd be very thankful.
Thanks in advance,
Sarvan AL
-- modified at 2:16 Monday 3rd April, 2006
|
|
|
|
|
Hi all,
I've fixed this problem by setting some fixed size to ChildWnd in its PreCreateWindow(..).
Sarvan AL
|
|
|
|
|
Hi,
I place some line , rectangle, ellipse graphic elements in the view.
As the application goes background and them come in the front..
all those things are lost. So how to bring those back when the view
gets painted in this case.
Do I have to use CMetaFileDC and play the meta file back in paint.
But in this case the file gets created in the current directory. I dont
want this.
Thanks
Lee
|
|
|
|
|
Use a memory DC.
Nibu thomas
Software Developer
|
|
|
|
|
Hello,All!
I've two problem want to question :
The First,I am using Win32,I've a button(label"Browse")
I want that when i press this button ,will display
"Browse" Dialog (like Start\Run\Browse).
The Second,I've a "Help.chm" module,I want to call this
module in win32 (like Help in software of microsoft).
if who know about one of them(or all),please help me.
Thanks !
|
|
|
|
|
Hi Tran Ngoc Minh
you can use GetOpenFileName
|
|
|
|
|
::OPENFILENAME ofn;
char *szFileName=new char[1024];
ZeroMemory(szFileName, sizeof(szFileName));
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn); // SEE NOTE BELOW
ofn.lpstrFilter = "*.bmp;*.*";
ofn.lpstrFile =szFileName;
ofn.nMaxFile = 1024;
ofn.Flags = OFN_EXPLORER | FN_FILEMUSTEXIST|OFN_ALLOWMULTISELECT|OFN_READONLY;
ofn.lpstrDefExt = "bmp";
CString str;
if(GetOpenFileName(&ofn))
{
CString str=ofn.lpstrFileTitle ;//szFileName ;
CString temp;
str.TrimLeft();
int index;
while(str.GetLength()>0)
{
index=str.Find('\0') ;
temp=str.Left(index);
str=str.Mid(index+1,str.GetLength()-1);
}
}
From the above you can get the name of the selected file
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
To show the Browse dialog use CFileDialog class.
nave
|
|
|
|
|
Tran Ngoc Minh wrote: I've a "Help.chm" module,I want to call this
module in win32
You need to include htmlhelp.h and html.lib, then from your code call the HtmlHelp() function.
A point to note, the .lib file will add extra size to your exe, I little too much in my opinion. But the function gives you the ability to do more than simply open the file. If you want to leave this out call either the ShellExecute() or WinExec() function. This will open the help file, though your program will have no control over it.
|
|
|
|
|
Hi.
a menu:
menu1
...Item1
...Item2
...Item3
If TrackPopupMenu() this menu, How can get it string (menu1) and item ID or string(item1,item2...) form WM_INITMENU or WM_INITMENUPOPUP message
Thanks.
|
|
|
|
|
Well your description doesnot explains your question.
Anyway if you need the ID of your menu Items you can get it in WM_COMMAND
you see it under wParam. and check your ID's. Which menu Item is selected.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
Hello
How about GetMenuItemID, GetMenuString methods of CMenu.
|
|
|
|
|
menu1
...
...
umm, if get menu1, GetMenuString can get? it id is?
|
|
|
|
|
If u want to find id of menu item then try using GetMenuItemID method.
int nPos = FindMenuItem(pMyMenu, _T("MyMenuItem"));
UINT menuItemID = pMyMenu->GetMenuItemID(nPos);
|
|
|
|
|
how can we dump every char in an multiline edit box???
HelpMe
|
|
|
|
|
What does 'dump' mean. Do you want to clear the text box ? Do you want to grab all the text to a string ? What ?
Christian Graus - Microsoft MVP - C++
|
|
|
|