MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / MsgCreate

Function MsgCreate

src/Notepad2.c:1249–1325  ·  view source on GitHub ↗

============================================================================= MsgCreate() - Handles WM_CREATE

Source from the content-addressed store, hash-verified

1247//
1248//
1249LRESULT MsgCreate ( HWND hwnd, WPARAM wParam, LPARAM lParam )
1250{
1251 HINSTANCE hInstance ;
1252 hInstance = ( ( LPCREATESTRUCT ) lParam )->hInstance;
1253 // Setup edit control
1254 hwndEdit = EditCreate ( hwnd );
1255 HL_Msg_create();
1256 //
1257 hwndEditFrame = CreateWindowEx (
1258 WS_EX_CLIENTEDGE,
1259 WC_LISTVIEW,
1260 NULL,
1261 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
1262 0, 0, 100, 100,
1263 hwnd,
1264 ( HMENU ) IDC_EDITFRAME,
1265 hInstance,
1266 NULL );
1267 if ( PrivateIsAppThemed() ) {
1268 RECT rc, rc2;
1269 bIsAppThemed = TRUE;
1270 SetWindowLongPtr ( hwndEdit, GWL_EXSTYLE, GetWindowLongPtr ( hwndEdit, GWL_EXSTYLE ) & ~WS_EX_CLIENTEDGE );
1271 SetWindowPos ( hwndEdit, NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED );
1272 if ( IsVista() ) {
1273 cxEditFrame = 0;
1274 cyEditFrame = 0;
1275 } else {
1276 GetClientRect ( hwndEditFrame, &rc );
1277 GetWindowRect ( hwndEditFrame, &rc2 );
1278 cxEditFrame = ( ( rc2.right - rc2.left ) - ( rc.right - rc.left ) ) / 2;
1279 cyEditFrame = ( ( rc2.bottom - rc2.top ) - ( rc.bottom - rc.top ) ) / 2;
1280 }
1281 } else {
1282 bIsAppThemed = FALSE;
1283 cxEditFrame = 0;
1284 cyEditFrame = 0;
1285 }
1286 // Create Toolbar and Statusbar
1287 CreateBars ( hwnd, hInstance );
1288 // Window Initialization
1289 CreateWindow (
1290 WC_STATIC,
1291 NULL,
1292 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
1293 0, 0, 10, 10,
1294 hwnd,
1295 ( HMENU ) IDC_FILENAME,
1296 hInstance,
1297 NULL );
1298 SetDlgItemText ( hwnd, IDC_FILENAME, szCurFile );
1299 CreateWindow (
1300 WC_STATIC,
1301 NULL,
1302 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
1303 10, 10, 10, 10,
1304 hwnd,
1305 ( HMENU ) IDC_REUSELOCK,
1306 hInstance,

Callers 1

MainWndProcFunction · 0.85

Calls 8

EditCreateFunction · 0.85
HL_Msg_createFunction · 0.85
PrivateIsAppThemedFunction · 0.85
SetWindowLongPtrFunction · 0.85
GetWindowLongPtrFunction · 0.85
CreateBarsFunction · 0.85
MRU_CreateFunction · 0.85
MRU_LoadFunction · 0.85

Tested by

no test coverage detected