ReactOS  0.4.13-dev-259-g5ca9c9c
precomp.h File Reference
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
#include <tchar.h>
#include <commctrl.h>
#include "resource.h"
#include "tooldock.h"
#include "imgedwnd.h"
#include "mainwnd.h"
#include "imageprop.h"
#include "misc.h"
Include dependency graph for precomp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _FLT_WND
 

Macros

#define MAX_KEY_LENGTH   256
 
#define NUM_MAINTB_IMAGES   10
 
#define TB_BMP_WIDTH   16
 
#define TB_BMP_HEIGHT   16
 
#define TOOLS   0
 
#define COLORS   1
 
#define HISTORY   2
 

Typedefs

typedef struct _FLT_WND FLT_WND
 
typedef struct _FLT_WNDPFLT_WND
 

Functions

INT_PTR CALLBACK AboutDialogProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 
VOID FileInitialize (HWND hwnd)
 
BOOL DoOpenFile (HWND hwnd, LPTSTR lpFileName, LPTSTR lpName)
 
BOOL DoSaveFile (HWND hwnd)
 
BOOL FloatToolbarCreateToolsGui (PMAIN_WND_INFO Info)
 
BOOL FloatToolbarCreateColorsGui (PMAIN_WND_INFO Info)
 
BOOL FloatToolbarCreateHistoryGui (PMAIN_WND_INFO Info)
 
BOOL InitFloatWndClass (VOID)
 
VOID UninitFloatWndImpl (VOID)
 
BOOL ShowHideWindow (HWND hwnd)
 
VOID FillFontStyleComboList (HWND hwndCombo)
 
VOID FillFontSizeComboList (HWND hwndCombo)
 
VOID MakeFlatCombo (HWND hwndCombo)
 

Variables

HINSTANCE hInstance
 
HANDLE ProcessHeap
 

Macro Definition Documentation

◆ COLORS

#define COLORS   1

Definition at line 24 of file precomp.h.

◆ HISTORY

#define HISTORY   2

Definition at line 25 of file precomp.h.

◆ MAX_KEY_LENGTH

#define MAX_KEY_LENGTH   256

Definition at line 18 of file precomp.h.

◆ NUM_MAINTB_IMAGES

#define NUM_MAINTB_IMAGES   10

Definition at line 19 of file precomp.h.

◆ TB_BMP_HEIGHT

#define TB_BMP_HEIGHT   16

Definition at line 21 of file precomp.h.

◆ TB_BMP_WIDTH

#define TB_BMP_WIDTH   16

Definition at line 20 of file precomp.h.

◆ TOOLS

#define TOOLS   0

Definition at line 23 of file precomp.h.

Typedef Documentation

◆ FLT_WND

◆ PFLT_WND

Function Documentation

◆ AboutDialogProc()

INT_PTR CALLBACK AboutDialogProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 13 of file about.c.

14 {
15  switch (message)
16  {
17  case WM_INITDIALOG:
18  {
19  HWND hLicenseEditWnd;
20 
21  hLicenseEditWnd = GetDlgItem(hDlg,
23  if (hLicenseEditWnd)
24  {
25  LPWSTR lpString;
26 
27  if (AllocAndLoadString(&lpString,
28  hInstance,
29  IDS_LICENSE))
30  {
31  SetWindowTextW(hLicenseEditWnd,
32  lpString);
33 
34  LocalFree(lpString);
35  }
36  }
37 
38  return TRUE;
39  }
40 
41  case WM_COMMAND:
42 
43  if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
44  {
45  EndDialog(hDlg,
46  LOWORD(wParam));
47  return TRUE;
48  }
49 
50  break;
51  }
52 
53  return FALSE;
54 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
static INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
Definition: misc.c:60
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
HINSTANCE hInstance
Definition: charmap.c:20
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1716
#define IDS_LICENSE
Definition: resource.h:28
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1715
#define LOWORD(l)
Definition: pedump.c:82
#define IDC_LICENSE_EDIT
Definition: resource.h:20

◆ DoOpenFile()

BOOL DoOpenFile ( HWND  hwnd,
LPTSTR  lpFileName,
LPTSTR  lpName 
)

Definition at line 27 of file opensave.c.

30 {
31  DWORD err;
32  /*static TCHAR Filter[] = _T("All image files (*.gif,*.bmp,*.jpg,*.jpeg,*.tif,*.png)\0*.gif,*.bmp,*.jpg,*.jpeg,*.tif,*.png\0") \
33  _T("All files (*.*)\0*.*\0") \
34  _T("Graphics Interchange format (*gif)\0*.gif\0") \
35  _T("Windows Bitmap (*bmp)\0*.bmp\0") \
36  _T("JPEG File Interchange Format (*jpg,*.jpeg)\0*.jpg,*.jpeg\0") \
37  _T("TAG Image File Format (*tif)\0*.tif\0") \
38  _T("Portable Network Graphics (*png)\0*.png\0\0");*/
39 
40  static TCHAR Filter[] = _T("Windows Bitmap (*.bmp)\0*.bmp\0");
41 
43  ofn.lpstrFile = szFileName;
44  ofn.lpstrFileTitle = szTitleName;
46 
47  if (GetOpenFileName(&ofn))
48  {
49  return TRUE;
50  }
51 
53 
54  if (err != CDERR_GENERALCODES)
55  MessageBox(NULL, _T("Open file failed"), NULL, 0);
56 
57  return FALSE;
58 }
#define CDERR_GENERALCODES
Definition: cderr.h:5
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
#define OFN_EXPLORER
Definition: commdlg.h:104
#define TRUE
Definition: types.h:120
LPSTR lpstrFileTitle
Definition: commdlg.h:338
#define GetOpenFileName
Definition: commdlg.h:665
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
smooth NULL
Definition: ftsmooth.c:416
char TCHAR
Definition: xmlstorage.h:189
#define _T(x)
Definition: vfdio.h:22
static OPENFILENAME ofn
Definition: opensave.c:3
unsigned long DWORD
Definition: ntddk_ex.h:95
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define MessageBox
Definition: winuser.h:5688
#define err(...)
LPSTR lpstrFile
Definition: commdlg.h:336
LPCSTR lpstrFilter
Definition: commdlg.h:332
DWORD WINAPI CommDlgExtendedError(void)
Definition: cdlg32.c:139
DWORD Flags
Definition: commdlg.h:342

◆ DoSaveFile()

BOOL DoSaveFile ( HWND  hwnd)

Definition at line 63 of file opensave.c.

64 {
65  TCHAR szFileName[MAX_PATH] = _T("");
66  static TCHAR Filter[] = _T("Graphics Interchange format (*gif)\0*.gif\0") \
67  _T("Windows Bitmap (*bmp)\0*.bmp\0") \
68  _T("JPEG File Interchange Format (*jpg,*.jpeg)\0*.jpg,*.jpeg\0") \
69  _T("TAG Image File Format (*tif)\0*.tif\0") \
70  _T("Portable Network Graphics (*png)\0*.png\0\0");
71 
73  ofn.lpstrFile = szFileName;
75 
76  if (GetSaveFileName(&ofn))
77  {
78  if (DoWriteFile(szFileName))
79  return TRUE;
80  }
81 
83  MessageBox(NULL, _T("Save to file failed"), NULL, 0);
84 
85  return FALSE;
86 }
#define CDERR_GENERALCODES
Definition: cderr.h:5
#define OFN_EXPLORER
Definition: commdlg.h:104
#define TRUE
Definition: types.h:120
#define GetSaveFileName
Definition: commdlg.h:666
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
smooth NULL
Definition: ftsmooth.c:416
static BOOL DoWriteFile(LPCTSTR pszFileName)
Definition: opensave.c:20
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
char TCHAR
Definition: xmlstorage.h:189
#define _T(x)
Definition: vfdio.h:22
static OPENFILENAME ofn
Definition: opensave.c:3
#define MAX_PATH
Definition: compat.h:26
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
#define MessageBox
Definition: winuser.h:5688
LPSTR lpstrFile
Definition: commdlg.h:336
#define OFN_OVERWRITEPROMPT
Definition: commdlg.h:116
LPCSTR lpstrFilter
Definition: commdlg.h:332
DWORD WINAPI CommDlgExtendedError(void)
Definition: cdlg32.c:139
DWORD Flags
Definition: commdlg.h:342

◆ FileInitialize()

VOID FileInitialize ( HWND  hwnd)

Definition at line 8 of file opensave.c.

9 {
10  ZeroMemory(&ofn, sizeof(ofn));
11  ofn.lStructSize = sizeof(OPENFILENAME);
12  ofn.hwndOwner = hwnd;
15  ofn.lpstrDefExt = _T("bmp");
16 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HWND hwndOwner
Definition: commdlg.h:330
#define ZeroMemory
Definition: winbase.h:1635
LPCSTR lpstrDefExt
Definition: commdlg.h:345
DWORD nMaxFile
Definition: commdlg.h:337
OPENFILENAMEA OPENFILENAME
Definition: commdlg.h:657
#define _T(x)
Definition: vfdio.h:22
static OPENFILENAME ofn
Definition: opensave.c:3
#define MAX_PATH
Definition: compat.h:26
DWORD lStructSize
Definition: commdlg.h:329
DWORD nMaxFileTitle
Definition: commdlg.h:339

◆ FillFontSizeComboList()

VOID FillFontSizeComboList ( HWND  hwndCombo)

Definition at line 83 of file font.c.

84 {
85  LOGFONT lf = { 0 };
86  HDC hdc = GetDC(hwndCombo);
87 
88  /* default size */
89  INT cursize = 12;
90  INT i, count, nearest = 0;
91 
93 
94  SendMessage(hwndCombo,
95  WM_SETFONT,
96  (WPARAM)hFont,
97  0);
98 
100  lf.lfPitchAndFamily = 0;
101 
102  /* empty the list */
103  SendMessage(hwndCombo,
105  0,
106  0);
107 
108  /* enumerate font sizes */
110  &lf,
112  (LPARAM)hwndCombo,
113  0);
114 
115  /* set selection to first item */
116  count = (INT)SendMessage(hwndCombo,
117  CB_GETCOUNT,
118  0,
119  0);
120 
121  for(i = 0; i < count; i++)
122  {
123  INT n = (INT)SendMessage(hwndCombo,
125  i,
126  0);
127 
128  if (n <= cursize)
129  nearest = i;
130  }
131 
132  SendMessage(hwndCombo,
133  CB_SETCURSEL,
134  nearest,
135  0);
136 
137  ReleaseDC(hwndCombo,
138  hdc);
139 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
HDC WINAPI GetDC(_In_opt_ HWND)
#define CB_GETITEMDATA
Definition: winuser.h:1911
GLuint GLuint GLsizei count
Definition: gl.h:1545
static HDC
Definition: imagelist.c:92
GLdouble n
Definition: glext.h:7729
BYTE lfCharSet
Definition: dimm.idl:50
UINT_PTR WPARAM
Definition: windef.h:207
#define DEFAULT_CHARSET
Definition: wingdi.h:383
int32_t INT
Definition: typedefs.h:56
HFONT hFont
Definition: main.c:53
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
LONG_PTR LPARAM
Definition: windef.h:208
BYTE lfPitchAndFamily
Definition: dimm.idl:54
#define CB_RESETCONTENT
Definition: winuser.h:1920
static UINT UINT count
Definition: font.c:44
int CALLBACK EnumFontSizes(ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, DWORD FontType, LPARAM lParam)
Definition: font.c:4
#define DEFAULT_GUI_FONT
Definition: wingdi.h:908
HDC hdc
Definition: main.c:9
#define CB_SETCURSEL
Definition: winuser.h:1922
static INT(WINAPI *pAddFontResourceExA)(LPCSTR
#define EnumFontFamiliesEx
Definition: wingdi.h:4429
#define WM_SETFONT
Definition: winuser.h:1632
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
FONTENUMPROCA FONTENUMPROC
Definition: wingdi.h:2880
#define SendMessage
Definition: winuser.h:5709
#define CB_GETCOUNT
Definition: winuser.h:1903

Referenced by MainWndCreateToolbarClient().

◆ FillFontStyleComboList()

VOID FillFontStyleComboList ( HWND  hwndCombo)

Definition at line 144 of file font.c.

145 {
146  HDC hdc = GetDC(hwndCombo);
147  LOGFONT lf;
148 
149  /* FIXME: draw each font in its own style */
151  SendMessage(hwndCombo,
152  WM_SETFONT,
153  (WPARAM)hFont,
154  0);
155 
156  /* FIXME: set this in relation to the widest string */
157  SendMessage(hwndCombo, CB_SETDROPPEDWIDTH, 150, 0);
158 
159  lf.lfCharSet = ANSI_CHARSET; // DEFAULT_CHARSET;
160  lf.lfFaceName[0] = _T('\0'); // all fonts
161  lf.lfPitchAndFamily = 0;
162 
163  /* store the list of fonts in the combo */
165  &lf,
167  (LPARAM)hwndCombo, 0);
168 
169  ReleaseDC(hwndCombo,
170  hdc);
171 
172  /* set default to Arial */
173  SendMessage(hwndCombo,
175  -1,
176  (LPARAM)_T("Arial"));
177 
178 
179 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
HDC WINAPI GetDC(_In_opt_ HWND)
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1923
static HDC
Definition: imagelist.c:92
BYTE lfCharSet
Definition: dimm.idl:50
UINT_PTR WPARAM
Definition: windef.h:207
HFONT hFont
Definition: main.c:53
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
LONG_PTR LPARAM
Definition: windef.h:208
BYTE lfPitchAndFamily
Definition: dimm.idl:54
int CALLBACK EnumFontNames(ENUMLOGFONTEX *lpelfe, NEWTEXTMETRICEX *lpntme, DWORD FontType, LPARAM lParam)
Definition: font.c:43
#define _T(x)
Definition: vfdio.h:22
#define DEFAULT_GUI_FONT
Definition: wingdi.h:908
HDC hdc
Definition: main.c:9
#define CB_SELECTSTRING
Definition: winuser.h:1921
#define EnumFontFamiliesEx
Definition: wingdi.h:4429
#define WM_SETFONT
Definition: winuser.h:1632
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
FONTENUMPROCA FONTENUMPROC
Definition: wingdi.h:2880
#define SendMessage
Definition: winuser.h:5709
CHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:55
#define ANSI_CHARSET
Definition: wingdi.h:382

◆ FloatToolbarCreateColorsGui()

BOOL FloatToolbarCreateColorsGui ( PMAIN_WND_INFO  Info)

Definition at line 170 of file floatwindow.c.

171 {
172  HWND hColorPicker;
173  HWND hHueSlider;
174  HWND hMouseButton;
175  HWND hMore;
176  RECT rect;
177  HBITMAP hMoreBitmap;
178 
179  GetClientRect(Info->fltColors->hSelf,
180  &rect);
181 
182  hColorPicker = CreateWindowEx(0,
183  WC_STATIC,
184  NULL,
186  2,
187  2,
188  (int) (rect.right * 0.65),
189  rect.bottom - 2,
190  Info->fltColors->hSelf,
191  NULL,
192  hInstance,
193  NULL);
194  if (hColorPicker == NULL)
195  return FALSE;
196 
197  hHueSlider = CreateWindowEx(0,
198  WC_STATIC,
199  NULL,
201  145,
202  35,
203  25,
204  135,
205  Info->fltColors->hSelf,
206  NULL,
207  hInstance,
208  NULL);
209  if (hHueSlider == NULL)
210  return FALSE;
211 
212  hMouseButton = CreateWindowEx(0,
213  WC_COMBOBOX,
214  NULL,
216  118, 5, 75, 25,
217  Info->fltColors->hSelf,
218  NULL,
219  hInstance,
220  NULL);
221  if (hMouseButton == NULL)
222  return FALSE;
223 
224  MakeFlatCombo(hMouseButton);
225 
226  /* temp, just testing */
227  SendMessage(hMouseButton, CB_ADDSTRING, 0, (LPARAM)_T("Primary"));
228  SendMessage(hMouseButton, CB_ADDSTRING, 0, (LPARAM)_T("Secondary"));
229  SendMessage(hMouseButton, CB_SETCURSEL, 0, 0);
230 
231 
233  WC_BUTTON,
234  NULL,
236  rect.right - 15,
237  rect.bottom - 15,
238  15, 15,
239  Info->fltColors->hSelf,
240  NULL,
241  hInstance,
242  NULL);
243  if (hMore == NULL)
244  return FALSE;
245 
246  hMoreBitmap = (HBITMAP)LoadImage(hInstance,
248  IMAGE_BITMAP,
249  12,
250  11,
252  if (hMoreBitmap != NULL)
253  {
254  SendMessage(hMore,
255  BM_SETIMAGE,
256  IMAGE_BITMAP,
257  (LPARAM)hMoreBitmap);
258  }
259 
260 
261  /* temp functions for playing about with possible layouts */
262  FloatWindowPaintHueSlider(hHueSlider);
263  FloatWindowPaintColorPicker(hColorPicker);
264 
265  if (hColorPicker != NULL)
266  {
267  HDC hDc = GetDC(hColorPicker);
268  TextOut(hDc, 8, 75, _T("Possible layout?"), 16);
269  ReleaseDC(hColorPicker, hDc);
270  }
271 
272  return TRUE;
273 
274 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define TRUE
Definition: types.h:120
#define WC_BUTTON
Definition: commctrl.h:4597
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
#define WS_CHILD
Definition: pedump.c:617
#define BM_SETIMAGE
Definition: winuser.h:1883
& rect
Definition: startmenu.cpp:1413
struct TraceInfo Info
HINSTANCE hInstance
Definition: charmap.c:20
#define WC_STATIC
Definition: commctrl.h:4653
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define CreateWindowEx
Definition: winuser.h:5621
#define CB_ADDSTRING
Definition: winuser.h:1897
smooth NULL
Definition: ftsmooth.c:416
VOID FloatWindowPaintColorPicker(HWND hColorPicker)
Definition: floatwindow.c:115
LONG_PTR LPARAM
Definition: windef.h:208
#define WC_COMBOBOX
Definition: commctrl.h:4689
#define IDB_COLORSMORE
Definition: resource.h:181
#define _T(x)
Definition: vfdio.h:22
VOID FloatWindowPaintHueSlider(HWND hHueSlider)
Definition: floatwindow.c:142
#define LR_LOADTRANSPARENT
Definition: winuser.h:1083
#define BS_BITMAP
Definition: winuser.h:258
#define CB_SETCURSEL
Definition: winuser.h:1922
#define LR_LOADMAP3DCOLORS
Definition: winuser.h:1087
VOID MakeFlatCombo(HWND hwndCombo)
Definition: custcombo.c:199
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define CBS_DROPDOWN
Definition: winuser.h:283
#define IMAGE_BITMAP
Definition: winuser.h:211
#define SendMessage
Definition: winuser.h:5709
#define TextOut
Definition: wingdi.h:4461
#define LoadImage
Definition: winuser.h:5681
static HBITMAP
Definition: button.c:44
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_EX_STATICEDGE
Definition: winuser.h:403

Referenced by MainWndCreateFloatWindows().

◆ FloatToolbarCreateHistoryGui()

BOOL FloatToolbarCreateHistoryGui ( PMAIN_WND_INFO  Info)

Definition at line 278 of file floatwindow.c.

279 {
280  HWND hList;
281  HWND hButtons;
282  HIMAGELIST hImageList;
283  INT NumButtons;
284 
285  hList = CreateWindowEx(0,
286  WC_LISTBOX,
287  NULL,
289  0, 0, 143, 100,
290  Info->fltHistory->hSelf,
291  NULL,
292  hInstance,
293  NULL);
294  if (hList == NULL)
295  return FALSE;
296 
297  NumButtons = sizeof(HistoryButtons) / sizeof(HistoryButtons[0]);
298  hButtons = CreateWindowEx(0,
300  NULL,
302  0, 0, 0, 0,
303  Info->fltHistory->hSelf,
304  NULL,
305  hInstance,
306  NULL);
307  if (hButtons != NULL)
308  {
309  SendMessage(hButtons,
311  sizeof(ToolsButtons[0]),
312  0);
313 
314  SendMessage(hButtons,
316  0,
317  (LPARAM)MAKELONG(10, 10));
318 
319  hImageList = InitImageList(NumButtons,
320  IDB_HISTBACK);
321 
324  0,
325  (LPARAM)hImageList));
326 
327  SendMessage(hButtons,
329  0,
330  MAKELONG(18, 16));
331 
332  SendMessage(hButtons,
334  NumButtons,
336 
337  return TRUE;
338  }
339 
340  return FALSE;
341 }
#define TB_SETBUTTONSIZE
Definition: commctrl.h:1107
#define WC_LISTBOX
Definition: commctrl.h:4683
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1106
#define TRUE
Definition: types.h:120
#define LBS_EXTENDEDSEL
Definition: pedump.c:689
#define WS_CHILD
Definition: pedump.c:617
TBBUTTON ToolsButtons[]
Definition: floatwindow.c:9
int32_t INT
Definition: typedefs.h:56
struct TraceInfo Info
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:893
#define CCS_NODIVIDER
Definition: commctrl.h:2220
HINSTANCE hInstance
Definition: charmap.c:20
TBBUTTON HistoryButtons[]
Definition: floatwindow.c:35
#define CreateWindowEx
Definition: winuser.h:5621
#define TOOLBARCLASSNAME
Definition: commctrl.h:918
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_BOTTOM
Definition: commctrl.h:2216
#define TB_SETIMAGELIST
Definition: commctrl.h:1122
HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height, ULONG type)
Definition: misc.c:219
#define TB_ADDBUTTONS
Definition: commctrl.h:1243
#define TB_SETBITMAPSIZE
Definition: commctrl.h:1108
#define IDB_HISTBACK
Definition: resource.h:175
HWND hList
Definition: livecd.c:10
#define SendMessage
Definition: winuser.h:5709
#define WS_VISIBLE
Definition: pedump.c:620
#define TBSTYLE_FLAT
Definition: commctrl.h:964

Referenced by MainWndCreateFloatWindows().

◆ FloatToolbarCreateToolsGui()

BOOL FloatToolbarCreateToolsGui ( PMAIN_WND_INFO  Info)

Definition at line 55 of file floatwindow.c.

56 {
57  HWND hTb;
58  HIMAGELIST hImageList;
59  INT NumButtons;
60 
61  NumButtons = sizeof(ToolsButtons) / sizeof(ToolsButtons[0]);
62 
63  hTb = CreateWindowEx(0,
65  NULL,
67  0, 0, 32, 200,
68  Info->fltTools->hSelf,
69  NULL,
70  hInstance,
71  NULL);
72  if (hTb != NULL)
73  {
74  SendMessage(hTb,
76  0,
78 
79  SendMessage(hTb,
81  sizeof(ToolsButtons[0]),
82  0);
83 
84  SendMessage(hTb,
86  0,
87  (LPARAM)MAKELONG(16, 16));
88 
89  hImageList = InitImageList(NumButtons,
91 
94  0,
95  (LPARAM)hImageList));
96 
97  SendMessage(hTb,
99  NumButtons,
101 
102  SendMessage(hTb,
103  TB_AUTOSIZE,
104  0,
105  0);
106 
107  return TRUE;
108  }
109 
110  return FALSE;
111 }
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1106
#define TRUE
Definition: types.h:120
#define TBSTYLE_EX_HIDECLIPPEDBUTTONS
Definition: commctrl.h:985
#define WS_CHILD
Definition: pedump.c:617
TBBUTTON ToolsButtons[]
Definition: floatwindow.c:9
int32_t INT
Definition: typedefs.h:56
struct TraceInfo Info
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:893
#define CCS_NODIVIDER
Definition: commctrl.h:2220
HINSTANCE hInstance
Definition: charmap.c:20
#define TB_AUTOSIZE
Definition: commctrl.h:1109
#define CreateWindowEx
Definition: winuser.h:5621
#define TOOLBARCLASSNAME
Definition: commctrl.h:918
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TB_SETIMAGELIST
Definition: commctrl.h:1122
HIMAGELIST InitImageList(UINT StartResource, UINT EndResource, UINT Width, UINT Height, ULONG type)
Definition: misc.c:219
#define TB_ADDBUTTONS
Definition: commctrl.h:1243
#define TB_SETBITMAPSIZE
Definition: commctrl.h:1108
#define IDB_TOOLSRECTSEL
Definition: resource.h:154
#define SendMessage
Definition: winuser.h:5709
#define TBSTYLE_WRAPABLE
Definition: commctrl.h:962
#define WS_VISIBLE
Definition: pedump.c:620
#define TBSTYLE_FLAT
Definition: commctrl.h:964
#define TB_SETEXTENDEDSTYLE
Definition: commctrl.h:1162

Referenced by MainWndCreateFloatWindows().

◆ InitFloatWndClass()

BOOL InitFloatWndClass ( VOID  )

Definition at line 604 of file floatwindow.c.

605 {
606  WNDCLASSEX wc = {0};
607 
608  wc.cbSize = sizeof(WNDCLASSEX);
609  wc.style = CS_HREDRAW | CS_VREDRAW;
611  wc.hInstance = hInstance;
612  wc.hIcon = NULL;
613  wc.hCursor = LoadCursor(NULL,
614  IDC_ARROW);
615  wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
617  wc.hIconSm = NULL;
618 
619  return RegisterClassEx(&wc) != (ATOM)0;
620 }
UINT style
Definition: winuser.h:3155
#define RegisterClassEx
Definition: winuser.h:5703
HCURSOR hCursor
Definition: winuser.h:3161
WNDPROC lpfnWndProc
Definition: winuser.h:3156
LPCSTR lpszClassName
Definition: winuser.h:3164
WORD ATOM
Definition: dimm.idl:113
#define CS_HREDRAW
Definition: winuser.h:648
HICON hIconSm
Definition: winuser.h:3165
HINSTANCE hInstance
Definition: charmap.c:20
HINSTANCE hInstance
Definition: winuser.h:3159
smooth NULL
Definition: ftsmooth.c:416
UINT cbSize
Definition: winuser.h:3154
HBRUSH hbrBackground
Definition: winuser.h:3162
#define CS_VREDRAW
Definition: winuser.h:653
LRESULT CALLBACK FloatToolbarWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: floatwindow.c:454
static const TCHAR szFloatWndClass[]
Definition: floatwindow.c:3
HICON hIcon
Definition: winuser.h:3160
#define COLOR_BTNFACE
Definition: winuser.h:918
#define LoadCursor
Definition: winuser.h:5678
#define IDC_ARROW
Definition: winuser.h:682
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5585

Referenced by _tWinMain().

◆ MakeFlatCombo()

VOID MakeFlatCombo ( HWND  hwndCombo)

Definition at line 199 of file custcombo.c.

200 {
201  LONG_PTR OldComboProc;
202 
203  /* Remember old window procedure */
204  OldComboProc = GetWindowLongPtr(hwndCombo, GWLP_WNDPROC);
205  SetWindowLongPtr(hwndCombo,
207  OldComboProc);
208 
209  /* Perform the subclass */
210  SetWindowLongPtr(hwndCombo,
211  GWLP_WNDPROC,
213 }
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_USERDATA
Definition: treelist.c:63
LRESULT WINAPI FlatComboProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: custcombo.c:5
#define GWLP_WNDPROC
Definition: treelist.c:66
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define GetWindowLongPtr
Definition: treelist.c:73

Referenced by FloatToolbarCreateColorsGui(), and MainWndCreateToolbarClient().

◆ ShowHideWindow()

BOOL ShowHideWindow ( HWND  hwnd)

Definition at line 45 of file floatwindow.c.

46 {
47  if (IsWindowVisible(hwnd))
48  return ShowWindow(hwnd, SW_HIDE);
49  else
50  return ShowWindow(hwnd, SW_SHOW);
51 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define SW_HIDE
Definition: winuser.h:762
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:769
BOOL WINAPI IsWindowVisible(_In_ HWND)

Referenced by FloatToolbarWndProc(), MainWndCommand(), and MainWndCreateFloatWindows().

◆ UninitFloatWndImpl()

VOID UninitFloatWndImpl ( VOID  )

Definition at line 623 of file floatwindow.c.

624 {
626  hInstance);
627 }
HINSTANCE hInstance
Definition: charmap.c:20
static const TCHAR szFloatWndClass[]
Definition: floatwindow.c:3
#define UnregisterClass
Definition: winuser.h:5727

Referenced by _tWinMain().

Variable Documentation

◆ hInstance

HINSTANCE hInstance

Definition at line 20 of file charmap.c.

◆ ProcessHeap

HANDLE ProcessHeap
  • Internal Headers */

Definition at line 15 of file servman.c.