I'm slowly teaching myself Visual C++, and generally doing okay. I've come across a stumbling block though.
I'm working with an SDK that requires a non-disclosure agreement, so I can't paste code fully here sorry. Here's a bit of a mockup of my problem though.
I'm not really sure what you're trying to do, but it may be an ambiguity between ::doThatThing() and programApp::doThatThing() so you may have to explicitly declare the parameter as either ::doThatThing() or programApp::doThatThing() depending on where it is called.
I have seen at least one commercial product (VisualTest) that has a horizontal splitter window with a title. That is, the top gripper bar is wider than normal, and has text in it that describes the contents of the window below. A screen shot is available at:
I can sort of simulate that if the window contains a ListView by setting the ListCtrl to REPORT style and adding one column heading with the text, but that leaves you with that annoying column sizing thing in the header, which I find unaesthetic. Further, you're out of luck entirely if the window contains a TreeCtrl--and the window I'm making does.
I have tried every solutuion I can think of, including attaching a custom CHeaderCtrl, but nothing seems to work.
Thanks, I had tried that too but have the exact same problem!
I should prob add that it works ok with text in define in the code but not with text I read from an edit box...
Really don't understand what I'm doing wrong???
Actually I've only just realised that only the first digit is being converted. I.e. if I enter 2.3 I get 2.00 but if I enter 14.6 I get 1.00.
I must do something really wrong somewhere but I can't see where!
Thanks for your help!
Something's definitely amiss here. If you don't make the call to GetDlgItemText but, instead, just set txtEdit to "2.334" (for example), boxval ends up being 2.334 (or whatever you ste in txtEdit). This works just fine...tested it m'self, I did.
So something's not right, and it's definitely something to do with the conditions under which GetDlgItemText is called. Maybe you're only responding to single keystrokes in the edit box, I'm not sure.
Some things to try testing:
* GetDlgItemText returns the number of characters copied. Store this returned value to an int and make sure it's returning the right number of characters.
* sscanf returns the number of arguments extracted from the string. So if your sscanf() isn't returning '1', then something's wrong.
Last Visit: 31-Dec-99 19:00 Last Update: 24-Feb-21 22:47