|
Can any one help me? Please...
|
|
|
|
|
Hi,
I am having problem retriving system device icons, i know there is a function in ddk that allows you to do just that, however i am not sure if i am using it correctly. Can anyone check what is wrong with the function below thanks... or can anyone suggest any other ways of retriving system device icons.. thanks....
int DeviceView::GetClassImage(HIMAGELIST& imagelist)
{
_SP_CLASSIMAGELIST_DATA *classlist = new _SP_CLASSIMAGELIST_DATA;
classlist->cbSize = (BYTE)sizeof(PSP_CLASSIMAGELIST_DATA);
if (!SetupDiGetClassImageList(classlist))
{
return false;
}
imagelist = classlist->ImageList;
delete classlist;
return true;
}
|
|
|
|
|
classlist->cbSize = sizeof(_SP_CLASSIMAGELIST_DATA);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Is there anyway to list 10 recently access files(MRU)
instead of 4?
Thanks
Shin
|
|
|
|
|
Call this function from within the InitInstance member:
LoadStdProfileSettings(10);
where 10 is the nr. of most recently used (MRU) files.
bye,
CC.
|
|
|
|
|
I didn't know it was so easy.
Thanks for your help.
Shin
|
|
|
|
|
Friends,
I want to initiate a dialog box from parent window. But i want to initiate this dialog just like a "child window" and not a dialog.
I mean, that there are two types of dialogs, modal and modeless. Modal dialogs bolcks the parent window, so i don't want my dialog to be modal. So i create modeless dialog. But the problem is that modeless dialog is also tightly coupled with parent window and when i minimize parent window, the modeless dialog also gets minimized.
I want the dialog to be completely "independent" from its parent window. How can i do so ??
|
|
|
|
|
If you create the dialog so it has no parent (i.e parent = NULL), it shouldn't tie itself to the parent window (because there isn't one)
Phil
|
|
|
|
|
Not true...from the MFC CDialog class docs for Create()...
For either form, pass a pointer to the parent window object. If pParentWnd is NULL, the dialog box will be created with its parent or owner window set to the main application window.<br />
Steve
|
|
|
|
|
My bad. Goes to show how much I've used MFC lately.
Perhaps a call to SetParent or SetOwner after creation may help?
|
|
|
|
|
Hi, just the part of a program that doesn't work, this is the part that is causing trouble. I tried to compile in VC++, Thanks:
#include <stdio.h>
#include <stdlib.h>
struct listNode {
char data;
struct listNode *nextPtr;
};
typedef struct listNode LISTNODE;
typedef LISTNODE *LISTNODEPTR;
main(){
LISTNODEPTR newPtr;
//I get an error here!!!
newPtr = malloc(sizeof(LISTNODE));
return 0;
}
|
|
|
|
|
To much time lost:
newPtr = (POINTNODE *) malloc( sizeof(POINTNODE) );
|
|
|
|
|
That too.
If your nose runs and your feet smell, then you're built upside down.
|
|
|
|
|
Your sig is offensive to people with runny noses and smelly feet and you might want to consider changing it
|
|
|
|
|
Your includes at the top got cut off, probably because it interpreted < and > as HTML (hint: use < and > for angle brackets)
I suspect you don't have the right file included for malloc . You need to include stdlib.h and malloc.h.
Note: if your program is C++, though, you can use new instead of malloc and it is much easier. e.g.,
newPtr = new LISTNODE;
If your nose runs and your feet smell, then you're built upside down.
|
|
|
|
|
How are you going to free the memory from malloc?
Thank You
Bo Hunter
|
|
|
|
|
You use the free command:
void free(void *p)
where p is the pointer to memory you have allocated with malloc
|
|
|
|
|
Yea I know that is what I am asking.
Where is the void* member to free?
free( p ) takes void* and it has to
be memory that was alotted with malloc.
Or am I wrong.
Just an observation.
Thank You
Bo Hunter
|
|
|
|
|
hello,
i want to know how can i get all of the IP in my local network . i say that others 's IP and COMPUTER NAME ,I want to get . I get some code ,but they don't work well,there are some errors .
waiting your help!
thanks
|
|
|
|
|
think about the reason why no1 is answering...
Don't try it, just do it!
|
|
|
|
|
Hellin wrote:
I get some code ,but they don't work well,there are some errors .
And those errors would be???
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Is this accomplished by calling a function with the amount of space I want between lines or do I have to individually output lines to get the desired effect?
Thanks
I'm drinking triples, seeing double and acting single
|
|
|
|
|
I had a suspicion there was a font setting in the LOGFONT struct, but I was wrong. You're going to
have to bite the bullet and use DrawText (...., DT_CALCRECT, DT_NOWRAP(?) ) etc. to do the lines
individually.
Iain.
|
|
|
|
|
How take pathes to a few files at the same time, using CFileDialog??
|
|
|
|
|