-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodeinsertion.ini
More file actions
60 lines (60 loc) · 2.81 KB
/
codeinsertion.ini
File metadata and controls
60 lines (60 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[MessageBox]
Desc=Win32 MessageBox
Line=MessageBox(*|*,"Hello","Caption",MB_OK);
Sep=1
[WinMain]
Desc=Win32 Main Function
Line=int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {$_ WNDCLASSEX wc;$_ HWND hwnd;$_ MSG Msg;$_$_ memset(&wc,0,sizeof(wc));$_ wc.cbSize = sizeof(WNDCLASSEX);$_ wc.lpfnWndProc = *|*; /* insert window procedure function here */$_ wc.hInstance = hInstance;$_ wc.hCursor = LoadCursor(NULL, IDC_ARROW);$_ wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);$_ wc.lpszClassName = "WindowClass";$_ wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); /* use "A" as icon name when you want to use the project icon */$_ wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); /* as above */$_$_ if(!RegisterClassEx(&wc)) {$_ MessageBox(NULL, "Window Registration Failed!","Error!",MB_ICONEXCLAMATION|MB_OK);$_ return 0;$_ }$_$_ hwnd = CreateWindowEx(WS_EX_CLIENTEDGE,"WindowClass","Caption",WS_VISIBLE|WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,640,480,NULL,NULL,hInstance,NULL);$_ if(hwnd == NULL) {$_ MessageBox(NULL, "Window Creation Failed!","Error!",MB_ICONEXCLAMATION|MB_OK);$_ return 0;$_ }$_$_ while(GetMessage(&Msg, NULL, 0, 0) > 0) {$_ TranslateMessage(&Msg);$_ DispatchMessage(&Msg);$_ }$_ return Msg.wParam;$_}
Sep=1
[Main_Window_Proc]
Desc=Win32 Main Proc Function
Line=LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {$_ switch(Message) {$_ case *|*: {$_ break;$_ }$_ case WM_DESTROY: {$_ PostQuitMessage(0);$_ break;$_ }$_ default:$_ return DefWindowProc(hwnd, Message, wParam, lParam);$_ }$_ return 0;$_}
Sep=1
[Child_Window_Proc]
Desc=Win32 Child Proc Function
Line=BOOL CALLBACK ChildProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {$_ switch(Message) {$_ case *|*: {$_ break;$_ }$_ default:$_ return false;$_ }$_ return true;$_}
Sep=1
[for()]
Desc=for loop
Line=for(*|*;;) {$_}
Sep=2
[while()]
Desc=while loop
Line=while(*|*) {$_}
Sep=2
[do-while()]
Desc=do-while loop
Line=do {$_} while(*|*);
Sep=2
[if()]
Desc=if statement
Line=if(*|*) {$_}
Sep=2
[switch()]
Desc=switch statement
Line=switch(*|*) {$_ default:$_}
Sep=2
[Class]
Desc=Class
Line=class *|* {$_ // Private section$_ public:$_ // Public Declarations$_ protected:$_ // Protected Declarations$_};
Sep=2
[Class_Header_Template]
Desc=Class
Line=#ifndef SOMETHING_H$_#define SOMETHING_H$_$_class *|* {$_ // Private section$_ public:$_ // Public Declarations$_ protected:$_ // Protected Declarations$_};$_$_#endif
Sep=2
[#ifdef]
Desc=Preprocessor if
Line=#ifdef *|*$_$_#endif
Sep=3
[#ifndef]
Desc=Preprocessor !if
Line=#ifndef *|*$_$_#endif
Sep=3
[#ifdef/else]
Desc=Preprocessor if-else
Line=#ifdef *|*$_$_#elif$_$_#endif
Sep=3
[#ifndef/else]
Desc=Preprocessor !if-else
Line=#ifndef *|*$_$_#elif$_$_#endif
Sep=3