Page 154 - DCAP408_WEB_PROGRAMMING
P. 154
Windows Programming
Notes END
/////////////////////////////////////////////////////////////////////////
////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDM_FILE_EXIT “Closes the application”
IDM_VIEW_TOOLBOX “Toggles the presence and disappearance of the
toolbox\nShow/Hide Toolbox”
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////
////
Source Code
#include <windows.h>
#include “resource.h”
HINSTANCE hInst;
LPTSTR strAppName = “WndFrame”;
LPTSTR WndName = “Attaching a child window to an application’s frame”;
LPTSTR strToolbox = “WndFloater”;
HWND hWndMainFrame, hWndToolbox;
LRESULT CALLBACK MainWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM
lParam);
LRESULT CALLBACK ToolboxProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM
lParam);
//—————————————————————————————————————
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MSG msg;
RECT rect;
WNDCLASSEX WndClsEx;
148 LOVELY PROFESSIONAL UNIVERSITY