CodePudding user response:
# define SAVELOAD 3301# define COMMUTECOMB 3302
LRESULT a CALLBACK MyWndProc (HWND HWND, UINT uMsg,
WPARAM WPARAM, LPARAM LPARAM) {
The switch (uMsg) {
Case WM_CREATE message handler: {
LPCREATESTRUCT PCS=(lParam LPCREATESTRUCT);
//general button -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
HWND hBtnSL=CreateWindow (L "Button," L "to save and print",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_BITMAP,
380, 290, 192, 32, HWND,
HMENU SAVELOAD, PCS - & gt; HInstance, NULL);
HBITMAP hbmpSL=(HBITMAP) LoadImage (NULL,
L "images \ \ Save& Print. BMP,
"IMAGE_BITMAP, 185, 30, LR_LOADFROMFILE);
SendMessage (hBtnSL BM_SETIMAGE, (WPARAM) IMAGE_BITMAP, (LPARAM) hbmpSL);
//combo box and unit -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
HWND commuteCOMB=CreateWindow (L "comboBox," L "commute",
WS_CHILD | WS_VISIBLE | CBS_DROPDOWN,
30, 30, 200, 100, the HWND, HMENU COMMUTECOMB, PCS - & gt; HInstance, NULL);
SendMessage (commuteCOMB, CB_ADDSTRING, 0, (LPARAM) L "books");
ComboBox_ResetContent (commuteCOMB);
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
return 0;
}
Case (UINT) WM_DESTROY: {
The PostQuitMessage (0);
return 0;
}
Case WM_COMMAND: {
The switch (LOWORD (wParam))
{
Case SAVELOAD: {
WinExec (" dist \ \ Excel_mani exe, "SW_SHOWMAXIMIZED);
MessageBox (HWND, you click the first button, "" L, L" tip ", MB_OK | MB_ICONINFORMATION);
break;
}
Default:
break;
}
return 0;
}
Default:
Return DefWindowProc (HWND, uMsg wParam, lParam);
}
return 0;
}
//# include & lt; Mysql. H> If the configuration ok can include this file directly
Int WinMain (HINSTANCE HINSTANCE, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow) {
MSG MSG.
WNDCLASS WND;
WND. CbClsExtra=0;
WND. CbWndExtra=0;
WND. HbrBackground=(HBRUSH) (GetStockObject (WHITE_BRUSH));
WND. HCursor=LoadCursor (NULL, IDC_ARROW);
WND. HIcon=LoadIcon (NULL, IDI_APPLICATION);
WND. LpfnWndProc=MyWndProc;
WND. LpszClassName=L "estab";
WND. LpszMenuName=NULL;
WND. Style=CS_DBLCLKS;
WND. HInstance=hInstance;
RegisterClass (& amp; WND);
HWND HWND=CreateWindow (L "estab," L "entrance management procedures",
WS_VISIBLE | WS_EX_LAYERED | WS_OVERLAPPED |
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX,
100, 100, 600, 380, NULL, NULL, hInstance, NULL);
ShowWindow (hWnd, nCmdShow);
UpdateWindow (hWnd);
While (GetMessage (& amp; MSG, NULL, 0, 0)) {//(MSG), (window handle), 0 (minimum integer), and 0 (top))) {
TranslateMessage (& amp; MSG);
DispatchMessage (& amp; MSG);
}
//send_query (" select * from handler_info ");
//WinExec (" dist \ \ Excel_mani exe, "SW_SHOWMAXIMIZED);
}
CodePudding user response:
Beg god to reassure, feeling should not be not include the header fileCodePudding user response:
# include & lt; Stdio. H># include "mysql. H"
# include & lt; Windows. H>
# include & lt; Iostream>
This is my contains header files
CodePudding user response:
Windowsx. H