|
Thanks, I added the ID for the string. But the string or the separator still don't show up.
|
|
|
|
|
You did not show where or how you are calling TrackPopupMenu() to show your menu. You have to call TrackPopupMenu using pSysMenu.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hi ! I'm developing a LabWindows (National Instruments ANSI C developement tool) application that should be able to display an ALWAYS floating panel. The only problem is the 'full screen mode' of Windows Media Player. My window is always on the top, but not if I set fullscreen in the media player. I guess that the problem should be in the exclusive control of the display made by DirectX. Is there a way to force my window to stay over ?
Thanks !!
|
|
|
|
|
It's an arms race - You want your window always on top and someone else wants their application always on top. It will end in tears.
Steve
|
|
|
|
|
It's not DirectX exclusive mode, it's a matter of race conditions. Whoever moves to the top latest wins. So what's happening is that your window is being relegated down the order when Media Player opens the fullscreen window and makes it topmost. What you'll need to do is detect (somehow) when the fullscreen window is opened, and then use SetWindowPos() to set your z-order to topmost. That should do the trick.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
|
Thank you very much !!
I tried to do as you said, but it didn't work. Maybe because the event EVENT_LOST_FOCUS, which LabWindows Rutime engine generates, doesn't work with the full screen of Media Player.
But, using the function SetWindowPos(...) with HWND_TOPMOST, inside a timer, solves the problem.
Thank you again !
|
|
|
|
|
leliup wrote: using the function SetWindowPos(...) with HWND_TOPMOST, inside a timer , solves the problem
Is that a good idea...
Owner drawn
Jesus Loves
|
|
|
|
|
How do i added an event handler or implement a virtual function of the baseclass in 2003 like it was there in VS.6 Class Browser?
-Prakash
|
|
|
|
|
Events, messages and overridable functions can be setup via the 'properties' slide-bar. Just select the class you want to edit, open the properties dialog window, then choose from the buttons at the top.
I Dream of Absolute Zero
|
|
|
|
|
Thanks, i figured that just a moment back, just when i got your mail.
I have justed started with VS.2003 and the IDE UI has changed a lot since VS.6. well i spend almost 2 hrs to figure this out, hope developing on 2003 IDE is lot more fun.
I thought in VS2003, they have removed this option, I was so pissed, I shouted at my GF and now she is angry.
I guess I should give her a call now
-Prakash
|
|
|
|
|
We moved over from VS6 just over a year now. Like you, it took a while to get used to the interface, but I love it now. The only thing that irritates me now is the Intelli-sense. It sucks! I should get myself a copy of Visual Assist X, then I would be complete!
I Dream of Absolute Zero
|
|
|
|
|
|
Well, they (WholeTomato)[^] claim it does, but I can't verify that. My department will be slowly moving us over to VS2005 in the next few months. From the feedback I've been reading here, it seems that I might not need VAssistX with VS2005 due to vastly improved intellisense features.
Fingers crossed
I Dream of Absolute Zero
|
|
|
|
|
RChin wrote: From the feedback I've been reading here, it seems that I might not need VAssistX with VS2005 due to vastly improved intellisense features
i think we've not read the same threads buddy !
what i've seen there about VS2005' intellisense is that it has been highly improved, but not for C++...
moreover, visual assist was really powerful on both VC6 and VS2003, ,so i hope that it can still improve productivity, even on VS2005
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
-- modified at 12:52 Wednesday 1st February, 2006
|
|
|
|
|
toxcct wrote: about VS2005' intellisense is that it has been highly improved, but not for C++...
Urgghh! NOooooooo!!!!!!
I Dream of Absolute Zero
|
|
|
|
|
|
you know what, Intelli-sence is a good feature, but it greatly reduces the ability to think or remember and it is a big problem when u move to some other platform or programming lang where these features are not there.
Yes reading the documentation is a tedious job, but you know what, everytime i look at the document to read something about the api or search for an api, I learn something new.
I like it this way, so I am not too upset with intelli-sence working or not.
CPHog is great!!!
|
|
|
|
|
|
toxcct wrote: you still code inside notepad ???
How can I forget the good ol' notepad.
No intellisense, only your common sense works there. He he;P
Owner drawn
Jesus Loves
|
|
|
|
|
I am curious about something dealing with constructors in dialog classes. I have seen a certain way of doing the constructor and I wonder if it actually buys anything. Here is what I am talking about:
FOO::FOO(CWnd* pParent /*=NULL*/)
: CDialog(FOO::IDD, pParent),
m_pSomeObject( NULL ),
m_bSomeBoolean( false ),
m_iSomeInt( 0 ),
m_sSomeString( "" )
{
//{{AFX_DATA_INIT(FOO)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
Now m_pSomeObject, m_bSomeBoolean, m_iSomeInt, and m_sSomeString are member variables of the class. So, they are being initialized. Is this method of defining a constructor better than doing it this way?
FOO::FOO(CWnd* pParent /*=NULL*/)
: CDialog(FOO::IDD, pParent)
{
//{{AFX_DATA_INIT(FOO)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_pSomeObject = NULL;
m_bSomeBoolean = false;
m_iSomeInt = 0;
m_sSomeString = "";
}
It is not importaint that it be a dialog class, this is just where I am seeing it used. I am just wondering what the advantages of one over the other are, or if there are advantages?
Thanks,
Troy
|
|
|
|
|
It is better to use the contructor syntax.
1. It is the only way to initialize reference member variables in your class. If you have any.
2. Let's say you have an object that has two contructors defined as
class A
{
public:
A()
{
DoSomeStuff();
}
A(int x)
{
DoSomeStuff(x);
}
A& operator = (int x)
{
Cleanup();
DoSomeStuff(x);
}
};
Now lets say you want to contain an object of this class in another class.
class B
{
private:
A a;
};
You can initialize in two ways
B::B()
: a(5)
{
}
or
B::B()
{
a = 5;
}
If you are not initializing the object in the constructor initialization list like that in the second case. The object will be initialized using the default constructor i.e. DoSomeStuff will be called and then when the contrsuctor code within the block gets processed the assignment operator will be called. In the first case only the constructor of A that takes int argument gets called.
|
|
|
|
|
It was not clear to me. So, is it better to do it this way?
Rama Krishna Vavilala wrote:
<br />
B::B()<br />
: a(5)<br />
{<br />
}
Or this way?
Rama Krishna Vavilala wrote:
<br />
B::B()<br />
{<br />
a = 5;<br />
}
Which one is "Constructor Syntax"?
|
|
|
|
|
The former is the proper way to do it (that's called a constructor initialization list).
Regards,
Nish
|
|
|
|
|
I think I am seeing this now. The one question I have is does the constructor initialization list buy you anything for primitive data types? It seems a waste for that and they would be better to initialize in the body of a constructor or in an initialization member function.
|
|
|
|