void ToolsOptionsWindow::CreateGeneralPanel () { m_pfoldersframe = CreateGroupBox ("Protected Folders", 130, 15, 390, 103, ID_LBLSTATIC); m_pfoldersinfo1 = CreateLabel ("When my computer starts up / wakes up:", 140, 35, 300, 20, ID_LBLSTATIC); m_pfolderspromptpowerup = CreateCheckBox ("Ask me before Decrypting protected folders", 155, 53, 300, 20, ID_CHKPFOLDERPROMPTPUP); m_pfoldersinfo2 = CreateLabel ("When my computer shuts down / sleeps:", 140, 75, 300, 20, ID_LBLSTATIC); m_pfolderspromptpowerdown = CreateCheckBox ("Ask me before Encrypting protected folders", 155, 92, 300, 20, ID_CHKPFOLDERPROMPTPDN); m_ptextencframe = CreateGroupBox ("Universal Text Encryption", 130, 130, 390, 120, ID_LBLSTATIC); m_lblenc = CreateLabel ("Encrypt Hotkey", 170, 164, 100, 20, ID_LBLSTATIC); m_chkencctrl = CreateCheckBox ("Ctrl", 280, 163, 40, 20, ID_UTEBTNHOTENCCTRL); m_chkencalt = CreateCheckBox ("Alt", 340, 163, 40, 20, ID_UTEBTNHOTENCALT); m_txtenckey = CreateTextBox (400, 163, 40, 20, ID_UTETXTHOTENC); m_lbldec = CreateLabel ("Decrypt Hotkey", 170, 194, 100, 20, ID_LBLSTATIC); m_chkdecctrl = CreateCheckBox ("Ctrl", 280, 193, 40, 20, ID_UTEBTNHOTDECCTRL); m_chkdecalt = CreateCheckBox ("Alt", 340, 193, 40, 20, ID_UTEBTNHOTDECALT); m_txtdeckey = CreateTextBox (400, 193, 40, 20, ID_UTETXTHOTDEC); m_lblinfo = CreateLabel ("NOTE: Hot Key settings will take effect after next reboot.", 170, 227, 300, 20, ID_LBLSTATIC); m_autoupdateframe = CreateGroupBox ("Automatic Updates", 130, 265, 390, 103, ID_LBLSTATIC); m_chkautoupdate = CreateCheckBox ("Automatically check online for a newer version of CedeCrypt", 155, 310, 300, 20, ID_CHKAUTOUPDATECHECK); ShowWindow (m_chkencalt, SW_HIDE); ShowWindow (m_chkdecalt, SW_HIDE); }
void cMenu::InitMenu() { //Create Tabs. CreateTab("Aim"); CreateTab("Gun"); CreateTab("ESP"); CreateTab("Misc"); CreateTab("Chat"); //Create Check Boxes. CreateCheck("Aim", "Aimbot", &M_AimEnable); CreateCheck("Aim", "Silent Aim", &M_Aim_Silent); CreateCheck("Aim", "Teamkill", &M_Aim_TeamKill); CreateCheck("Aim", "Kill Players", &M_Aim_KillPlayer); CreateCheck("Aim", "Kill NPCs", &M_Aim_KillNPC); CreateCheck("Aim", "Triggerbot", &M_TriggerBot); CreateCheck("Gun", "Auto Pistol", &M_AutoPistol); CreateCheck("Gun", "Auto Reload", &M_AutoReload); CreateCheck("Gun", "No Spread", &M_NoSpread); CreateCheck("ESP", "Enable", &M_ESP); CreateCheck("ESP", "Name", &M_ESP_Name); CreateCheck("ESP", "Health", &M_ESP_Health); CreateCheck("ESP", "Health Bar", &M_ESP_HealthBar); CreateCheck("ESP", "3D Boxes", &M_ESP_3D); CreateCheck("ESP", "NPCs", &M_ESP_NPCs); CreateCheck("ESP", "Players", &M_ESP_Players); CreateCheck("ESP", "Weapons", &M_ESP_Weapons); CreateCheck("ESP", "View ESP", &M_ESP_ViewESP); CreateCheck("Misc", "Name Changer", &M_NameChanger); CreateCheck("Misc", "Bunny Hop", &M_Bhop); CreateCheck("Misc", "Freeze Hack", &M_FreezeHack); CreateCheck("Misc", "Fake Lag", &M_FakeLag); CreateCheck("Misc", "Fast Join", &M_FastJoin); CreateCheck("Misc", "Disconnect Spam", &M_DisconnectSpam); CreateCheck("Misc", "Speedhake", &M_Speed); CreateCheck("Chat", "Voice Imitator", &M_VoiceChatImitator ); CreateCheck("Chat", "Text Imitator", &M_TextChatImitator ); CreateCheck("Chat", "Team-Text", &M_TextChatTeam ); CreateCheck("Chat", "Chat Spam", &M_ChatSpam ); CreateCheck("Chat", "Voice Spam", &M_VoiceChatSpam ); //Create Sliders CreateSlider("Misc", "Speed", 100, &S_Speed); CreateSlider("Misc", "Crosshair", 5, &S_CrossHair); //Create Text Boxes CreateTextBox("ESP", "Custom ESP", &T_CustomESP); CreateTextBox("Chat", "Chat Spam", &T_ChatSpam); //M_ClientSpectate }
void InitializeDialogLayer(Window *window) { if(!dialogTextBox) { dialogTextBox = CreateTextBox(DIALOG_TEXT_X_OFFSET, DIALOG_TEXT_Y_OFFSET, fonts_get_system_font(FONT_KEY_GOTHIC_14), dialogFrame); okTextBox = CreateTextBox(DIALOG_TEXT_X_OFFSET, DIALOG_TEXT_Y_OFFSET, fonts_get_system_font(FONT_KEY_GOTHIC_14), okFrame); cancelTextBox = CreateTextBox(DIALOG_TEXT_X_OFFSET, DIALOG_TEXT_Y_OFFSET, fonts_get_system_font(FONT_KEY_GOTHIC_14), cancelFrame); } InitializeTextBox(window, dialogTextBox, ""); InitializeTextBox(window, okTextBox, "OK"); InitializeTextBox(window, cancelTextBox, "X"); HideDialogLayer(); }
void populate_hack_table(GtkWidget* hack_table) { GtkWidget* hack_offset_label = left_label("Half-pixel Offset Hack:"); GtkWidget* hack_offset_box = CreateComboBoxFromVector(theApp.m_gs_offset_hack, "UserHacks_HalfPixelOffset"); GtkWidget* hack_skipdraw_label = left_label("Skipdraw:"); GtkWidget* hack_skipdraw_spin = CreateSpinButton(0, 1000, "UserHacks_SkipDraw"); GtkWidget* hack_wild_check = CreateCheckBox("Wild Arms Hack", "UserHacks_WildHack"); GtkWidget* hack_tco_label = left_label("Texture Offset: 0x"); GtkWidget* hack_tco_entry = CreateTextBox("UserHacks_TCOffset"); GtkWidget* align_sprite_check = CreateCheckBox("Align sprite hack", "UserHacks_align_sprite_X"); GtkWidget* preload_gs_check = CreateCheckBox("Preload Frame", "preload_frame_with_gs_data"); GtkWidget* hack_fast_inv = CreateCheckBox("Fast Texture Invalidation", "UserHacks_DisablePartialInvalidation"); GtkWidget* hack_depth_check = CreateCheckBox("Disable Depth Emulation", "UserHacks_DisableDepthSupport"); GtkWidget* hack_auto_flush = CreateCheckBox("Auto Flush Primitives", "UserHacks_AutoFlush"); GtkWidget* hack_unscale_prim = CreateCheckBox("Unscale Point&Line Primitives", "UserHacks_unscale_point_line"); GtkWidget* hack_sprite_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_SpriteHack"); GtkWidget* hack_sprite_label = left_label("Alpha-Sprite Hack:"); GtkWidget* stretch_hack_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_round_sprite_offset"); GtkWidget* stretch_hack_label = left_label("Align Sprite Texture:"); GtkWidget* trilinear_box = CreateComboBoxFromVector(theApp.m_gs_trifilter, "UserHacks_TriFilter"); GtkWidget* trilinear_label = left_label("Trilinear Filtering:"); // Reuse windows helper string :) AddTooltip(hack_offset_label, IDC_OFFSETHACK); AddTooltip(hack_offset_box, IDC_OFFSETHACK); AddTooltip(hack_skipdraw_label, IDC_SKIPDRAWHACK); AddTooltip(hack_skipdraw_spin, IDC_SKIPDRAWHACK); AddTooltip(hack_wild_check, IDC_WILDHACK); AddTooltip(hack_sprite_label, hack_sprite_box, IDC_SPRITEHACK); AddTooltip(hack_tco_label, IDC_TCOFFSETX); AddTooltip(hack_tco_entry, IDC_TCOFFSETX); AddTooltip(align_sprite_check, IDC_ALIGN_SPRITE); AddTooltip(stretch_hack_label, stretch_hack_box, IDC_ROUND_SPRITE); AddTooltip(preload_gs_check, IDC_PRELOAD_GS); AddTooltip(hack_fast_inv, IDC_FAST_TC_INV); AddTooltip(hack_depth_check, IDC_TC_DEPTH); AddTooltip(hack_auto_flush, IDC_AUTO_FLUSH); AddTooltip(hack_unscale_prim, IDC_UNSCALE_POINT_LINE); AddTooltip(trilinear_box, IDC_TRI_FILTER); AddTooltip(trilinear_label, IDC_TRI_FILTER); s_table_line = 0; // Hack InsertWidgetInTable(hack_table , hack_fast_inv , hack_auto_flush); InsertWidgetInTable(hack_table , hack_depth_check , preload_gs_check); // Upscaling hack InsertWidgetInTable(hack_table , hack_wild_check , align_sprite_check); InsertWidgetInTable(hack_table , hack_unscale_prim); InsertWidgetInTable(hack_table , hack_offset_label , hack_offset_box); InsertWidgetInTable(hack_table , hack_sprite_label , hack_sprite_box ); InsertWidgetInTable(hack_table , stretch_hack_label , stretch_hack_box ); InsertWidgetInTable(hack_table , hack_skipdraw_label , hack_skipdraw_spin); InsertWidgetInTable(hack_table , hack_tco_label , hack_tco_entry); InsertWidgetInTable(hack_table , trilinear_label , trilinear_box); }
//---------------------------------------------------------------------------- __fastcall TInputGroupBox::TInputGroupBox(TComponent* Owner) : TGroupBox(Owner) { OnEnter=TInputGroupBoxOnEnter; TextBox=CreateTextBox(); TypeBox=CreateTypeBox(); CreateLabels(); PopupMenu=CreatePopupMenu(); Width=205; Height=85; OnResize=OnResizeBox; }
void populate_hack_table(GtkWidget* hack_table) { GtkWidget* hack_offset_check = CreateCheckBox("Half-pixel Offset Hack", "UserHacks_HalfPixelOffset"); GtkWidget* hack_skipdraw_label = left_label("Skipdraw:"); GtkWidget* hack_skipdraw_spin = CreateSpinButton(0, 1000, "UserHacks_SkipDraw"); GtkWidget* hack_enble_check = CreateCheckBox("Enable User Hacks", "UserHacks"); GtkWidget* hack_wild_check = CreateCheckBox("Wild Arms Hack", "UserHacks_WildHack"); GtkWidget* hack_tco_label = left_label("Texture Offset: 0x"); GtkWidget* hack_tco_entry = CreateTextBox("UserHacks_TCOffset"); GtkWidget* align_sprite_check = CreateCheckBox("Align sprite hack", "UserHacks_align_sprite_X"); GtkWidget* preload_gs_check = CreateCheckBox("Preload Frame", "preload_frame_with_gs_data"); GtkWidget* hack_safe_fbmask = CreateCheckBox("Safe Accurate Blending", "UserHacks_safe_fbmask"); GtkWidget* hack_fast_inv = CreateCheckBox("Fast Texture Invalidation", "UserHacks_DisablePartialInvalidation"); GtkWidget* hack_depth_check = CreateCheckBox("Disable Depth Emulation", "UserHacks_DisableDepthSupport"); GtkWidget* hack_sprite_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_SpriteHack"); GtkWidget* hack_sprite_label = left_label("Alpha-Sprite Hack:"); GtkWidget* stretch_hack_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_round_sprite_offset"); GtkWidget* stretch_hack_label = left_label("Align Sprite Texture:"); // Reuse windows helper string :) AddTooltip(hack_offset_check, IDC_OFFSETHACK); AddTooltip(hack_skipdraw_label, IDC_SKIPDRAWHACK); AddTooltip(hack_skipdraw_spin, IDC_SKIPDRAWHACK); gtk_widget_set_tooltip_text(hack_enble_check, "Allows the use of the hack below"); AddTooltip(hack_wild_check, IDC_WILDHACK); AddTooltip(hack_sprite_label, hack_sprite_box, IDC_SPRITEHACK); AddTooltip(hack_tco_label, IDC_TCOFFSETX); AddTooltip(hack_tco_entry, IDC_TCOFFSETX); AddTooltip(align_sprite_check, IDC_ALIGN_SPRITE); AddTooltip(stretch_hack_label, stretch_hack_box, IDC_ROUND_SPRITE); AddTooltip(preload_gs_check, IDC_PRELOAD_GS); AddTooltip(hack_safe_fbmask, IDC_SAFE_FBMASK); AddTooltip(hack_fast_inv, IDC_FAST_TC_INV); AddTooltip(hack_depth_check, IDC_TC_DEPTH); s_table_line = 0; InsertWidgetInTable(hack_table , hack_enble_check); InsertWidgetInTable(hack_table , hack_wild_check , align_sprite_check); InsertWidgetInTable(hack_table , hack_offset_check , preload_gs_check); InsertWidgetInTable(hack_table , hack_safe_fbmask , hack_fast_inv); InsertWidgetInTable(hack_table , hack_depth_check); InsertWidgetInTable(hack_table , hack_sprite_label , hack_sprite_box ); InsertWidgetInTable(hack_table , stretch_hack_label , stretch_hack_box ); InsertWidgetInTable(hack_table , hack_skipdraw_label , hack_skipdraw_spin); InsertWidgetInTable(hack_table , hack_tco_label , hack_tco_entry); }
void populate_hack_table(GtkWidget* hack_table) { GtkWidget* hack_offset_check = CreateCheckBox("Offset Hack", "UserHacks_HalfPixelOffset"); GtkWidget* hack_skipdraw_label = gtk_label_new("Skipdraw:"); GtkWidget* hack_skipdraw_spin = CreateSpinButton(0, 1000, "UserHacks_SkipDraw"); GtkWidget* hack_enble_check = CreateCheckBox("Enable User Hacks", "UserHacks"); GtkWidget* hack_wild_check = CreateCheckBox("Wild arm Hack", "UserHacks_WildHack"); GtkWidget* hack_tco_label = gtk_label_new("Texture Offset: 0x"); GtkWidget* hack_tco_entry = CreateTextBox("UserHacks_TCOffset"); GtkWidget* align_sprite_check = CreateCheckBox("Align sprite hack", "UserHacks_align_sprite_X"); GtkWidget* hack_sprite_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_SpriteHack"); GtkWidget* hack_sprite_label = gtk_label_new("Alpha-Sprite Hack:"); GtkWidget* stretch_hack_box = CreateComboBoxFromVector(theApp.m_gs_hack, "UserHacks_round_sprite_offset"); GtkWidget* stretch_hack_label = gtk_label_new("Align Sprite Texture:"); // Reuse windows helper string :) AddTooltip(hack_offset_check, IDC_TCOFFSETX); AddTooltip(hack_skipdraw_label, IDC_SKIPDRAWHACK); AddTooltip(hack_skipdraw_spin, IDC_SKIPDRAWHACK); gtk_widget_set_tooltip_text(hack_enble_check, "Allow to use hack below"); AddTooltip(hack_wild_check, IDC_WILDHACK); AddTooltip(hack_sprite_label, hack_sprite_box, IDC_SPRITEHACK); AddTooltip(hack_tco_label, IDC_TCOFFSETX); AddTooltip(hack_tco_entry, IDC_TCOFFSETX); AddTooltip(align_sprite_check, IDC_ALIGN_SPRITE); AddTooltip(stretch_hack_label, stretch_hack_box, IDC_ROUND_SPRITE); s_table_line = 0; InsertWidgetInTable(hack_table , hack_enble_check); InsertWidgetInTable(hack_table , hack_wild_check , align_sprite_check); InsertWidgetInTable(hack_table , hack_sprite_label , hack_sprite_box ); InsertWidgetInTable(hack_table , stretch_hack_label , stretch_hack_box ); InsertWidgetInTable(hack_table , hack_skipdraw_label , hack_skipdraw_spin); InsertWidgetInTable(hack_table , hack_offset_check); InsertWidgetInTable(hack_table , hack_tco_label , hack_tco_entry); }
// ----------------------------------------------------------------------- // Initialize Form int CALLBACK FRMPrjPropsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { PAINTSTRUCT CreatePs; CStr BufString; switch(uMsg) { case WM_INITDIALOG: FRMPrjPropshWnd = hwndDlg; ControlSetText(hwndDlg, "Project properties"); FRMPrjPropsFr1 = CreateFrame(2, -1, 202, 108, hwndDlg, "Application", 0, 0, 0); FRMPrjPropsFr2 = CreateFrame(206, -1, 194, 108, hwndDlg, "Version", 0, 0, 0); FRMPrjPropsFr3 = CreateFrame(2, 108, 398, 94, hwndDlg, "Version informations", 14, &FRMPrjPropsFrame3, 0); CreateLabel(5, 21 + 20, 35, 15, FRMPrjPropsFr1, "Title :", 0, 0, 0, 0); CreateLabel(5, 41 + 25, 52, 15, FRMPrjPropsFr1, "File type :", 0, 0, 0, 0); CreateLabel(131, 41 + 25, 34, 15, FRMPrjPropsFr1, "Icon :", 0, 0, 0, 0); FRMPrjPropsOk = CreateButton(243, 214, 77, 23, hwndDlg, "Ok", 1, 0, 0, 0, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP, Buttons_StaticEdge); FRMPrjPropsCancel = CreateButton(322, 214, 77, 23, hwndDlg, "Cancel", 2, 0, 0, 0, WS_TABSTOP, Buttons_StaticEdge); FRMPrjPropsReg = CreateButton(159, 214, 77, 23, hwndDlg, "Register", 3, 0, 0, 0, WS_TABSTOP, Buttons_StaticEdge); FRMPrjPropsConstants = CreateButton(3, 214, 77, 23, hwndDlg, "Constants", 4, 0, 0, 0, WS_TABSTOP, Buttons_StaticEdge); FRMPrjPropsIncludeVersion = CreateCheckBox(7, 18, 140, 15, FRMPrjPropsFr1, "Include version resource", 5, 0, WS_TABSTOP | WS_GROUP, 0); FRMPrjPropsTxtTitle = CreateTextBox(36, 18 + 20, 159, 20, FRMPrjPropsFr1, "", 6, 0, WS_TABSTOP | ES_AUTOHSCROLL, WS_EX_STATICEDGE); FRMPrjPropsFileType = CreateComboBox(5, 56 + 25, 123, 150, FRMPrjPropsFr1, "", 7, 0, CBS_DROPDOWNLIST | WS_TABSTOP); ComboBoxAddItem(FRMPrjPropsFileType, "UNKNOWN", -1); ComboBoxAddItem(FRMPrjPropsFileType, "APP", -1); ComboBoxAddItem(FRMPrjPropsFileType, "DLL", -1); ComboBoxAddItem(FRMPrjPropsFileType, "DRV", -1); ComboBoxAddItem(FRMPrjPropsFileType, "FONT", -1); ComboBoxAddItem(FRMPrjPropsFileType, "VXD", -1); ComboBoxAddItem(FRMPrjPropsFileType, "STATIC_LIB", -1); ComboBoxSetIndex(FRMPrjPropsFileType, 0); FRMPrjPropsSetIcon = CreateButton(133, 56 + 25, 25, 21, hwndDlg, "...", 8, 0, 0, 0, WS_TABSTOP, Buttons_StaticEdge); // Current icon if(ProjectTypeScheduledImg.Len()) BufString = ProjectTypeScheduledImg; else BufString = ProjectDir + (CStr) "\\" + (CStr) ProjectTypeImg; FRMPrjPropsIconhandle = LoadImage(0, BufString.Get_String(), IMAGE_ICON, 0, 0, LR_LOADFROMFILE); FRMPrjPropsIcon = CreatePictureBox(163, 43 + 25, 35, 34, FRMPrjPropsFr1, FRMPrjPropsIconhandle, IMAGE_ICON, 9, 0, SS_CENTERIMAGE); CreateLabel(7, 15, 52, 13, FRMPrjPropsFr2, "Major :", 0, 0, 0, 0); CreateLabel(99, 15, 52, 13, FRMPrjPropsFr2, "Minor :", 0, 0, 0, 0); CreateLabel(7, 35, 52, 13, FRMPrjPropsFr2, "Revision :", 0, 0, 0, 0); CreateLabel(99, 35, 52, 13, FRMPrjPropsFr2, "Release :", 0, 0, 0, 0); FRMPrjPropsTxtMajor = CreateTextBox(59, 12, 33, 20, FRMPrjPropsFr2, "", 10, 0, WS_TABSTOP | ES_NUMBER, WS_EX_STATICEDGE); FRMPrjPropsTxtMinor = CreateTextBox(151, 12, 33, 20, FRMPrjPropsFr2, "", 11, 0, WS_TABSTOP | ES_NUMBER, WS_EX_STATICEDGE); FRMPrjPropsTxtRevision = CreateTextBox(59, 32, 33, 20, FRMPrjPropsFr2, "", 12, 0, WS_TABSTOP | ES_NUMBER, WS_EX_STATICEDGE); FRMPrjPropsTxtRelease = CreateTextBox(151, 32, 33, 20, FRMPrjPropsFr2, "", 13, 0, WS_TABSTOP | ES_NUMBER, WS_EX_STATICEDGE); CreateLabel(7, 61, 31, 15, FRMPrjPropsFr2, "OS :", 0, 0, 0, 0); FRMPrjPropsOS = CreateComboBox(34, 57, 150, 150, FRMPrjPropsFr2, "", 14, 0, CBS_DROPDOWNLIST | WS_TABSTOP); ComboBoxAddItem(FRMPrjPropsOS, "UNKNOWN", -1); ComboBoxAddItem(FRMPrjPropsOS, "DOS", -1); ComboBoxAddItem(FRMPrjPropsOS, "NT", -1); ComboBoxAddItem(FRMPrjPropsOS, "WINDOWS16", -1); ComboBoxAddItem(FRMPrjPropsOS, "WINDOWS32", -1); ComboBoxAddItem(FRMPrjPropsOS, "DOS_WINDOWS16", -1); ComboBoxAddItem(FRMPrjPropsOS, "DOS_WINDOWS32", -1); ComboBoxAddItem(FRMPrjPropsOS, "NT_WINDOWS32", -1); ComboBoxSetIndex(FRMPrjPropsOS, 0); FRMPrjPropsIncludeXPManifest = CreateCheckBox(16, 85, 170, 15, FRMPrjPropsFr2, "Include Windows XP manifest", 15, 0, WS_TABSTOP | WS_GROUP, 0); CreateLabel(5, 16, 52, 13, FRMPrjPropsFr3, "Type :", 0, 0, 0, 0); FRMPrjPropsTypeProp = CreateListBox(5, 30, 140, 59, FRMPrjPropsFr3, 16, 0, 0, WS_TABSTOP | WS_HSCROLL, WS_EX_STATICEDGE); ListBoxAddItem(FRMPrjPropsTypeProp, "Comments", -1); ListBoxAddItem(FRMPrjPropsTypeProp, "Company name", -1); ListBoxAddItem(FRMPrjPropsTypeProp, "File description", -1); ListBoxAddItem(FRMPrjPropsTypeProp, "Legal copyright", -1); ListBoxAddItem( FRMPrjPropsTypeProp, "Legal trademarks", -1); ListBoxAddItem(FRMPrjPropsTypeProp, "Product name", -1); ListBoxSetIndex(FRMPrjPropsTypeProp, 0); FRMPrjPropsTypeTxt = CreateTextBox(147, 13 - 2, 245, 79, FRMPrjPropsFr3, "", 17, &FRMPrjPropsTypeTxtHook, WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL | ES_WANTRETURN, WS_EX_STATICEDGE); LoadUserInfos(); ControlSetText(FRMPrjPropsTxtMajor, Prj_Major); ControlSetText(FRMPrjPropsTxtMinor, Prj_Minor); ControlSetText(FRMPrjPropsTxtRevision, Prj_Revision); ControlSetText(FRMPrjPropsTxtRelease, Prj_Release); CheckBoxSetState(FRMPrjPropsIncludeVersion, Prj_IncludeVersion); CheckBoxSetState(FRMPrjPropsIncludeXPManifest, Prj_IncludeManifest); ComboBoxSetIndex(FRMPrjPropsOS, Prj_OS); ComboBoxSetIndex(FRMPrjPropsFileType, Prj_FileType); ControlSetText(FRMPrjPropsTxtTitle, ProjectTitle); TmpPrj_Comments = Prj_Comments; if(Prj_CompanyName.Len()) TmpPrj_CompanyName = Prj_CompanyName; TmpPrj_FileDescription = Prj_FileDescription; if(Prj_LegalCopyRight.Len()) TmpPrj_LegalCopyRight = Prj_LegalCopyRight; if(Prj_LegalTrademarks.Len()) TmpPrj_LegalTrademarks = Prj_LegalTrademarks; TmpPrj_ProductName = Prj_ProductName; ControlSetText(FRMPrjPropsTypeTxt, TmpPrj_Comments); FreezeTimer = 1; return(1); case WM_COMMAND: if((HWND) lParam == FRMPrjPropsOk) { ProjectTypeScheduledImg = NewIconFile; SaveProjectProperties(); ControlClose(hwndDlg); return(0); } else if((HWND) lParam == FRMPrjPropsCancel) { ControlClose(hwndDlg); return(0); } else if((HWND) lParam == FRMPrjPropsConstants) { CreateConstants(hwndDlg); return(0); } else if((HWND) lParam == FRMPrjPropsReg) { RegisterUserInfos(); return(0); } else if((HWND) lParam == FRMPrjPropsSetIcon) { SetProjectIcon(); return(0); } break; case WM_PAINT: BeginPaint(hwndDlg, &CreatePs); GDIDrawHorzSep(hwndDlg, 0, 207, 402); EndPaint(hwndDlg, &CreatePs); break; case WM_CLOSE: FreezeTimer = 0; EndDialog(hwndDlg, 0); break; } return(0); }
/*------------------------------------------------------------------------------------------------------------------ -- FUNCTION: InitWindow -- -- DATE: February 9th, 2016 -- -- REVISIONS: February 9th, 2016: Created InitWindow -- February 15th, 2016: Commented -- -- DESIGNER: Carson Roscoe -- -- PROGRAMMER: Carson Roscoe -- -- int InitWindow(HINSTANCE hInstance) -- -- RETURN: int regarding success or fail -- -- NOTES: -- Creates the window, assigns UI and gives them default values. ----------------------------------------------------------------------------------------------------------------------*/ int InitWindow(HINSTANCE hInstance) { WNDCLASSEX wcex; ////Setup Window//// wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_APPLICATION)); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1); wcex.lpszMenuName = MAKEINTRESOURCE(IDR_MENU1); wcex.lpszClassName = PROGRAM_TITLE; wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_APPLICATION)); if (!RegisterClassEx(&wcex)) { DWORD errorCode = GetLastError(); perror("RegisterClassEx Failed with error " + errorCode); return -1; } hwnd = CreateWindow(PROGRAM_TITLE, PROGRAM_TITLE, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 700, 500, NULL, NULL, hInstance, NULL); if (!hwnd) { DWORD errorCode = GetLastError(); perror("CreateWindow Failed with error " + errorCode); return -1; } ////Assign UI//// labelIP = CreateLabel("IP ", MARGIN, MARGIN, LABELWIDTH, LABELHEIGHT); editTextIP = CreateEditText("127.0.0.1", EDITSTART + MARGIN, MARGIN, EDITWIDTH, EDITHEIGHT); labelPort = CreateLabel("Port ", MARGIN + LABELWIDTH + SPACING + EDITWIDTH, MARGIN, LABELWIDTH, LABELHEIGHT); editTextPort = CreateEditText("7000", LABELWIDTH * 2 + SPACING * 2 + EDITWIDTH, MARGIN, EDITWIDTH, EDITHEIGHT); labelPacketSize = CreateLabel("Size ", MARGIN, MARGIN + LABELHEIGHT + SPACING, LABELWIDTH, LABELHEIGHT); comboBox1 = CreateComboBox(EDITSTART + MARGIN, MARGIN + LABELHEIGHT + SPACING, EDITWIDTH, COMBOHEIGHT); labelQuantity = CreateLabel("Quantity ", MARGIN + LABELWIDTH + SPACING + EDITWIDTH, MARGIN + LABELHEIGHT + SPACING, LABELWIDTH, LABELHEIGHT); comboBox2 = CreateComboBox(LABELWIDTH * 2 + SPACING * 2 + EDITWIDTH, MARGIN + LABELHEIGHT + SPACING, EDITWIDTH, COMBOHEIGHT); labelProtocol = CreateLabel("Protocol ", MARGIN, MARGIN + LABELHEIGHT * 2 + SPACING * 2, LABELWIDTH, LABELHEIGHT); comboBox3 = CreateComboBox(EDITSTART + MARGIN, MARGIN + LABELHEIGHT*2 + SPACING*2, EDITWIDTH, COMBOHEIGHT); buttonSend = CreateButton("Send ", MARGIN + LABELWIDTH + SPACING + EDITWIDTH, MARGIN + LABELHEIGHT * 2 + SPACING * 2, LABELWIDTH + EDITWIDTH + SPACING, LABELHEIGHT); textBoxResult = CreateTextBox(MARGIN, MARGIN + LABELHEIGHT * 3 + SPACING * 3, MARGIN + LABELWIDTH + SPACING + EDITWIDTH + LABELWIDTH + EDITWIDTH, LABELHEIGHT * 5); ////Give UI default values//// ComboBox_AddString(comboBox1, "1024"); ComboBox_AddString(comboBox1, "2048"); ComboBox_AddString(comboBox1, "4096"); ComboBox_AddString(comboBox1, "8192"); ComboBox_AddString(comboBox1, "16384"); ComboBox_AddString(comboBox1, "20000"); ComboBox_AddString(comboBox1, "32768"); ComboBox_AddString(comboBox1, "60000"); ComboBox_AddString(comboBox1, "65536"); ComboBox_AddString(comboBox2, "1"); ComboBox_AddString(comboBox2, "10"); ComboBox_AddString(comboBox2, "25"); ComboBox_AddString(comboBox2, "50"); ComboBox_AddString(comboBox2, "100"); ComboBox_AddString(comboBox2, "200"); ComboBox_AddString(comboBox2, "500"); ComboBox_AddString(comboBox2, "1000"); ComboBox_AddString(comboBox3, "TCP"); ComboBox_AddString(comboBox3, "UDP"); ComboBox_SetCurSel(comboBox1, 0); ComboBox_SetCurSel(comboBox2, 0); ComboBox_SetCurSel(comboBox3, 0); return 0; }
// ----------------------------------------------------------------------- // Properties form hook LRESULT CALLBACK FrmUserDiagPropsProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { long CurrentControlTop = 0; long CurrentControlLeft = 0; long CurrentControlWidth = 0; long CurrentControlHeight = 0; DRAWITEMSTRUCT LocalDraw; long XLargItem = 0; long LinesColor = 0; RECT FocusRect; RECT DatRect; long TextColor = 0; switch(uMsg) { case WM_DRAWITEM: CopyMemory(&LocalDraw, (void *) lParam, sizeof(LocalDraw)); FocusRect.left = LocalDraw.rcItem.left; FocusRect.top = LocalDraw.rcItem.top + 1; FocusRect.right = MaxPropXSize; FocusRect.bottom = LocalDraw.rcItem.bottom; DatRect.left = MaxPropXSize + 1; DatRect.top = LocalDraw.rcItem.top + 1; DatRect.right = LocalDraw.rcItem.right; DatRect.bottom = LocalDraw.rcItem.bottom; switch(LocalDraw.itemAction) { // Redraw item case ODA_DRAWENTIRE: XLargItem = ControlClientWidth(LocalDraw.hwndItem); LinesColor = 0xC0C0C0C0; TextColor = GetSysColor(COLOR_WINDOWTEXT); if(LocalDraw.itemState == ODS_SELECTED) { CurrentControlHeight = ControlHeight(CurrentEditControl); PropCurrentTop = DatRect.top + (DatRect.bottom - DatRect.top) + 1; PropCurrentLeft = MaxPropXSize + 1; PropCurrentWidth = DatRect.right - MaxPropXSize - 1; PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; CurrentControlTop = DatRect.top; switch(CurrentEditControlType) { case PROP_STRING: SetWindowPos(CurrentEditControl, 0, 0, 0, PropCurrentWidth, CurrentControlHeight, SWP_NOZORDER | SWP_NOMOVE); break; case PROP_INTEGER: SetWindowPos(CurrentEditControl, 0, 0, 0, PropCurrentWidth, CurrentControlHeight, SWP_NOZORDER | SWP_NOMOVE); break; default: CurrentControlLeft = ControlClientWidth(hPropListbox) - ControlWidth(CurrentEditControl); CurrentControlWidth = CurrentControlLeft - ControlLeft(CurrentEditControlSubEdit) + GetSystemMetrics(SM_CXVSCROLL); if(CurrentControlLeft < PropCurrentLeft) CurrentControlLeft = PropCurrentLeft; CurrentControlWidth = (DatRect.right - DatRect.left) - ControlWidth(CurrentEditControl) - 1; SetWindowPos(CurrentEditControlSubEdit, 0, 0, 0, CurrentControlWidth, CurrentControlHeight - 1, SWP_NOZORDER | SWP_NOMOVE); SetWindowPos(CurrentEditControl, 0, CurrentControlLeft, CurrentControlTop - 1, 0, 0, SWP_NOZORDER | SWP_NOSIZE); break; } if(PropScrollUp == 1) { switch(GetPropertyDatas(hCurrentObject, LocalDraw.itemID, PROPERTY_TYPE)) { case PROP_STRING: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); ControlClose(CurrentEditControl); if(GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_LOCKED) == 1) { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); } else { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL, 0); } TextBoxSetMaxLen(CurrentEditControl, 255); break; case PROP_INTEGER: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); ControlClose(CurrentEditControl); if(GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_LOCKED) == 1) { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_NUMBER | ES_READONLY, 0); } else { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_NUMBER, 0); } TextBoxSetMaxLen(CurrentEditControl, 5); break; case PROP_BOOLEAN: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentTop = DatRect.top + (DatRect.bottom - DatRect.top) + 1; PropCurrentLeft = MaxPropXSize + 1; PropCurrentWidth = DatRect.right - MaxPropXSize - 1; PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); CurrentEditControlSubEdit = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropSubComboHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); TextBoxSetMaxLen(CurrentEditControlSubEdit, 5); ControlClose(CurrentEditControl); CurrentEditControl = CreateButton(DatRect.right - (DatRect.bottom - DatRect.top), DatRect.top - 1, (DatRect.bottom - DatRect.top), (DatRect.bottom - DatRect.top), hPropListbox, "6", 0, 0, 0, &PropBooleanHook, WS_TABSTOP, 0); ControlSetFont(CurrentEditControl, WAMarlettFont9); break; case PROP_COMBO: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentTop = DatRect.top + (DatRect.bottom - DatRect.top) + 1; PropCurrentLeft = MaxPropXSize + 1; PropCurrentWidth = DatRect.right - MaxPropXSize - 1; PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); CurrentEditControlSubEdit = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropSubComboHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); TextBoxSetMaxLen(CurrentEditControlSubEdit, 255); ControlClose(CurrentEditControl); CurrentEditControl = CreateButton(DatRect.right - (DatRect.bottom - DatRect.top), DatRect.top - 1, (DatRect.bottom - DatRect.top), (DatRect.bottom - DatRect.top), hPropListbox, "6", 0, 0, 0, &PropComboHook, WS_TABSTOP, 0); ControlSetFont(CurrentEditControl, WAMarlettFont9); break; case PROP_FONTSELECT: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentTop = DatRect.top + (DatRect.bottom - DatRect.top) + 1; PropCurrentLeft = MaxPropXSize + 1; PropCurrentWidth = DatRect.right - MaxPropXSize - 1; PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); CurrentEditControlSubEdit = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, 0, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); TextBoxSetMaxLen(CurrentEditControlSubEdit, 255); ControlClose(CurrentEditControl); CurrentEditControl = CreateButton(DatRect.right - (DatRect.bottom - DatRect.top), DatRect.top - 1, (DatRect.bottom - DatRect.top), (DatRect.bottom - DatRect.top), hPropListbox, "", 0, IMAGE_ICON, (HICON) hPropComboPoints, &PropFontHook, WS_TABSTOP, 0); break; } PropScrollUp = 0; } TextColor = GetSysColor(COLOR_HIGHLIGHTTEXT); FocusRect.top = FocusRect.top - 1; FocusRect.bottom = FocusRect.bottom - 1; FillRect(LocalDraw.hDC, &FocusRect, GetSysColorBrush(COLOR_HIGHLIGHT)); FocusRect.top = FocusRect.top + 1; FocusRect.bottom = FocusRect.bottom + 1; } GDIWriteText(LocalDraw.hDC, LocalDraw.rcItem.left + 2, LocalDraw.rcItem.top + 1, (char *) GetPropertyDatas(hCurrentObject, LocalDraw.itemID, PROPERTY_NAME), TextColor, WASerifFont, 1, 0); TextColor = GetSysColor(COLOR_WINDOWTEXT); GDIWriteText(LocalDraw.hDC, DatRect.left + 1, LocalDraw.rcItem.top + 1, (char *) GetPropertyDatas(hCurrentObject, LocalDraw.itemID, PROPERTY_STORAGE), TextColor, WASerifFont, 1, 0); if((LocalDraw.rcItem.bottom - 1) < ControlClientHeight(hPropListbox)) { GDIDrawLine(LocalDraw.hwndItem, LocalDraw.rcItem.left, LocalDraw.rcItem.bottom - 1, XLargItem, LocalDraw.rcItem.bottom - 1, LinesColor); } if(XLargItem > MaxPropXSize) GDIDrawLine(LocalDraw.hwndItem, MaxPropXSize, LocalDraw.rcItem.top, MaxPropXSize, LocalDraw.rcItem.bottom - 1, LinesColor); return(1); // Item selection (no scrolling) case ODA_SELECT: if(hListBoolean != 0) { ControlClose(hListBoolean); hListBoolean = 0; } if(LocalDraw.itemState == ODS_SELECTED) { TextColor = GetSysColor(COLOR_HIGHLIGHTTEXT); FocusRect.top = FocusRect.top - 1; FocusRect.bottom = FocusRect.bottom - 1; FillRect(LocalDraw.hDC, &FocusRect, GetSysColorBrush(COLOR_HIGHLIGHT)); FocusRect.top = FocusRect.top + 1; FocusRect.bottom = FocusRect.bottom + 1; switch(GetPropertyDatas(hCurrentObject, LocalDraw.itemID, PROPERTY_TYPE)) { case PROP_STRING: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); ControlClose(CurrentEditControl); CurrentEditControlSubEdit = 0; CurrentEditControl = 0; if(GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_LOCKED) == 1) { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); } else { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL, 0); } break; case PROP_INTEGER: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); ControlClose(CurrentEditControl); CurrentEditControlSubEdit = 0; CurrentEditControl = 0; if(GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_LOCKED) == 1) { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_NUMBER | ES_READONLY, 0); } else { CurrentEditControl = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropEditHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_NUMBER, 0); } TextBoxSetMaxLen(CurrentEditControl, 5); break; case PROP_BOOLEAN: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentTop = DatRect.top + (DatRect.bottom - DatRect.top) + 1; PropCurrentLeft = MaxPropXSize + 1; PropCurrentWidth = DatRect.right - MaxPropXSize - 1; PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); CurrentEditControlSubEdit = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropSubComboHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); ControlClose(CurrentEditControl); CurrentEditControl = CreateButton(DatRect.right - (DatRect.bottom - DatRect.top), DatRect.top - 1, (DatRect.bottom - DatRect.top), (DatRect.bottom - DatRect.top), hPropListbox, "6", 0, 0, 0, &PropBooleanHook, WS_TABSTOP, 0); ControlSetFont(CurrentEditControl, WAMarlettFont9); break; case PROP_COMBO: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentTop = DatRect.top + (DatRect.bottom - DatRect.top) + 1; PropCurrentLeft = MaxPropXSize + 1; PropCurrentWidth = DatRect.right - MaxPropXSize - 1; PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); CurrentEditControlSubEdit = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, &PropSubComboHook, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); ControlClose(CurrentEditControl); CurrentEditControl = CreateButton(DatRect.right - (DatRect.bottom - DatRect.top), DatRect.top - 1, (DatRect.bottom - DatRect.top), (DatRect.bottom - DatRect.top), hPropListbox, "6", 0, 0, 0, &PropComboHook, WS_TABSTOP, 0); ControlSetFont(CurrentEditControl, WAMarlettFont9); break; case PROP_FONTSELECT: CurrentEditControlIndex = LocalDraw.itemID; CurrentEditControlType = GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_TYPE); PropCurrentTop = DatRect.top + (DatRect.bottom - DatRect.top) + 1; PropCurrentLeft = MaxPropXSize + 1; PropCurrentWidth = DatRect.right - MaxPropXSize - 1; PropCurrentHeight = (DatRect.bottom - DatRect.top) - 1; ControlClose(CurrentEditControlSubEdit); CurrentEditControlSubEdit = CreateTextBox(DatRect.left + 1, DatRect.top, (DatRect.right - DatRect.left) - PropCurrentHeight, (DatRect.bottom - DatRect.top) - 1, hPropListbox, (char *) GetPropertyDatas(hCurrentObject, CurrentEditControlIndex, PROPERTY_STORAGE), 0, 0, WS_TABSTOP | ES_AUTOHSCROLL | ES_READONLY, 0); ControlClose(CurrentEditControl); CurrentEditControl = CreateButton(DatRect.right - (DatRect.bottom - DatRect.top), DatRect.top - 1, (DatRect.bottom - DatRect.top), (DatRect.bottom - DatRect.top), hPropListbox, "...", 0, IMAGE_ICON, (HICON) hPropComboPoints, &PropFontHook, WS_TABSTOP, 0); break; } } else { TextColor = GetSysColor(COLOR_WINDOWTEXT); FocusRect.top = FocusRect.top - 1; FocusRect.bottom = FocusRect.bottom - 1; FillRect(LocalDraw.hDC, &FocusRect, GetSysColorBrush(COLOR_WINDOW)); FocusRect.top = FocusRect.top + 1; FocusRect.bottom = FocusRect.bottom + 1; PropScrollUp = 1; } GDIWriteText(LocalDraw.hDC, LocalDraw.rcItem.left + 2, LocalDraw.rcItem.top + 1, (char *) GetPropertyDatas(hCurrentObject, LocalDraw.itemID, PROPERTY_NAME), TextColor, WASerifFont, 1, 0); } return(1); case WM_SIZE: MoveWindow(hPropListbox, 1, 24, ControlClientWidth(hWnd) - 2, ControlClientHeight(hWnd) - 25, 1); MoveWindow(hPropCombobox, 1, 1, ControlClientWidth(hWnd) - 2, 150, 1); if(hListBoolean != 0) { ControlClose(hListBoolean); hListBoolean = 0; } break; case WM_CLOSE: PropertiesXPos = ControlLeft(hWnd); PropertiesYPos = ControlTop(hWnd); PropertiesXLarg = ControlWidth(hWnd); PropertiesYLong = ControlHeight(hWnd); break; case WM_DESTROY: ToolBarSetButtonChecked(hDiagTools, DIALOGTOOLS_PROPERTIES, 0); return(0); } return(CallWindowProc((WNDPROC) GetWindowLong(hWnd, GWL_USERDATA), hWnd, uMsg, wParam, lParam)); }