Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define UNICODE
- #define WINVER 0x0A00
- #define _WIN32_WINNT 0x0A00
- #define BUFFERSIZE 100
- #include<wchar.h>
- #include<windows.h>
- #include <errno.h>
- #include<conio.h>
- #include<iostream>
- #include<stdio.h>
- #include<resource.h>
- ////////*******resource not working********/////////////
- DWORD g_BytesTransferred = 0;
- LRESULT CALLBACK WindowProcedure(HWND,UINT,WPARAM,LPARAM);
- IDD_DLGFIRST DIALOG 260,200,188, 95
- STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "Win32 Programming"
- FONT 8, "MS Shell Dlg"
- {
- DEFPUSHBUTTON "OK", IDOK, 130, 10, 50, 14
- }
- INT_PTR CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
- int WINAPI WinMain(HINSTANCE hvalue,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
- {
- LPCTSTR name=L"mydailogbox";
- INT_PTR hDlg;
- MSG msg;
- hDlg=DialogBox(hvalue,MAKEINTRESOURCE(IDD_DLGFIRST),
- hnd,reinterpret_cast<DLGPROC>(DlgProc));
- while(GetMessageW(&msg,NULL,NULL,NULL))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- return 0;
- }
- INT_PTR CALLBACK DialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
- {
- switch(uMsg)
- {
- case WM_INITDIALOG:
- return TRUE;
- case WM_DESTROY:
- EndDialog(hwndDlg,0);
- return TRUE;
- }
- return FALSE;
- }
Add Comment
Please, Sign In to add comment