|
look for sapi in the internet and download the latest sdk from microsoft...
there are samples from Microsoft in the sdk too...
it seems that sapi 5 is not well documented as sapi 4...
Hope this helps...
PS:
I've tried to handle those things, but as I don't wand to use english (and I have no time to test it) I have not been able to get it to work... (by now...)
|
|
|
|
|
Hi,
i'm implementing a splitted frame window with a CListView on the top part of the window and a CFormView on the bottom. When i click on an item of the list in the form i want to visualize the informations of that element (some kind of Master/Detail logic).
The problem is that when i focus in the form the selection in the CListView disappeared. If i re-focus the list the selection appears again. There's a solution to prevent this disappear?
Thanks
|
|
|
|
|
Use the LVS_SHOWSELALWAYS style.
|
|
|
|
|
Thanks, i didnt found it on MSDN ( ), thanks again
|
|
|
|
|
It's right there with the other list view styles:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/listview/styles.asp
|
|
|
|
|
Anybody Knows about Virtual Display Driver? For what purpose it is? Plz forwared me if any related links/articles are there.
vikram
|
|
|
|
|
i made a toolbar using this command: hToolBar = CreateToolbarEx(hToolBar, WS_CHILD|WS_BORDER|WS_VISIBLE, 2, 123, hInstance, IDR_TOOLBAR1, array, 8, 87, 33, 87, 33, sizeof(TBBUTTON));
it shows but when i resize the window the toolbar doesnt resize accordingly. i tried to make it update using: SendMessage(hToolBar, TB_AUTOSIZE, wParam, lParam);
and
SendMessage(hToolBar, WM_SIZE, wParam, lParam);
but it doesnt work. What should i do to make it update?
|
|
|
|
|
Hi,
have you tried SetWindowPlacement, instead of sending a WM_SIZE message instaed?
G. Steudtel
|
|
|
|
|
I have a listctrl where i can set any row to use a new font, the main problem i had was that on changing the font the rows/columns would not resize correctly to take account of the new text extents.
After searching on this site and then looking on MSDN, i now send a CCM_SETVERSION 5 message to the listctrl before i add any items.
This now makes the column widths resize correctly, but the row heights are still wrong.
I've spent many hours trying to find a way to fix this but have made no progress.
Hoping you can give me some ideas.
BTW it's a NW_CUSTOMDRAW listctrl not an ownerdraw.
ScorpioMidget
|
|
|
|
|
If you can't get it to work, create an imagelist without images and then assing that imagelist to your listctrl, the rows will have the Images height...
I suppose that you will be able to readapt the heights as you want using this trick...
Hope this helps...
|
|
|
|
|
Hi,
I'm trying to make some MultiThreaded OpenGL code work in release mode.
Normaly it just comes up as a grey screen in release but works fine in debug.
I've eliminated it being an Optimisation error and have managed to recreate the error in Debug mode by adding NDEBUG instead of _DEBUG.
Before I start delving into this properly I was wondering if anyone has had the same problem, re: OpenGL.
Cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
How to limit number if instances of an application in VC++.
Thanks in advance
Kamesh
|
|
|
|
|
|
In addition to the Naughter article, here is another resource:
http://flounder.com/nomultiples.htm
|
|
|
|
|
Are you trying to limit to only one instance or do you want to limit to some other number?
John
|
|
|
|
|
I would like to run only one instance of my application at anytime.
With Thanks & Regards
--Kamesh
|
|
|
|
|
|
the problem I have is this:
I have a superclass called Figure, then 2 inherited classes from this: Circle and Rectangle. Circle have a variable called Radius and Rectangle 2 variables called Length and Height. all this variables are public.
if I declare an array of pointers like this:
Figure *obj[100];
and then I put in a loop for example:
obj[i] = new Circle;
How can I access to the variable Radius from this array?
for example: obj[i]->radius
it seems like the compiler doesn´t know then that obj[i] is a Circle, it just knows it´s a Figure.
Hope you can help me, thanks in advance!
|
|
|
|
|
This is what dynamic_cast was invented for:
Circle* pC=dynamic_cast<Circle *>(obj[i]);
if(pC!=0){
}
else{
...
} For dynamic_cast to work, it is necessary that Figure has at least one virtual member function. If there is none so far, make the destructor virtual, which is probably a good idea anyway:
class Figure
{
...
virtual ~Figure(){}
}; Good luck. To know more about dynamic casting, take a look at (for instance) Marshall Cline's excellent C++ FAQ Lite[^].
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
while dynamic_cast is proper C++ option, many windows programmers prefer not to use it for performance reasons (you have to compile with RTTI etc.)
To solve your problem you might use virtual functions
class Figure
{
...
virtual int Radius() const {return 0;}
...
};
class Circle : public Figure
{
...
virtual int Radius() const {return m_radius;}
...
};
class Rectangle: public Figure
{
... //no changes
};
|
|
|
|
|
I think that an object of a derived class can be referenced by a pointer to the parent class, in which case instead of writing
obj[i] = new Circle;
you should write
obj[i] = (Figure *)new Circle;
This makes the obj array hold pointers to Figure, and both Circle and Rectangle can be referenced.
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
The old-fashioned way (not typesafe, but no performance hit) is to typecast the code this as:
int x = ((Circle *)obj[i])->radius;
|
|
|
|
|
a user about my freeware program:
"After performing any calculation, and then after closing DeskCalc SE it locks out the computer from opening up any other program, including DeskCalc SE. If I just open DeskCalc SE, and then close it without performing any calculations it causes no problems. Only when I perform calculations does it prevent me from opening any further programs, including DeskCalc SE. A reboot is the only way to solve this problem."
well this has happend now a few times with win98/2000/XP, and i cant simulate it on
my computers. i spend many hours to find the problem, but i'am giving up now, maybe sombody of you can help me with this strange problem.
|
|
|
|
|
Threads not being terminated ? A Hook which hooks too much ?
~RaGE();
|
|
|
|
|
i use no threads in this program, but i use keyboard hooks, is it possible that key_events can couse this problems. cause one user told me that if he has this problem and is pressing "ESC" afterwards the problem is solved ?
|
|
|
|