|
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
|
|
|
|
|
Perestroyka wrote: Are there any documents/documentations wich give information about the c++-hierarchy..
STL or MFC?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
What you ask for does not exist. C++ does not contain any native classes.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
ok,
for example I want to program something for Shell.. I mean, where to look for the right commands/funtions/BOOLs/....?
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is it possible to call a function accepting variable args and pass them on to another function directly?
void foo( ... )<br />
{<br />
}<br />
<br />
void bar( ... )<br />
{<br />
foo( );<br />
}
The reason I ask is I have created a macro using __VA_ARGS__. I currently use a helper function to concact them into a string then call the appropriate method.
|
|
|
|
|
AFAIK there is no way, but you can pass a va_list. see vsprintf etc.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
WalderMort wrote: Is it possible to call a function accepting variable args and pass them on to another function directly?
Here is one way...
void VarArgFuncHelper( LPCTSTR lpszFormat, va_list argList )
{
}
void VarArgFunc( LPCTSTR lpszFormat, ... )
{
va_list argList;
va_start(argList, lpszFormat);
VarArgFuncHelper(lpszFormat, argList);
va_end(argList);
}
|
|
|
|
|
That works, thanks Nibu
|
|
|
|
|
I want to use PNL Package{.cpp and .hpp} {Probabilistic Network Library}, and i need to intoduce this package, i use C++.net (Visual Studio 2005).
I test #include"Pnl_dll.hpp" , but it doesn't work. please help me.
have added the hpp files, it happen at compile time.
The exact error message "fatal error C1083: Cannot open include file: 'pnl_dll.hpp': No such file or directory"
please help me.
|
|
|
|
|
abbd wrote: fatal error C1083: Cannot open include file: 'pnl_dll.hpp': No such file or directory
C1083[^]
Include directive[^]
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
C++ does not search your hard drive for the header file, you have to set up your project to know where it is, or provide a full ( relative or absolute ) path to the file. The former is more likely to work.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I'm having somewhat of an issue with the new 'safe' string functions. Take the following example:
char foo[ 512 ] = {0};
strcat_s( foo, 512, "Hello World" );
char bar[ 512 ];
ZeroMemory( bar, 512 );
strcpy_s( bar, 512, foo );
Nothing wrong with the code you might think, but add bar to your watch list. Even though the memory was zero'd out, the string was written, but everything after the null character has been set to 0xFD.
In most cases this is not a problem, but I am using these with a memory mapped file. And it's causing havoc. Even strncpy_s displays the same problem. The only solution is to use CopyMemory() , after calling strlen() and adding the null.
-- modified at 19:11 Tuesday 13th February, 2007
|
|
|
|