Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef SEARCHEDIT_ZDEFIONIOWANY
- #define SEARCHEDIT_ZDEFIONIOWANY 1
- #include <windows.h>
- #include <iostream>
- #include <conio.h>
- #include <cmath>
- #include <stdio.h>
- #include <string>
- #include <vector>
- #include <process.h>
- #include <map>
- #include <algorithm>
- #include "wh_operacje_na_uchwytach.h"
- #include "wh_grafika.h"
- #include "wh_ListScroll.h"
- using namespace std;
- #define SEID_RICHEDIT 1
- #define SEID_LISTSCROLL 2
- #define SEID_VK_RETURN 2
- #define SEID_VK_ESCAPE 4
- #define SEID_VK_UP 8
- #define SEID_VK_DOWN 16
- #define SEID_VK_ANYKEY 32
- #define SE_WAITTIME 2
- #define SE_LSCTIMER 1
- typedef int( * GETSIZE_PROC_TYPE)(void);
- typedef void( * GETSTRING_PROC_TYPE)(int index, string &tekst, int &liczba);
- BOOL RejestrujSearchEdit( HINSTANCE hInst );
- LRESULT CALLBACK SearchEditProc( HWND hwnd, UINT mesg, WPARAM wParam, LPARAM lParam );
- LRESULT CALLBACK SubClassRichEditProc( HWND hwnd, UINT mesg, WPARAM wParam, LPARAM lParam );
- struct sSEARCHEDIT{
- GETSIZE_PROC_TYPE myf_GetSize;
- GETSTRING_PROC_TYPE myf_GetString;
- sVSCROLLBAR myVScrollBar;
- LISTSCROLLDRAW myListScrollDraw;
- COLORREF ColBackroundEdit;
- };
- class SEARCHEDIT{
- public:
- SEARCHEDIT(sSEARCHEDIT *wsk);
- ~SEARCHEDIT();
- bool Create(int x, int y, int Width, int Height, int ID, HWND hParent);
- bool Destroy();
- bool Execute(UINT message, WPARAM wParam, LPARAM lParam);
- HWND hWindow();
- void ActualizeWindowInfo(WINDOWINFO *wsk);
- int GetX();
- int GetY();
- int GetWidth();
- int GetHeight();
- void SetPos(POINT newPos);
- void SetSize(POINT newSize);
- int GetID();
- private:
- HWND hwnd;
- HINSTANCE hInstance;
- WINDOWINFO WindowInfo;
- HWND hRichEdit;
- LISTSCROLL *hListScroll;
- map<string, int> Data;
- struct sSEARCHEDIT sSearchStruct;
- POINT StartSize;
- void f_Resize();
- void f_Update();
- void f_LSB_FillMap();
- void f_LSB_CreateLSB();
- void f_LSB_DestroyLSB();
- void Proc_WM_PAINT(WPARAM wParam, LPARAM lParam);
- void Proc_WM_DESTROY(WPARAM wParam, LPARAM lParam);
- void Proc_WM_COMMAND(WPARAM wParam, LPARAM lParam);
- void Proc_WM_MOUSEMOVE(WPARAM wParam, LPARAM lParam);
- void Proc_WM_LBUTTONDOWN(WPARAM wParam, LPARAM lParam);
- };
- struct sSUBPROCSTRUCT{
- WNDPROC ParentProc;
- WNDPROC oldProc;
- SEARCHEDIT *wsk;
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement