The following is part of the child window and Edit code, error-free compiled through,
BOOL CreateDataWindow (HINSTANCE HINSTANCE)
{
//hData already in the previous statement;
If (hData!=NULL)
{
MessageBox (hData, TEXT (" You have already open these Windows "), TEXT (" Warnning "), MB_OK);
The BringWindowToTop (hData);
return FALSE;
}
hData=https://bbs.csdn.net/topics/CreateWindowEx (WS_EX_APPWINDOW,//"Origin" is a registered Win Calss
The TEXT (" Origin "),
The TEXT (" DataInput "),
WS_CAPTION | WS_SYSMENU | WS_CLIPSIBLINGS | WS_CHILD | WS_CLIPSIBLINGS,
300, 0,
500600,
HMain,
HMENU IDD_MAIN,
Hinstance,
(LPVOID) NULL);
If (hData=https://bbs.csdn.net/topics/=NULL)
return FALSE;
ShowWindow (hData, SW_SHOW);
The BringWindowToTop (hData);
//add controls,
{
LPTSTR lpszTrouble=TEXT (" the When in the Course of human Events ");
HWND hEdit=CreateWindow (WC_EDIT,
NULL,
WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER |
ES_RIGHT | ES_AUTOHSCROLL | ES_AUTOVSCROLL,
180200300, 50,
HData,
(HMENU) 106,
Hinst,
(LPVOID) NULL
);
If (hEdit==NULL)
return FALSE;
SendMessage (hEdit WM_SETTEXT, 0,
(LPARAM) lpszTrouble);
}
return TRUE;
}
CodePudding user response:
To a great god help me,,,,CodePudding user response:
I with you to create edit code test, the generated edit is normal, is focused and can be right to left input,Problems should be the CreateWindowEx created this hData form, oneself excluded under
CodePudding user response: