|
David,
the "problem" is indicated by mouse pointer changes from howering over "C" to "OM1:" and than there is no event. The actual processing is fine.
And it does it only on first "COM1:" and last "COM5:" lines.
The "COM2:" thru "COM4:" it works on the entire text.
Richard,
just confirmed that in plain dialog app I can select the CEdit box using mouse.
I guess in my spare time I'll kluge some workaround. Perhaps real subclassing will work.
Vaclav
|
|
|
|
|
Sorry. I misinterpreted this:
I can select the first and last COM port with mouse pointing to letter "C" only.
What styles does your list control have?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
modified 22-Aug-13 11:28am.
|
|
|
|
|
David, it's the little details which will get you each and every time. Ha ha.
Have a great day.
Vaclav
|
|
|
|
|
I just added a list control to a dialog, changed its style to report, and added the following code:
m_list.SetExtendedStyle(LVS_EX_TRACKSELECT);
m_list.InsertColumn(0, _T("COM port"), LVCFMT_LEFT, 100);
m_list.InsertItem(0, _T("COM1:"));
m_list.InsertItem(1, _T("COM2:"));
m_list.InsertItem(2, _T("COM3:"));
m_list.InsertItem(3, _T("COM4:"));
m_list.InsertItem(4, _T("COM5:")); Now, no matter where the mouse hovers over any of the five items, that item will be selected after about 0.5 seconds.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
David,
same problem. Only works when then mouse is over "C" in first line.
I really believe it has something to do with CPropertPage.
But I like the tracking better than clicking.
Now if I could apply that to CEdit I'll be a happy camper.
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: same problem. Even on a dialog box?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
David,
I am bad in multitasking, so I am trying to keep the CEdit problem separate.
I have not tried to implement your tracking method on the CEdit.
I got too many fires going same time. I'll keep you posted on this one.
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: And it does it only on first "COM1:" and last "COM5:" lines. The "COM2:" thru "COM4:" it works on the entire text. That is just bizarre!
If it was not for that piece of information, I was going to suggest it might have something to do with the width of the column set really narrow and the rest of the text for some reason being written outside of the column - I believe I have seen something like that before, but what you describe here is just weird.
Sorten Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
I just put over 30 random characters in the item column and the problem is really on the first and last line. ONLY when the mouse is over the first character in the field it will get selected.
I give up.
Cheers
Vaclav
|
|
|
|
|
Here is a crazy update.
Now I cannot even select by "howering " over the first letter! But I can change / edit the item by moving the mouse to the left until I get "regular" focus. I deffinetly have an issue with my VC 6.0.
Case closed.
|
|
|
|
|
Question has been solved
Thanks everyone for those comments it helped me a lot, I am considering users here asthe most amazing users ever!
oky I have a list view (using MDI also) and I am drawing everything from scratch, everything works amazingly, but recently when i tried to print tons of data, i the list went crazy, and it seems the whole app went crazy not just the listview, I tried to disable all the features in my app and that bug still there
basically the program has a highlight row and that row in blue, that bug changes it to another color, and i cannot use the editing text method and when I minimize the list, it does not come back, as if the whole program got busted?
bty, its not form custom draw cuz i did check every single line...
http://oi43.tinypic.com/25zibrl.jpg[^]
what made it weird that even the menu went black? i am sure that if it a listview problem it wont change the menu color?? is the listview has a specific stack size or heap size in onwerdata? i dunno what i am saying but the list works fine in some cases except when i deal with more data,
any ideas why that happens?
edit1:
I tried update the whole list with the whole program and nothing happened (if it paints issues redrawing the whole app will help but did not work here?)
edit2:
some has almost same problem and he wrote (I am using a CListView in my application. When I run the application and it gets a lot of items in it's CListView (3 or 4 thousand at least) the application's windows go all stange. From then after all Menus in all applications (including taskbar and desktop menus) are displayed with black bars over most of their items, moving the mouse down over them removes most of the black bars.
Thanks for any help.)
but no one answered him?
modified 21-Aug-13 17:27pm.
|
|
|
|
|
Hi,
I'm not certain if this is the problem but you say that the problem started when you wanted to show a lots of data, you also mentioned that you draw the list yourself. (Custom draw)
It could be that you are running out of resources, GDI resources to be precises, this could explain why even other part of the application are getting problems drawing themselfes.
Its a wild guess, but its worth to check this. (this can be verified quickly with the task manager)
regards
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
i did not even think about that?!!! the thing is as soon as my program rich 10000 objects then that bug appears so, and if i am not wrong i remember that win7 it's 10000 as default so, by increasing that it will fix it 100%, which can be done from the registry
thanks I really appreciate that, and i do like this site better than stackoverflow, since they think that they are the best and as soon as you ask question they consider you as a jerk (down vote)
anyway thanks a lot....
|
|
|
|
|
The only thing I can think of to check right now is GDI leaks.
When the system runs out of resources, all kinds of system-wide funkiness may be enjoyed.
Have you checked for them? If not, you can view them in the task-manager.
View->Select Columns->GDI Objects
If this number is not steady - i.e it increases, you've got a leak.
More info: here[^] and here[^].
"Science adjusts its views based on what's observed. Faith is the denial of observation, so that belief can be preserved." - Tim Minchin
|
|
|
|
|
Thanks A lot I did that...
|
|
|
|
|
|
I will check that Out,
thanks for those links
|
|
|
|
|
I think you must see something like this, for Cpp,
Virtual Mode ListView[^]
because, if you have 10000000 items, you can´t load all of them,
hope this helps,
Carlos
|
|
|
|
|
I am having a problem grasping the constructor initialization in MFC property sheet.
Original page definition with initialization
CMyPropertyPage11::CMyPropertyPage11() : CPropertyPage(CMyPropertyPage11::IDD)
Original declaration
class CMyPropertyPage11 : public CPropertyPage
New common BasePropertyPAge class for all CmyPropertyPagexx , inherited from CPropertyPage.
I need to have all CmyPropertyPagexx classes access to same class instance initialized in BasePropertyPage.
class CMyPropertyPage11 : public CBasePropertyPage
The inheritance hierarchy is now
CMyPropertyPagexx
CBasePropertyPage
CPropertyPage
Since CBasePropertyPage also inherits from CPropertyPage I need to apply virtual inheritance and should be able to figure that out myself.
<b><b></b>Mye main question - how do I initialize the CmyPropertyPage11?</b>
CMyPropertyPage11::CMyPropertyPage11() : ??
Thanks for you help.
Cheers
Vaclav
-- modified 22-Aug-13 13:11pm.
|
|
|
|
|
There are at least 3 ways you can handle this. Which way you choose depends on what you need.
If you only need one resource, you assign it to CBasePropertyPage. In this case you take CBasePropertyPage::IDD and pass it to CPropertyPage. For CMyPropertyPage11 you don't need an initializer in that case. You can use the controlls on the page directly.
If every derived property page class needs its own resource you need to decide whether you really want/need to derive CBasePropertyPage from CPropertyPage.
If you don't need access to the GUI from that class it will probably be easier to just define it as stand alone and derive your property pages from CPropertyPage and CBasePropertyPage. This way you can keep your original initialization.
If for some reason you need to have property page funtionality directly in CBasePropertyPage, you need to change CBasePropertyPage's constuctor to take an UINT. Then you initialize like that:
CMyPropertyPage11::CMyPropertyPage11() : CBasePropertyPage(CMyPropertyPage11::IDD)
{
}
CBasePropertyPage::CBasePropertyPage(UINT idd) : CPropertyPage(idd)
{
}
To access the controls on the page from CBasePropertyPage you need pure virtual functions that you override in the derived class(es).
The good thing about pessimism is, that you are always either right or pleasently surprised.
|
|
|
|
|
Thanks,
I am still little confused, but I'll sleep on it.
I am sure my terminology was not too clear.
So in reality each ProperyPage ( dialog) adds a filter to a graph - DirectShow API's , hence the graph is common to all.
Thanks again for your help, appreciate it.
Vaclav
|
|
|
|
|
Got it (partially) working, actually thought making the "common " class "stand alone" but forgot about that.I do subscribe to KISS!
Now for the real stupid question - what is the syntax to access the common, base class?
Never mind, idiot forgot to delete the original instance of the common class!! Works great.
I have done very little inheritance , in MFC, and I am totally lost. But I'll hit the books.
Thanks again, you guys are big help for me.
Vaclav
-- modified 22-Aug-13 13:09pm.
|
|
|
|
|
The easy way to accomplish this is to use the PropertySheet and initialize the common class in there.
-- modified 24-Aug-13 22:38pm.
|
|
|
|
|
I currently have the following code -
gluLookAtf(player.position.getX(),player.position.getY() + 15,player.position.getZ() + 20,
player.position.getX() ,player.position.getY(),player.position.getZ() ,
0.0, 1.0, 0.0);
How can I make the player and the camera rotate together?
|
|
|
|
|
By keeping the position/rotation of your camera tied to that of your player with fixed delta rotation/movement maybe with some attenuation on some of the components of the world position of the camera if the movement of the player is ugly. Its a different story how to use this camera position/rotation in the renderer but that should be trivial if you have some basic knowledge in the area. You have just grabbed out an opengl call from somewhere, noone will be able to tell what is wrong in your code but it can be anything based on the kind of this question. Considering that you are mixing the update of your object positions with renderer code your software design isn't good for sure.
Your game code should look like the following:
- a set/graph of object that describe the state of your game at any given time. This can be for example a set of world object with position/rotation values and attributes like "dead", "visible".
- an infinite loop that does the following:
* updates the state of your game objects (for example by stepping their position/rotation using physics simulation, you have to update the state of dependent objects (like your camera) only after its dependency objects (player) are updated.
* OPTIONALLY render the state of your game (the world objects/entities with their position and other state variables) and draw the "hud"/score and other info on the screen as the result of rendering the state of your "game rules" object. Here you setup your renderer camera based on the world position/rotation of your camera object in your game state data that has already been updated based on its dependency object: the player object.
Note that your game should work even without calling the global "render" function in your game, the game should work without a renderer just by printing out the state of your objects to the console at any time if your game code design is good!
So what is the problem?
modified 21-Aug-13 16:03pm.
|
|
|
|