|
With one of my applications using property sheets, I discovered that you cannot update page fields unless the property page is visible - just update the information and then update the form in OnShowWindow(). Also, you cannot have an active timer for a property page that is not visible. In both cases, if the property page is not visible, the window handle is not valid and all sorts of unusual behavior happens.
Steve
|
|
|
|
|
SOCKADDR_IN tempaddr;
tempaddr.sin_addr = INADDR_ANY;
I have seen code like this in many examples. I am not quite sure why the compiler would tell me that:
error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'unsigned long' (or there is no acceptable conversion)
I would have never gotten as far as I did with this program without all of your help.
Thank you
|
|
|
|
|
The compiler is telling you that, there is a type mismatch. The "sin_addr" is a structure. Read the MSDN about it. (In my humble opinion: you got to dig deeper in programming )
Try this @ home. (B&B)
|
|
|
|
|
Try this:
tempaddr.sin_addr.s_addr = INADDR_ANY;
In your example, you are trying to assign a single value to a structure.
Steve
|
|
|
|
|
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?
|
|
|
|