|
Roger Stoltz wrote: When you allow selecting a multitude of files in the file dialog, i.e. setting the OFN_ALLOWMULTISELECT flag, you should use ::FindFirstFile() / ::FindNextFile()...
Why? Exactly how does the FindFirstFile() /FindNextFile() pair parse through NULL -separated filenames?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
hi,
Can anybody tell me,What is the basic difference between mfc and win32 and also how it differs by it's application????
Thanks in advance
Siddharth
|
|
|
|
|
Basically, MFC's are wrapper classes around the win32 API. Meaning that it is much more faster to develop applications using MFC instead of win32 (but you lose of course in some flexibility).
|
|
|
|
|
MFC -> VC++ wrapping Win32
Win32 -> C APIs only
|
|
|
|
|
toxcct wrote: MFC -> C++ wrapping Win32
You might want to qualify that with:
MFC -> VC++ wrapping Win32
Else some pedantic poster will come along and scorn you for it.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
oh my ! all fixed David, Thx
|
|
|
|
|
|
Hi,
I want my MFC application to hav a tab control that would sport a close button on each tab just like in the new Firefox 2.0 and IE 7.0. Could you please giv me some starters or any hints on how to achieve this ?
thanx a lot !
Eraj
|
|
|
|
|
erajsri wrote: a close button on each tab just like in the new Firefox 2.0 and IE 7.0.
You will have to ownerdraw the tab control and respond to the event that is generated for the close button/icon that you drew on each tab.
Tabs in a tab control also support icons so this may help you further.
Take a look at this style TCS_OWNERDRAWFIXED . Search CP or Google with the keyword (TCS_OWNERDRAWFIXED) to find out samples.
|
|
|
|
|
First you need to draw the tab by your self( so that you can draw a close button in the tab item )
In the WM_LBUTTONDOWN message of the tab ctrl find the tab item below it using the HitTest() function.
Check the clicked point is inside the close button you drawn. If so do the action for close.
nave
|
|
|
|
|
thanx for the quick responses,
I had a fair hunch that this wud hav to deal with OWNER DRAWING. What Im fearing now is the possibility of having my Tab Control supporting the Windows XP themes. I have seen an article on CP that shows how to draw Windows Theming on OWNER DRAWN controls. Rather than having to learn how to OWNER DRAW windows XP themes, is it possible for me to ask the Tab Control to paint itself using Windows Theming, and then allow me to paint the Close button only ? Or is it that I have to do the full tab painting since I require Windows XP theming on the Tab Control ?
thanx
|
|
|
|
|
erajsri wrote: is it possible for me to ask the Tab Control to paint itself using Windows Theming, and then allow me to paint the Close button only ?
I think that too is possible. In the onpaint funtion, after the base class have been done the drawing, try drawing the close button.
MyTab::OnPaint()
{
CTabCtrl::OnPaint();
CClientDC (this);
// Draw Close button for each item.
}
nave
|
|
|
|
|
Ive managed to get a close Button inside the tab control.
I did this using the UxTheme library and requesting it to paint a close button on the tab. But once I set it to TCS_OWNERDRAWFIXED the problem is that the control is not drawn fully and only the button gets drawn. How can I ask Windows to paint the rest of the control for me. In Custom Draw you are able to request the control to send only "important" messages to u and let windows handle the rest itself. Why isnt this possible in Owner Drawn controls ?
|
|
|
|
|
if you r going to implement the tab control as I said in the previous post, no neeed to set TCS_OWNERDRAWFIXED style. Let the windows draw the tab control, after that paint the button over the tab items. Please check my previous post.
nave
|
|
|
|
|
I cud use the method uve mentioned but the problem is that the OnPaint method does not give any information as to where the painting is goin to occur and wat the control state is like. In contrast the Owner Drawing gives a lot of information. If i used the OnPaint method i would be painting close buttons everywhere on the tab control ( Ive no control over where the painting is gonna happen ).
|
|
|
|
|
You have complete control over WHERE painting will happen. You may want/need to paint in response
to WM_NCPAINT instead of WM_PAINT though.
Mark
|
|
|
|
|
Hi all,
I need to display a message as a popup menu on the icon of my application which is on the tray.
It is an MFC application. Is it possible in MFC?
If yes, Please tel how can i do this.
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
see me wrote: Hi all,
I need to display a message as a popup menu on the icon of my application which is on the tray.
It is an MFC application. Is it possible in MFC?
If yes, Please tel how can i do this.
I think you want to display a balloon tip.
Then use Shell_NotifyIcon . CodeProject and MSDN has got samples on this topic. Please search. Here[^] is one such article by Chris.
Hope I got your question.
|
|
|
|
|
|
|
50Rubley wrote: look here: http://perestroyka.pe.funpic.de/frag.jpg[^]
How do you know that wasn't just drawn in Paint? Got any other examples? In any case, why would you want to do this? It's very non-standard, and probably not intuitive.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
yes, I have drawn it myself to show you what I mean.. I need it for my own contentment (a small project/experiment)..
what do you mean with "non-standard"? Isn't it possible?
|
|
|
|
|
Perestroyka wrote: what do you mean with "non-standard"?
I've never seen any "custom" buttons on it.
Perestroyka wrote: Isn't it possible?
I know of no way of doing it, which is not to say it can't be done.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: I know of no way of doing it, which is not to say it can't be done.
thats my next question: Are there any documents/documentations wich give information about the c++-hierarchy.. for example like this one-> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/package-tree.html[^]
The Microsoft Platform SDK Documentation isn't a real help.
-- modified at 17:57 Thursday 15th February, 2007
|
|
|
|