Windows多文档窗口编程中,需要注意的以下几点:

1、主窗口与文档窗口之间还有一个Client Window。

2、创建文档窗口。通常认为创建子窗口就用CreateWindow,但是MDI中创建文档窗口时,用的是发送消息的方式。具体的CreateWindow的工作由Client Window来完成。该消息是WM_MDICREATE。

3、主菜单的变化。切换到不同的文档窗口时,主菜单会随文档窗口的类型、内容等变化。文档子窗口是通过处理WM_MDIACTIVATE消息完成的。

4、主窗口默认的消息处理函数不是DefWindowProc,而是DefFrameProc。文档窗口和主窗口一样,默认的消息处理函数也变了,是DefMDIChildProc。它们的原型分别是

LRESULT DefFrameProc(      
    HWND hWnd,
    HWND hWndMDIClient,
    UINT uMsg,
    WPARAM wParam,
    LPARAM lParam
);
LRESULT DefMDIChildProc(
    HWND hWnd,
    UINT uMsg,
    WPARAM wParam,
    LPARAM lParam
);
<<Windows Programming>>第19章源码如下:
MDIDEMO.H
/*-----------------------
MDIDEMO.H header file
-----------------------*/ #define EXPORT __declspec (dllexport) #define INIT_MENU_POS 0
#define HELLO_MENU_POS 2
#define RECT_MENU_POS 1 #define IDM_NEWHELLO 10
#define IDM_NEWRECT 11
#define IDM_CLOSE 12
#define IDM_EXIT 13 #define IDM_BLACK 20
#define IDM_RED 21
#define IDM_GREEN 22
#define IDM_BLUE 23
#define IDM_WHITE 24 #define IDM_TILE 30
#define IDM_CASCADE 31
#define IDM_ARRANGE 32
#define IDM_CLOSEALL 33 #define IDM_FIRSTCHILD 100
MDIDEMO.C
/*--------------------------------------------------------
MDIDEMO.C -- Multiple Document Interface Demonstration
(c) Charles Petzold, 1996
--------------------------------------------------------*/ #include <windows.h>
#include <stdlib.h>
#include "mdidemo.h" LRESULT CALLBACK FrameWndProc (HWND, UINT, WPARAM, LPARAM) ;
BOOL CALLBACK CloseEnumProc (HWND, LPARAM) ;
LRESULT CALLBACK HelloWndProc (HWND, UINT, WPARAM, LPARAM) ;
LRESULT CALLBACK RectWndProc (HWND, UINT, WPARAM, LPARAM) ; // structure for storing data unique to each Hello child window
typedef struct tagHELLODATA{
UINT iColor ;
COLORREF clrText ;
}HELLODATA, *LPHELLODATA ; // structure for storing data unique to each Rect child window
typedef struct tagRECTDATA{
short cxClient ;
short cyClient ;
}RECTDATA, *LPRECTDATA ; // global variables
char szFrameClass[] = "MdiFrame" ;
char szHelloClass[] = "MdiHelloChild" ;
char szRectClass[] = "MdiRectChild" ;
HINSTANCE hInst ;
HMENU hMenuInit, hMenuHello, hMenuRect ;
HMENU hMenuInitWindow, hMenuHelloWindow, hMenuRectWindow ; int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
HACCEL hAccel ;
HWND hwndFrame, hwndClient ;
MSG msg ;
WNDCLASSEX wndclass ; hInst = hInstance ; if (!hPrevInstance)
{
// Register the frame window class
wndclass.cbSize = sizeof (wndclass) ;
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = FrameWndProc ;
wndclass.cbClsExtra = ;
wndclass.cbWndExtra = ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) (COLOR_APPWORKSPACE + ) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = szFrameClass ;
wndclass.hIconSm = LoadIcon (NULL, IDI_APPLICATION) ; RegisterClassEx (&wndclass) ; // Register the Hello child window class
wndclass.cbSize = sizeof (wndclass) ;
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = HelloWndProc ;
wndclass.cbClsExtra = ;
wndclass.cbWndExtra = sizeof (HANDLE) ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = szHelloClass ;
wndclass.hIconSm = LoadIcon (NULL, IDI_APPLICATION) ; RegisterClassEx (&wndclass) ; // Register the Rect child window class
wndclass.cbSize = sizeof (wndclass) ;
wndclass.style = CS_HREDRAW | CS_VREDRAW ;
wndclass.lpfnWndProc = RectWndProc ;
wndclass.cbClsExtra = ;
wndclass.cbWndExtra = sizeof (HANDLE) ;
wndclass.hInstance = hInstance ;
wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION) ;
wndclass.hCursor = LoadCursor (NULL, IDC_ARROW) ;
wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH) ;
wndclass.lpszMenuName = NULL ;
wndclass.lpszClassName = szRectClass ;
wndclass.hIconSm = LoadIcon (NULL, IDI_APPLICATION) ; RegisterClassEx (&wndclass) ;
}
// Obtain handles to three possible menus & submenus
hMenuInit = LoadMenu (hInst, "MdiMenuInit") ;
hMenuHello = LoadMenu (hInst, "MdiMenuHello") ;
hMenuRect = LoadMenu (hInst, "MdiMenuRect") ; hMenuInitWindow = GetSubMenu (hMenuInit, INIT_MENU_POS) ;
hMenuHelloWindow = GetSubMenu (hMenuHello, HELLO_MENU_POS) ;
hMenuRectWindow = GetSubMenu (hMenuRect, RECT_MENU_POS) ; // Load accelerator table
hAccel = LoadAccelerators (hInst, "MdiAccel") ; // Create the frame window
hwndFrame = CreateWindow (szFrameClass, "MDI Demonstration",
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
NULL, hMenuInit, hInstance, NULL) ; hwndClient = GetWindow (hwndFrame, GW_CHILD) ; ShowWindow (hwndFrame, iCmdShow) ;
UpdateWindow (hwndFrame) ; // Enter the modified message loop
while (GetMessage (&msg, NULL, , ))
{
if (!TranslateMDISysAccel (hwndClient, &msg) &&
!TranslateAccelerator (hwndFrame, hAccel, &msg))
{
TranslateMessage (&msg) ;
DispatchMessage (&msg) ;
}
}
// Clean up by deleting unattached menus
DestroyMenu (hMenuHello) ;
DestroyMenu (hMenuRect) ; return msg.wParam ;
} LRESULT CALLBACK FrameWndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
static HWND hwndClient ;
CLIENTCREATESTRUCT clientcreate ;
HWND hwndChild ;
MDICREATESTRUCT mdicreate ; switch (iMsg)
{
case WM_CREATE : // Create the client window
clientcreate.hWindowMenu = hMenuInitWindow ;
clientcreate.idFirstChild = IDM_FIRSTCHILD ;
hwndClient = CreateWindow ("MDICLIENT", NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE,
, , , , hwnd, (HMENU) , hInst,
(LPSTR) &clientcreate) ;
return ; case WM_COMMAND :
switch (wParam)
{
case IDM_NEWHELLO : // Create a Hello child window
mdicreate.szClass = szHelloClass ;
mdicreate.szTitle = "Hello" ;
mdicreate.hOwner = hInst ;
mdicreate.x = CW_USEDEFAULT ;
mdicreate.y = CW_USEDEFAULT ;
mdicreate.cx = CW_USEDEFAULT ;
mdicreate.cy = CW_USEDEFAULT ;
mdicreate.style = ;
mdicreate.lParam = ; hwndChild = (HWND) SendMessage (hwndClient,
WM_MDICREATE, ,
(LPARAM) (LPMDICREATESTRUCT) &mdicreate) ;
return ; case IDM_NEWRECT : // Create a Rect child window
mdicreate.szClass = szRectClass ;
mdicreate.szTitle = "Rectangles" ;
mdicreate.hOwner = hInst ;
mdicreate.x = CW_USEDEFAULT ;
mdicreate.y = CW_USEDEFAULT ;
mdicreate.cx = CW_USEDEFAULT ;
mdicreate.cy = CW_USEDEFAULT ;
mdicreate.style = ;
mdicreate.lParam = ; hwndChild = (HWND) SendMessage (hwndClient,
WM_MDICREATE, ,
(LPARAM) (LPMDICREATESTRUCT) &mdicreate) ;
return ; case IDM_CLOSE : // Close the active window
hwndChild = (HWND) SendMessage (hwndClient,
WM_MDIGETACTIVE, , ) ; if (SendMessage (hwndChild, WM_QUERYENDSESSION, , ))
SendMessage (hwndClient, WM_MDIDESTROY,
(WPARAM) hwndChild, ) ;
return ; case IDM_EXIT : // Exit the program
SendMessage (hwnd, WM_CLOSE, , ) ;
return ; // messages for arranging windows
case IDM_TILE :
SendMessage (hwndClient, WM_MDITILE, , ) ;
return ; case IDM_CASCADE :
SendMessage (hwndClient, WM_MDICASCADE, , ) ;
return ; case IDM_ARRANGE :
SendMessage (hwndClient, WM_MDIICONARRANGE, , ) ;
return ; case IDM_CLOSEALL : // Attempt to close all children
EnumChildWindows (hwndClient, &CloseEnumProc, ) ;
return ; default : // Pass to active child...
hwndChild = (HWND) SendMessage (hwndClient, WM_MDIGETACTIVE, , );
if (IsWindow (hwndChild))
SendMessage (hwndChild, WM_COMMAND, wParam, lParam) ; break ; // ...and then to DefFrameProc
}
break ; case WM_QUERYENDSESSION :
case WM_CLOSE : // Attempt to close all children
SendMessage (hwnd, WM_COMMAND, IDM_CLOSEALL, ) ; if (NULL != GetWindow (hwndClient, GW_CHILD))
return ; break ; // I.e., call DefFrameProc case WM_DESTROY :
PostQuitMessage () ;
return ;
}
// Pass unprocessed messages to DefFrameProc (not DefWindowProc)
return DefFrameProc (hwnd, hwndClient, iMsg, wParam, lParam) ;
} BOOL CALLBACK CloseEnumProc (HWND hwnd, LPARAM lParam)
{
if (GetWindow (hwnd, GW_OWNER)) // Check for icon title
return ; SendMessage (GetParent (hwnd), WM_MDIRESTORE, (WPARAM) hwnd, ) ; if (!SendMessage (hwnd, WM_QUERYENDSESSION, , ))
return ; SendMessage (GetParent (hwnd), WM_MDIDESTROY, (WPARAM) hwnd, ) ;
return ;
} LRESULT CALLBACK HelloWndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
static COLORREF clrTextArray[] = { RGB (, , ),
RGB (, , ),
RGB (, , ),
RGB ( , , ),
RGB (, , ) } ;
static HWND hwndClient, hwndFrame ;
HDC hdc ;
HMENU hMenu ;
LPHELLODATA lpHelloData ;
PAINTSTRUCT ps ;
RECT rect ; switch (iMsg)
{
case WM_CREATE :
// Allocate memory for window private data
lpHelloData = (LPHELLODATA) HeapAlloc (GetProcessHeap (),
HEAP_ZERO_MEMORY,
sizeof (HELLODATA)) ;
lpHelloData->iColor = IDM_BLACK ;
lpHelloData->clrText = RGB (, , ) ;
SetWindowLong (hwnd, , (long) lpHelloData) ; // Save some window handles
hwndClient = GetParent (hwnd) ;
hwndFrame = GetParent (hwndClient) ;
return ; case WM_COMMAND :
switch (wParam)
{
case IDM_BLACK :
case IDM_RED :
case IDM_GREEN :
case IDM_BLUE :
case IDM_WHITE :
// Change the text color
lpHelloData = (LPHELLODATA) GetWindowLong (hwnd, ) ; hMenu = GetMenu (hwndFrame) ; CheckMenuItem (hMenu, lpHelloData->iColor,
MF_UNCHECKED) ;
lpHelloData->iColor = wParam ;
CheckMenuItem (hMenu, lpHelloData->iColor,
MF_CHECKED) ; lpHelloData->clrText =
clrTextArray[wParam - IDM_BLACK] ; InvalidateRect (hwnd, NULL, FALSE) ;
}
return ; case WM_PAINT :
// Paint the window
hdc = BeginPaint (hwnd, &ps) ; lpHelloData = (LPHELLODATA) GetWindowLong (hwnd, ) ;
SetTextColor (hdc, lpHelloData->clrText) ; GetClientRect (hwnd, &rect) ; DrawText (hdc, "Hello, World!", -, &rect,
DT_SINGLELINE | DT_CENTER | DT_VCENTER) ; EndPaint (hwnd, &ps) ;
return ; case WM_MDIACTIVATE :
// Set the Hello menu if gaining focus
if (lParam == (LPARAM) hwnd)
SendMessage (hwndClient, WM_MDISETMENU,
(WPARAM) hMenuHello, (LPARAM) hMenuHelloWindow) ; // Check or uncheck menu item
lpHelloData = (LPHELLODATA) GetWindowLong (hwnd, ) ;
CheckMenuItem (hMenuHello, lpHelloData->iColor,
(lParam == (LPARAM) hwnd) ? MF_CHECKED : MF_UNCHECKED) ; // Set the Init menu if losing focus
if (lParam != (LPARAM) hwnd)
SendMessage (hwndClient, WM_MDISETMENU, (WPARAM) hMenuInit,
(LPARAM) hMenuInitWindow) ; DrawMenuBar (hwndFrame) ;
return ; case WM_QUERYENDSESSION :
case WM_CLOSE :
if (IDOK != MessageBox (hwnd, "OK to close window?", "Hello",
MB_ICONQUESTION | MB_OKCANCEL))
return ; break ; // I.e., call DefMDIChildProc case WM_DESTROY :
lpHelloData = (LPHELLODATA) GetWindowLong (hwnd, ) ;
HeapFree (GetProcessHeap (), , lpHelloData) ;
return ;
}
// Pass unprocessed message to DefMDIChildProc
return DefMDIChildProc (hwnd, iMsg, wParam, lParam) ;
} LRESULT CALLBACK RectWndProc (HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
static HWND hwndClient, hwndFrame ;
HBRUSH hBrush ;
HDC hdc ;
LPRECTDATA lpRectData ;
PAINTSTRUCT ps ;
int xLeft, xRight, yTop, yBottom ;
short nRed, nGreen, nBlue ; switch (iMsg)
{
case WM_CREATE :
// Allocate memory for window private data lpRectData = (LPRECTDATA) HeapAlloc (GetProcessHeap (),
HEAP_ZERO_MEMORY,
sizeof (RECTDATA)) ; SetWindowLong (hwnd, , (long) lpRectData) ; // Start the timer going SetTimer (hwnd, , , NULL) ; // Save some window handles hwndClient = GetParent (hwnd) ;
hwndFrame = GetParent (hwndClient) ;
return ; case WM_SIZE : // If not minimized, save the window size if (wParam != SIZE_MINIMIZED)
{
lpRectData = (LPRECTDATA) GetWindowLong (hwnd, ) ; lpRectData->cxClient = LOWORD (lParam) ;
lpRectData->cyClient = HIWORD (lParam) ;
} break ; // WM_SIZE must be processed by DefMDIChildProc case WM_TIMER : // Display a random rectangle lpRectData = (LPRECTDATA) GetWindowLong (hwnd, ) ; xLeft = rand () % lpRectData->cxClient ;
xRight = rand () % lpRectData->cxClient ;
yTop = rand () % lpRectData->cyClient ;
yBottom = rand () % lpRectData->cyClient ;
nRed = rand () & ;
nGreen = rand () & ;
nBlue = rand () & ; hdc = GetDC (hwnd) ;
hBrush = CreateSolidBrush (RGB (nRed, nGreen, nBlue)) ;
SelectObject (hdc, hBrush) ; Rectangle (hdc, min (xLeft, xRight), min (yTop, yBottom),
max (xLeft, xRight), max (yTop, yBottom)) ; ReleaseDC (hwnd, hdc) ;
DeleteObject (hBrush) ;
return ; case WM_PAINT : // Clear the window InvalidateRect (hwnd, NULL, TRUE) ;
hdc = BeginPaint (hwnd, &ps) ;
EndPaint (hwnd, &ps) ;
return ; case WM_MDIACTIVATE : // Set the appropriate menu
if (lParam == (LPARAM) hwnd)
SendMessage (hwndClient, WM_MDISETMENU, (WPARAM) hMenuRect,
(LPARAM) hMenuRectWindow) ;
else
SendMessage (hwndClient, WM_MDISETMENU, (WPARAM) hMenuInit,
(LPARAM) hMenuInitWindow) ; DrawMenuBar (hwndFrame) ;
return ; case WM_DESTROY :
lpRectData = (LPRECTDATA) GetWindowLong (hwnd, ) ;
HeapFree (GetProcessHeap (), , lpRectData) ;
KillTimer (hwnd, ) ;
return ;
}
// Pass unprocessed message to DefMDIChildProc
return DefMDIChildProc (hwnd, iMsg, wParam, lParam) ;
}
MDIDEMO.RC
/*----------------------------
MDIDEMO.RC resource script
----------------------------*/ #include <windows.h>
#include "mdidemo.h" MdiMenuInit MENU
{
POPUP "&File"
{
MENUITEM "New &Hello", IDM_NEWHELLO
MENUITEM "New &Rectangles", IDM_NEWRECT
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
}
} MdiMenuHello MENU
{
POPUP "&File"
{
MENUITEM "New &Hello", IDM_NEWHELLO
MENUITEM "New &Rectangles", IDM_NEWRECT
MENUITEM "&Close", IDM_CLOSE
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
}
POPUP "&Color"
{
MENUITEM "&Black", IDM_BLACK
MENUITEM "&Red", IDM_RED
MENUITEM "&Green", IDM_GREEN
MENUITEM "B&lue", IDM_BLUE
MENUITEM "&White", IDM_WHITE
}
POPUP "&Window"
{
MENUITEM "&Cascade\tShift+F5", IDM_CASCADE
MENUITEM "&Tile\tShift+F4", IDM_TILE
MENUITEM "Arrange &Icons", IDM_ARRANGE
MENUITEM "Close &All", IDM_CLOSEALL
}
} MdiMenuRect MENU
{
POPUP "&File"
{
MENUITEM "New &Hello", IDM_NEWHELLO
MENUITEM "New &Rectangles", IDM_NEWRECT
MENUITEM "&Close", IDM_CLOSE
MENUITEM SEPARATOR
MENUITEM "E&xit", IDM_EXIT
}
POPUP "&Window"
{
MENUITEM "&Cascade\tShift+F5", IDM_CASCADE
MENUITEM "&Tile\tShift+F4", IDM_TILE
MENUITEM "Arrange &Icons", IDM_ARRANGE
MENUITEM "Close &All", IDM_CLOSEALL
}
} MdiAccel ACCELERATORS
{
VK_F5, IDM_CASCADE, VIRTKEY, SHIFT
VK_F4, IDM_TILE, VIRTKEY, SHIFT
}

Windows MDI(Multiple-Document Interface)的更多相关文章

  1. Single document interface和Multiple document interface

    https://en.wikipedia.org/wiki/Single_document_interface https://msdn.microsoft.com/en-us/library/b2k ...

  2. 使用多文档接口(Multiple Document Interface) 一

    原文地址msdn:https://msdn.microsoft.com/en-us/library/windows/desktop/ms644909(v=vs.85).aspx#creating_fr ...

  3. windows.onload和 document.ready区别

    在Jquery里面,我们可以看到两种写法:$(function(){}) 和$(document).ready(function(){}) 这两个方法的效果都是一样的,都是在dom文档树加载完之后执行 ...

  4. 浅谈windows.onload()与$(document).ready()

    浏览器加载完DOM后,会通过javascript为DOM元素添加事件,在javascript中,通常使用window.onload()方法. 在jquery中,则使用$(document).ready ...

  5. C# Winform学习---MDI窗体的设计,PictureBox控件(图片上一页下一页),Timer控件,MenuStrip控件

    一.MDI窗体的设计 1.MDI简介 MDI(Multiple Document Interface)就是所谓的多文档界面,与此对应就有单文档界面 (SDI), 它是微软公司从Windows 2.0下 ...

  6. C# 设置MDI子窗体只能弹出一个的方法

    Windows程序设计中的MDI(Multiple Document Interface)官方解释就是所谓的多文档界面,与此对应就有单文档界面 (SDI), 它是微软公司从Windows .0下的Mi ...

  7. MDI和在TabPage

    无奈的.net探索 MDI和在TabPage中增加Form分页? MDI(Multiple Document Interface)是一种在窗口中嵌套窗口的接口, 与之对应的是SDI(Single Do ...

  8. wx

    wx The classes in this module are the most commonly used classes for wxPython, which is why they hav ...

  9. MDI-设置子窗体只能弹出一个--单例模式

    不足之处,欢迎指正! 什么是MDI..我表示不知道的呢. MDI(Multiple Document Interface)就是所谓的多文档界面,与此对应就有单文档界面 (SDI), 它是微软公司从Wi ...

随机推荐

  1. spa单页面应用(angular)

    本篇文章是对单页面的一个简单的基本逻辑操作,这个方法可以搭建基本的单页面的逻辑结构. 简单理解:单页面应用,锚点值切换,一个路由对应一个页面. 路由:此时会创建一个信息保存路由的信息,之后对页面a标签 ...

  2. Memcached在windows下的基本使用

    1.Memcached是什么 Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动 ...

  3. TCP错误恢复特性之一TCP重传

    TCP的错误恢复特性是我们用来定位.诊断并最终修复网络高延迟的最好工具. 常见的TCP错误恢复特性有:TCP重传.TCP重复确认和快速重传 1. TCP重传: 重传数据包是TCP最基本的错误恢复特性之 ...

  4. static 还是readonly 还是static readonly

    一.   static 多对象共享一段空间,或者说没有对象概念,就是类的概念,不需要实例化,自动被创建.多用于长期共享.不会为对象的创建或销毁而消失. public class C { ) publi ...

  5. 怎么在linux ubuntu 上的nginx 绑定域名

    前一篇介绍了,如果在ubuntu上运行nodejs,毕竟访问的时候都是用ip地址+端口号,但是上production 环境都需要域名的,IP地址当然不行 读过上一篇的朋友知道了,如果在upstart ...

  6. Objectiv-C UIKit基础 NSLayoutConstraint的使用(VFL实现)

    利用VFL可视化语言 (简单的抛砖引玉) 构建3个View 橙色和绿色左中右间隔20 上间隔40 高为200 蓝色在橙色内(0,0)处 宽高为橙色的一半 实现效果如下 由于atutosize和auto ...

  7. JVM GC(整理)

    1 GC类型 1 )YGC  一般情况下,当新对象生成,并且在Eden申请空间失败时,就好触发YGC ,堆Eden区域进行GC,清除非存活对象,并且把尚且存活的对象移动到Survivor区.然后整理S ...

  8. 让初学者快速了解Git

    Git工作原理 为了更好的学习Git,我们们必须了解Git管理我们文件的3种状态,分别是已提交(committed).已修改(modified)和已暂存(staged),由此引入 Git 项目的三个工 ...

  9. 【附答案】Java 大数据方向面试题,你会几个?

    1.Collection 和 Collections的区别.   Collections是个java.util下的类,它包含有各种有关集合操作的静态方法.   Collection是个java.uti ...

  10. jsp 之 解决 Mysql net start mysql启动,提示发生系统错误 5 拒绝访问的问题

    在dos下运行net start mysql时 !!!提示发生系统错误 5:拒绝访问!只要切换到管理员模式就可以启动了. 所以我们要以管理员身份来运行cmd程序来启动mysql. 1.在开始菜单的搜索 ...