Click here to Skip to main content
15,917,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CString::Replace Problem Pin
lparsonson5-Jul-07 4:54
lparsonson5-Jul-07 4:54 
QuestionCStatic drawing interrupted... Worker, UI Threads???? Pin
Greg Ellis4-Jul-07 5:41
Greg Ellis4-Jul-07 5:41 
AnswerRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Matthew Faithfull4-Jul-07 6:27
Matthew Faithfull4-Jul-07 6:27 
GeneralRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Greg Ellis4-Jul-07 6:35
Greg Ellis4-Jul-07 6:35 
GeneralRe: CStatic drawing interrupted... Worker, UI Threads???? Pin
Matthew Faithfull4-Jul-07 6:55
Matthew Faithfull4-Jul-07 6:55 
AnswerRe: CStatic drawing interrupted... Worker, UI Threads???? [modified] Pin
Mark Salsbery4-Jul-07 7:08
Mark Salsbery4-Jul-07 7:08 
QuestionOnSize Assertion Error Pin
sdancer754-Jul-07 5:11
sdancer754-Jul-07 5:11 
AnswerRe: OnSize Assertion Error Pin
Arman S.4-Jul-07 5:19
Arman S.4-Jul-07 5:19 
On the first call [or so] to OnSize the child windows have not been created yet. In other words, their HWNDs are not valid. Perheps this is what causes the assertion failure. Try to have smth like so;

CStatic *pStatic;
pStatic= (CStatic*) GetDlgItem(IDC_MYSTATIC);
if (NULL != pStatic)
{
// do anything here
}

In this way you will skip the first time call to OnSize.

In general, using GetDlgItemis not a good idea. Instead, let the wizard define CStatic c_myStatic member-variable. In this case the code will turn into this one;

if (NULL != c_myStatic.GetSafeHwnd())
{
// do anything here
}

--
=====
Arman

GeneralRe: OnSize Assertion Error Pin
sdancer754-Jul-07 22:56
sdancer754-Jul-07 22:56 
AnswerRe: OnSize Assertion Error Pin
Hamid_RT4-Jul-07 19:28
Hamid_RT4-Jul-07 19:28 
Questionneed your suggestion for data expression Pin
includeh104-Jul-07 4:56
includeh104-Jul-07 4:56 
QuestionRe: need your suggestion for data expression Pin
David Crow5-Jul-07 3:25
David Crow5-Jul-07 3:25 
Questionwriting to a port Pin
lovneet4-Jul-07 4:40
lovneet4-Jul-07 4:40 
AnswerRe: writing to a port Pin
CPallini4-Jul-07 4:48
mveCPallini4-Jul-07 4:48 
GeneralRe: writing to a port Pin
lovneet4-Jul-07 6:17
lovneet4-Jul-07 6:17 
GeneralRe: writing to a port Pin
CPallini4-Jul-07 9:07
mveCPallini4-Jul-07 9:07 
AnswerRe: writing to a port Pin
David Crow5-Jul-07 3:27
David Crow5-Jul-07 3:27 
AnswerRe: writing to a port Pin
khan++5-Jul-07 3:49
khan++5-Jul-07 3:49 
Questionlower and higher part of a variable Pin
Dobromir Dimitrov4-Jul-07 4:32
Dobromir Dimitrov4-Jul-07 4:32 
AnswerRe: lower and higher part of a variable Pin
Matthew Faithfull4-Jul-07 4:40
Matthew Faithfull4-Jul-07 4:40 
AnswerRe: lower and higher part of a variable Pin
CPallini4-Jul-07 4:42
mveCPallini4-Jul-07 4:42 
QuestionError sound when closing application Pin
Twister3364-Jul-07 2:23
Twister3364-Jul-07 2:23 
AnswerRe: Error sound when closing application Pin
Programm3r4-Jul-07 3:10
Programm3r4-Jul-07 3:10 
AnswerRe: Error sound when closing application Pin
Mark Salsbery4-Jul-07 7:18
Mark Salsbery4-Jul-07 7:18 
QuestionRe: Error sound when closing application Pin
Hamid_RT4-Jul-07 19:30
Hamid_RT4-Jul-07 19:30 

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.