|
LVN_ITEMCHANGED goes to the parent of the list - chances are, they are sent to the tab, rather than the dialog.
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygen
|
|
|
|
|
Could you please tell me a work around? Should I try and catch it with OnNotify. Example please -
Thanks!
|
|
|
|
|
First, please confirm that you create the list control indeed as child of the tab.
The "standard" solution would be to provide your own Tab Ctrl that handlöes the LVN_ITEMCHANGED message.
A "more advanced" solution would be creating a frameless child dialog (like a property page) as child of the tab, and the list ctrl as child ofthe "page" dialog. (If you're using MFC, this is encapsulated relitively well in CPropertySheet and CPropertyPage). This is recommended if you use multiple non-trivial tab pages.
A "dirty trick" would be to specify the dialog (instead of the tab) as parent of the list. You get in trouble quickly, but sometimes it works...
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygen
|
|
|
|
|
Thank you for your suggestion. What I have is a dialog with a tabctrl. For the tab 'pages', I have attached 2 "borderless" dialogs.
I have extended the CTabCtrl class for my purposes. How do I handle the LVN_ITEMCHANGED event if CTabCtrl does not handle it(class wizard does not show this event). I tried hand jamming the afx function, but it still does not work.
Thanks for your help!
|
|
|
|
|
what's the ralationship of ondraw and onpaint?
|
|
|
|
|
OnDraw() is called by OnPaint(). OnDraw() is also called by OnPrint(), that is how MFC allows you to use the same drawing code for the screen and printer.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Can anyone help me to some links/tutorials concerning skinning application using layered windows. Can't seem to find that much around on the net. Thanks.
|
|
|
|
|
MSDN is a good resource!
==============================================
SkinMagic SDK Library for C/C++
The better solution for write skinnable application
http://www.appspeed.com
==============================================
|
|
|
|
|
Which version of MSDN do I need? I currently have 6.0 along with MS Visual C++ 6.0. Do I need to upgrade both MSDN and visual C for all the goodies. I couldn't exactly find anything in the index for layered windows in my version.
|
|
|
|
|
|
Hi,
I have created a small MFC dialog app with the mfc app wizard and add some control and much function. Now what I would like to do is to add a popup window that I can plot some graphics in. So I added a new class GRAPHIC_WINDOW based on gerenic Cwnd, and then in the class wizard I added the Create msg to the new class GRAPHIC_WINDOW . Now I have added a new button to the CDlg_windDlg class and called the:
BOOL graph_window::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
What happened was a child window in the main dialog window popup, not really what I wanted. So after much searching I figured I need CreateEX()
So I changed to code in graph_window::Create to CreateEX() after much trial and error I almost have a popup window. I say almost bacuase a window is create but it is invisable and fills the desktop along with a half creat item on the task win98 bar... I spent much time now trying to figure out what wrong anyone any idea please..
Brgds Ian Knigh.... Find code below
BOOL graph_window::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
//return CWnd::CreateEx( WS_EX_CLIENTEDGE , _T("STATIC"), "MDICLIENT" , WS_BORDER | WS_MAXIMIZE | WS_CLIPCHILDREN | WS_CHILD, rect, 0, 0, 0 );
//AfxHookWindowCreate(this);
return CWnd::CreateEx( WS_EX_CLIENTEDGE ,AfxRegisterWndClass( 0),"Hello World", WS_THICKFRAME |WS_BORDER |WS_POPUP|WS_VISIBLE|WS_BORDER | WS_MAXIMIZE ,rect,NULL,0);
EnableWindow( TRUE );
// Set this as active...
SetActiveWindow();
// ...foreground...
SetForegroundWindow();
// ... and focus window
SetFocus();
// Run the modal loop
// nResult = RunModalLoop();
// Destroy window on exit
// DestroyWindow();
// return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
|
|
|
|
|
Hi,
I need to calculate color, when I use two layers..
bottom layer have color: r1,g1,b1,a1
and top layer have color: r2,g2,b2,a2
but I don't know how to calculate resulting color.
Alpha component is:
a=a1+a2*(255-a1)/255;
but I don't know other color components.
(Only when a1==255 => bottom layer is opaque).
Thanks for help!
i'm only pointer to myself
|
|
|
|
|
alpha generally ignores the bottom layer. alpha usually only applies to the top image, it controls overlay transparency and the bottom alpha is unchanged by the overlay image.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
Surely you must consider the alpha values of all images in the stack if there's a background layer?
--
It's not unusual to be picked up by a klingon woman
It's not unusual to have fun with a klingon
When I see you kicking me around
It's not unusual to see me cry, I wanna die
|
|
|
|
|
just merge each layer onto the background, one at a time, in Z order.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
For eons, I have been creating my start menu links and desktop icons using IShellLink. I have found a serious limitation (for me) though - it does not work very well if trying to create links on a different machine (e.g., a UNC path.)
Is there any way to create a shortcut without using IShellLink? Is the .LNK file format documented anywhere?
OR perhaps there is another way arond this - since my problems are limited to creating shell links on network machines, is it possilbe to create a "dummy" shortcut locally, then copy the .LNK to the remote machine? I can't assume the target file I want to link to will be on the local machine though, it may only be on the remote machine.
Thanks!
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
You can use SHAddToRecentDocs for instance. Here[^] is some code.
|
|
|
|
|
THanks, althuogh from looking at it, it seems like it will suffer from the same problem I am having with IShellLink... namely, it doesn't look like it will work very well when creating shortcuts on a different machine.
I will investigate, though. Thanks for the info.
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
I am writing an application to grab images from a still camera (probably USB) using Visual C++ 6.0.
Most of M$ references are to .NET and windwos XP (I use Win2k).
Any suggestions ?
Thanks.
Elaine
The tigress is here
|
|
|
|
|
time to learn about TWAIN
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
But I thought never the TWAIN shall meet
Sorry and thanks for the tip
Elaine (apologetic fluffy tigress)
The tigress is here
|
|
|
|
|
|
From my Visual C++ Dialog program I need to execute a Quickwin console program, and make it close automatically (under Windows NT).
The problem is, that when the program finishes it displays a messagebox with "Program Terminated, Exit Windows?" with YES/NO buttons.
Is it possible to get this window to close without the user having to press the Yes button?
I've used 'CreateProcess' to run the progam, so that I get the process handle, and was then going to
WaitForSingleObject(process, INFINITE);
CloseHandle(process);
The problem is that whatever I try, I always get the MessageBox - I never get past the 'CreateProcess' to be able to delete the window.
Cheers
Mike
|
|
|
|
|
It sounds like your Quickwin program is doing something weird. Have you tried ShellExecute() ?
--
It's not unusual to be picked up by a klingon woman
It's not unusual to have fun with a klingon
When I see you kicking me around
It's not unusual to see me cry, I wanna die
|
|
|
|
|
Hi guys
Does anyone know how to translate this Matlab code into C++?
function a = fit_ellipse(x,y)<br />
d = [x.*x x.*y y.*y x y ones(size(x))];<br />
s = d'*d;<br />
c(6,6) = 0; c(1,3) = 2; c(2,2) = -1; c(3,1) = 2;<br />
[gevec, geval] = eig(s,c);<br />
[negr, negc] = find(geval < 0 & ~isinf(geval));<br />
a = gevec(:,negc);
i've done up until line 4 but i got stuck on solving the eigenvalue. Can somebody help me please? Thank you so much
|
|
|
|