Hi,
My goal is to create a DLL that provides usefull functions wich give you a DialogWindow.
This has to be programmed in a way that only default DynamicLinkLibrarys(.DLL) files are used.
So I'm useing C++ and WIN32, working in Visual Studio 2005.
I have a few problems where I can't find the appropriate help for.
1st- Adding a "Button" and/or "Edit" to the Dialogs can only be done right after the CreateWindowEX function where i Create the Dialog-Window with ( all the help files state this should be done in the WndProc function when Msg == WM_CREATE )
If though I'm looking into example-code downed from the internet, this ain't a problem when I'm compiling them.
2nd- I'm not recieving messages like WM_GETDLGCODE WM_NEXTDLGCTL WM_INITDIALOG
3rd- While using WS_TABSTOP when creating the Buttons and Edit-boxes: pressing the tab-key has NO result on Buttons and in a Edit-box it's resulting ONLY in a MessageBeep.
4th- How do I allow only digits in a specified Edit-box
Window Creating (password asking dialogbox):
DWORD dwExStyle; // Window Extended Style DWORD dwStyle; RECT WindowRect; RECT DeskRect; WindowRect.left = ( WindowRect.right = ( WindowRect.top = ( WindowRect.bottom = ( GetClientRect( GetDesktopWindow(), &DeskRect ); WNDCLASS wc; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = (WNDPROC)WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = m_hInstance; wc.hIcon = LoadIcon( NULL, IDI_WINLOGO ); wc.hCursor = LoadCursor( NULL, IDC_ARROW ); wc.hbrBackground = (HBRUSH)GetSysColorBrush( COLOR_3DFACE ); wc.lpszMenuName = NULL; wc.lpszClassName = m_appName; { } dwStyle = WS_CAPTION | WS_VISIBLE | WS_SYSMENU | WS_OVERLAPPED | WS_POPUP; dwExStyle = WS_EX_LEFT | WS_EX_LTRREADING | WS_EX_WINDOWEDGE | WS_EX_DLGMODALFRAME; AdjustWindowRectEx( &WindowRect, dwStyle, FALSE, dwExStyle ); m_appName, // Class Name title, dwStyle, DeskRect.right/2 - (WindowRect.right-WindowRect.left)/2, // X In the middle DeskRect.bottom/2 - (WindowRect.bottom-WindowRect.top)/2, // // Y In the middle WindowRect.right-WindowRect.left,
Parent, NULL, m_hInstance, NULL ))) { KillWindow( ); } HWND hOkButton = CreateWindow( clientRect.right - 160, clientRect.bottom - 36, 72, 24, m_hWnd, (HMENU)IDB_OK, m_hInstance, NULL ); HWND hCancelButton = CreateWindow( clientRect.right - 80, clientRect.bottom - 36, 72, 24, m_hWnd, (HMENU)IDB_CANCEL, m_hInstance, NULL ); HWND hTextEdit = CreateWindowEx( WS_EX_CLIENTEDGE, clientRect.right/2 - 50, clientRect.bottom - 80, 160, 26, m_hWnd, (HMENU)IDC_EDIT, m_hInstance, NULL );
// Reset The Display
return false; // Return FALSE
Thanks in advance