|
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??
|
|
|
|
|
|
|
How can i access and change a symbol in a CString variable??
|
|
|
|
|
CString overloads the array access operator [], so you can access it and modify characters as if it were just a character array.
e.g.
CString sTmp( _T("abcdefgh") );
TCHAR ch = sTmp[1]; // ch = 'b'
sTmp[4] = 'q'; // sTmp is now "abcdqfgh"
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
|
Hi guys,
I am a beginner coder, and I would like to gain some experience with Visual C++. I have been coding for a while in C++, and C, and now I would like to have a small project to work on. Something for a beginner, that is an easy to tackle problem, but smthg that will get me experience...Yeah! I am in desperate need of getting experience...do you happen to know of a project that you might have done, or a website where I can find such small project ideas?!
Thanks a lot, and hope to hear from you!
|
|
|
|
|
a lot of schools post computer project assignments for their students to complete online...mine does.
http://www.cse.msu.edu/~cse231/Projects/
thats the url of the beginning c++ course's project assignments at my school.
*.*
cin >> knowledge;
|
|
|
|
|
Hi,
I have trouble with variable where used in thread function. I defined thread function such as;
UINT Processor(LPVOID lpParameter)
{
.
.
.
return ulCOMObjReturnValue;
}
STDMETHODIMP COLAP::GetState(long SystemID)
{
.
.
.
DWORD ulExitCode;
bThreadState = ::GetExitCodeThread(pQueue->hThread, &ulExitCode);
return ulExitCode; // Set return value
}
pQueue->hThread has thread id, but GetExitCodeThread() function can not return right value except debugging.
Thank you for your responses.
|
|
|
|
|
return (DWORD)n; try this
|
|
|
|