Click here to Skip to main content
15,942,847 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questiontimer does not start Pin
etechX226-Jun-24 20:20
etechX226-Jun-24 20:20 
AnswerRe: timer does not start Pin
Victor Nijegorodov26-Jun-24 22:12
Victor Nijegorodov26-Jun-24 22:12 
GeneralRe: timer does not start Pin
etechX227-Jun-24 18:57
etechX227-Jun-24 18:57 
AnswerRe: timer does not start Pin
Richard Andrew x643-Jul-24 9:13
professionalRichard Andrew x643-Jul-24 9:13 
GeneralRe: timer does not start Pin
etechX25-Jul-24 16:01
etechX25-Jul-24 16:01 
GeneralRe: timer does not start Pin
jeron16-Jul-24 9:04
jeron16-Jul-24 9:04 
GeneralRe: timer does not start Pin
Richard Andrew x646-Jul-24 9:48
professionalRichard Andrew x646-Jul-24 9:48 
QuestionAfxRegisterWndClass crashes when called again Pin
etechX212-Jun-24 20:07
etechX212-Jun-24 20:07 
Hi,

In my MFC project, I get crash as follows:

1. i call MyCreate() then MyUnCreate()
2. calling MyCreate() the second time, causes crash at AfxRegisterWndClass below.

sudo code provided:

CMyCwndSub is derived from CWnd.

in another file:

CMyCwndSub *p;

C++
void MyCreate()
{
    //in here code looks for Window with title "MyWndWin".

	p->new CMyCwndSub;
	CString m = AfxRegisterWndClass(0);       //crashes in this line the 2nd time called.
	p->CreateEx(0, m, -T"MyWndWin",0,0,0,0,0,NULL,0);
	
	.
	.
	.
}


C++
void MyUnCreate()
{
delete p;
p = NULL;
}

AnswerRe: AfxRegisterWndClass crashes when called again Pin
Victor Nijegorodov12-Jun-24 20:24
Victor Nijegorodov12-Jun-24 20:24 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
etechX212-Jun-24 21:58
etechX212-Jun-24 21:58 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
Victor Nijegorodov13-Jun-24 5:17
Victor Nijegorodov13-Jun-24 5:17 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
etechX213-Jun-24 18:40
etechX213-Jun-24 18:40 
GeneralRe: AfxRegisterWndClass crashes when called again Pin
Victor Nijegorodov13-Jun-24 19:59
Victor Nijegorodov13-Jun-24 19:59 
QuestionInserting a user defined key in a C++ map Pin
Amrit Agr10-Jun-24 8:23
Amrit Agr10-Jun-24 8:23 
AnswerRe: Inserting a user defined key in a C++ map Pin
Daniel Pfeffer10-Jun-24 8:44
professionalDaniel Pfeffer10-Jun-24 8:44 
QuestionC++, epiphanies, article content ideas Pin
honey the codewitch7-Jun-24 20:28
mvahoney the codewitch7-Jun-24 20:28 
GeneralRe: C++, epiphanies, article content ideas Pin
k50548-Jun-24 2:10
mvek50548-Jun-24 2:10 
GeneralRe: C++, epiphanies, article content ideas Pin
honey the codewitch8-Jun-24 3:40
mvahoney the codewitch8-Jun-24 3:40 
GeneralRe: C++, epiphanies, article content ideas Pin
trønderen8-Jun-24 5:05
trønderen8-Jun-24 5:05 
AnswerRe: C++, epiphanies, article content ideas Pin
jschell12-Jun-24 14:59
jschell12-Jun-24 14:59 
GeneralRe: C++, epiphanies, article content ideas Pin
honey the codewitch12-Jun-24 15:03
mvahoney the codewitch12-Jun-24 15:03 
GeneralRe: C++, epiphanies, article content ideas Pin
jschell13-Jun-24 12:33
jschell13-Jun-24 12:33 
GeneralRe: C++, epiphanies, article content ideas Pin
honey the codewitch13-Jun-24 12:37
mvahoney the codewitch13-Jun-24 12:37 
GeneralRe: C++, epiphanies, article content ideas Pin
jschell14-Jun-24 13:15
jschell14-Jun-24 13:15 
PraiseI never fail to be impressed by this Pin
honey the codewitch7-Jun-24 5:44
mvahoney the codewitch7-Jun-24 5:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.