|
I have a shortcut on the Desktop pointing to this directory. It maybe the problem will give it a go. thanks very much.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
I create by ATL dll file for delphi .
out of dll file I have to provide files as .def or .lib etc ?
|
|
|
|
|
You need to provide the type library (.tlb). Delphi can import this.
|
|
|
|
|
I need provide dll for delphi another languages .
I maked extension DLL and it is not work in another languages .
Can I make a regular dll that import in own the extention DLL
and provide the last dll(that use in the first dll) ?
Please help !!!!!
:rolleyes
|
|
|
|
|
How can this circular linked list coding be implemented to be a linked list ?
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
class Cell {
int info;
Cell *next;
Cell (int i)
{
info =i; next=this;
}
Cell( int i, Cell * n)
{
info=i;next=n;
}
friend class List;
};
class List {
Cell * rear;
public :
void put (int);
void push(int);
int pop();
int empty() {return rear==rear->next;}
List() {rear=new cell (0);}
~List() { while (!empty() ) pop (); }
};
|
|
|
|
|
Whoah!!! It's a bad idea to write your own collection classes in 99% of cases - just use STL's vector<int&rt; or list<int&rt;. Also, when the list is empty the rear pointer should be NULL because there would be no items in the list. If the rear pointer contained a valid pointer and it's next value pointed to itself then there would be one item in the list. Thus, a correct implementation would have the constructor set the rear pointer to NULL, the empty function would return (rear == NULL); and the put, push and pop would have to be modified to identify the special case of having an empty list.
Hope that's helpful. If you really need to do your own list then let me know and I'll try and give you some pointers (no pun intended ). Here are the basic charcteristics:
- have a pointer to the first or last item in the list
- each node has a pointer to the next (or previous), or both next and previous item in the case of a doubly linked list
- the first node's pPrev pointer is always NULL
- the final node's pNext pointer is always NULL
--
Andrew.
|
|
|
|
|
I'd venture a guess that he's stuck on an assignment. Why else would you write your own list ?
Having said that I have no problem helping him, he's obviously had a go at it and is asking for help from there.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
??
Just looking for a simple solution, but I haven't found one. Any ideas. I just want to separate the rows with a thin horizontal line.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
If you need to have gridlines in a CListBox, you will have to draw them yourself. There's a whole section here on owner drawn listboxes, it's not hard.
However, if you can use a CListCtrl class, you can get gridlines free, just by setting the LVS_EX_GRIDLINES extended style. Nice, eh?
|
|
|
|
|
I'm trying to throw some text at a window, such as sending "Hello" to an open Notepad window.. and I'm guessing I should use the SendInput() function. Can anyone give me a simple example of how to use this function, because I can't get anywhere with it... thanks.
|
|
|
|
|
|
I am having problems with my owner-drawn toolbar. I am programming in Win32 so, no MFC code can fix this problem.
I need to be able to get rid of the default highlight of items that have the TBSTATE_MARKED state and in the MSDN library tells me that when the dwDrawStage of the custom draw is at CDDS_ITEMPREPAINT, I should return the TBCDRF_NOMARK value but the problem is that the dwDrawStage is NEVER CDDS_ITEMPREPAINT. It is only ever CDDS_PREPAINT. Can anyone get this to work? Do I need to set each of the toolbar buttons to TBSTYLE_CUSTOMDRAW as well?
Thanks in advance,
James Bird - birdjames@bigfoot.com
|
|
|
|
|
In the prepaint stage, you need to return CDRF_NOTIFYITEMDRAW to get custom draw messages for each button.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
I run english version of windows 2000 Pro and the input locales is set to norwegian as default.
When I run sysprep and gosted the pc's and the minisetup is finished, the input language is set back to english and I must change it back to norwegian on all the computers in the classroom again.
Here is the case.
Can someone write a script that changes the input language to norwegian that I can put into the "Run once" section in the sysprep.inf file.
Please mail me: koklo@klotech.com
Thanx
Knut Olav Klo
Norway
|
|
|
|
|
Is there a version of Windows localized in Norwegian? Things might not be as simple as just going out and then rolling that out for your people, but then again if there is a Norwegian windows that might do the trick.
Sincerely Yours,
Brian Hart
"And that's the news from Lake Wobegon, where all the women are strong, the men are good-looking, and the children are above-average." - Garrison Keillor
|
|
|
|
|
Hi,
I'm trying to track down some GDi leakage in my application and think i may be using hIcon incorrectly.
At what point does a hIcon resource get released ? I have a dialog which sets ups some icon buttons during OnInitDialog() like this :
[b]
HICON hIcon;
hIcon = (HICON)LoadImage(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON_STOP), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
m_BtnStop.SetIcon(hIcon);
hIcon = (HICON)LoadImage(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON_REWIND), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
m_BtnRewind.SetIcon(hIcon);
hIcon = (HICON)LoadImage(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON_FORWARD), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE);
m_BtnForward.SetIcon(hIcon);
hIcon = (HICON)LoadImage(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDR_MAINFRAME), IMAGE_ICON, 16, 16, LR_DEFAULTSIZE);
m_BtnPanel.SetIcon(hIcon);
[/b]
Question 1.
-----------
When this function is run over and over (dialog is destroyed then reopened), am i leaking icon resources ? I suspect that i need to have a HICON for each of the buttons, and in the dialogs destructor (or some other function - please tell me which) i need to DestroyIcon(). Is this correct ?
Question 2.
-----------
I guess this is really answered by question 1, but if i change the icon for a button dynamically (i.e. depending upon the state of my app, the button uses different icons), should i use DestroyIcon() before using SetIcon() with new icon definition ?
Any other tips you can give me regarding icons ? Also, is there a tool i can use to see GDI resources so i can see if they're leaking ?
Jase
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows
Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com
|
|
|
|
|
1. Yes you do have to call DestroyIcon()
2. that depends, if you are going to reuse the icon, keep it around until your dialog is destroyed, that way you don't have to constantly reload it. If you are finished with it then call DestroyIcon().
As for monitoring resource leaks, I use Windows Resource meter (RSRCMTR.EXE on Win98 - I assume other versions of windows have the program (or something similar), there may be better programs around, but I have this one).
---
Blessed are those who can laugh at themselves, for they shall never cease to be amused
|
|
|
|
|
Thanks for your reply.
Would you suggest loading my icon resource in OnCreate and destrying them in OnDestroy() then ? Those are my current thought on this based on your reply.
Thanks also for telling me aboutr RSRCMTR.EXE . I didn't know I had this program!
Jase
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows
Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com
|
|
|
|
|
Can you give me any advice on tracking GDI resource leaks ? My application leaks quite badly! I have dealt with the HICON issue now, creating in OnCreate and destroying in OnDestroy(). I was also using a class called CSXButton which leaks pretty badly too, so i've removed all traces of that and am now using just a CButton with icons. I also did use some text drawing functions on a splash screen which had leaks, but i resolved that by freeing my CFonts before changing them and started to use dc.save and dc.restore. I don't believe i am using any other gdi functions, but i am using several control classes sourced from codeguru and from here that may be leaking. How can i trace the source of the leak ? Please don't suggest a third party product that i have to pay for ... i want to become familar with some methods to track these problems myself.
Jase
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows
Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com
|
|
|
|
|
It is easy to forget (I forget quite often ), but you just have to make sure that everytime you load or create a resource you delete it when you are finished with it. If you look in MSDN at the functions that load/create a resource, there will be info on the function that is needed to delete it.
for example, if you load a cursor with the ::LoadImage() function, you have to remove it with the ::DestroyCursor() function.
The way I find leaks is to read the source code, and lots of trial and error, sorry I don't have a quick fix for you, but c'ést la vie.
---
Blessed are those who can laugh at themselves, for they shall never cease to be amused
|
|
|
|
|
Well, as the other guy mentioned, you always need to free everything you allocate. So, tracking resource usage at its simplest is mental; remember all the resources loaded by a class & make sure they're released before the class is destroyed, either by an OnDestroy() message handler (for a window class) or by the class destructor. If you've a lot of resources to keep track of, consider creating a separate manager class to deal with allocating and releasing them.
And now, i'm going to contradict myself ... Looking at the example given in your original post, one easy solution suggests itself: use the LR_SHARED option in your call to LoadImage(). Unless you have multiple resources with the same ID, this will allow you to put the responsibility of managing these icons back on Windows. No need to free them, no need to worry about loading the same resource multiple times.
As for more advanced tools... I guess if you're using Win2000, you could watch the USER objects / GDI objects columns in the task manager over time... If you change your mind on commercial products, i'll recommend the one i use from time to time.
|
|
|
|
|
Hi,
Thanks for your reply. So tell me then, which commercial product do you use and is there an evaluation version ?
Jase
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows
Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com
|
|
|
|
|
NuMega BoundsChecker; http://www.numega.com
They do provide an evaluation version, though not as a direct download. Definately worth a try, as is their TrueTime profiling app.
|
|
|
|
|
Hi
I need to write a dll in VC++6 that can be used in delphi
What kind of dll should I use?
regards
|
|
|
|
|
It must be a regular DLL (it cannot be an extension DLL).
You *can* use MFC in the DLL as long as you don't try to export any MFC classes. It may also be a good idea to choose to link MFC statically.
You must provide export functions, and I think you may even need a def file but I'm not sure on that.
The best way to find out what you need (beyond the requirement to be a regular DLL), is to write a small DLL with one exported function, and make that work first.
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|