Hi
I was wondering on how to create a text editor dialog box (like opening a file)
I know how to create normal dialog boxes, but i would like to use this one, for my project, thanks in advance!
Printable View
Hi
I was wondering on how to create a text editor dialog box (like opening a file)
I know how to create normal dialog boxes, but i would like to use this one, for my project, thanks in advance!
i have the code, all i want to do is link it with the open button. so when i click it, the dialog box appears, i want to do this because as soon as i run the program, the dialog box appears.
Respond to a BN_CLICKED notification which is sent to the button's parent in the form of a WM_COMMAND message. There are many examples of how to do this on this board but here it is again anyway:where identifier_of_your_button is, unsurprisingly, the identifier of your button control.Code:case WM_COMMAND:
{
HWND hCntrl;
WORD wID,wNotify;
hCntrl=(HWND)lParam;
wID=LOWORD(wParam);
wNotify=HIWORD(wParam);
if (hCntrl)
{
/*notification is from a control*/
if (wNotify==BN_CLICKED)
{
/*the notification is a result of a button click*/
if (wID==identifier_of_your_button
{
/*button click came from button with id of
identifier_of_your_button*/
}
}
}
}
Since you seem to be doing a lot with controls just now, msdn: Windows Controls should be of considerable use to you. Please take the time to study the sections on the controls you are currently using: buttons, edits, toolbars, statusbars.
I expect the msdn: common dialogs will prove useful, too.
thank you