summaryrefslogtreecommitdiff
path: root/ldmicro/commentdialog.cpp
diff options
context:
space:
mode:
authorRamana2018-06-07 11:56:27 +0530
committerGitHub2018-06-07 11:56:27 +0530
commitd182102e6c2260a516fb83c2c4a5af1484eb36b3 (patch)
tree0c3d2a551ff65ccc82067b4a28407c9ccbbd58fc /ldmicro/commentdialog.cpp
parent2307d7aa409430506eeaed03633c8c31dd7f4ac1 (diff)
parent3f27ae593c4804b3c0acacf21cf64c1e080750ff (diff)
downloadLDMicroGtk-d182102e6c2260a516fb83c2c4a5af1484eb36b3.tar.gz
LDMicroGtk-d182102e6c2260a516fb83c2c4a5af1484eb36b3.tar.bz2
LDMicroGtk-d182102e6c2260a516fb83c2c4a5af1484eb36b3.zip
Merge pull request #7 from akshay-c/fork/GUI_port
Fork/gui port
Diffstat (limited to 'ldmicro/commentdialog.cpp')
-rw-r--r--ldmicro/commentdialog.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/ldmicro/commentdialog.cpp b/ldmicro/commentdialog.cpp
index 4cfe13b..9bea08d 100644
--- a/ldmicro/commentdialog.cpp
+++ b/ldmicro/commentdialog.cpp
@@ -31,67 +31,67 @@ static HWND CommentDialog;
static HWND CommentTextbox;
-static void MakeControls(void)
-{
- CommentTextbox = CreateWindowEx(WS_EX_CLIENTEDGE, WC_EDIT, "",
- WS_CHILD | ES_AUTOHSCROLL | WS_TABSTOP | WS_CLIPSIBLINGS | WS_VISIBLE |
- ES_MULTILINE | ES_WANTRETURN,
- 7, 10, 600, 38, CommentDialog, NULL, Instance, NULL);
- FixedFont(CommentTextbox);
+// static void MakeControls(void)
+// {
+// CommentTextbox = CreateWindowEx(WS_EX_CLIENTEDGE, WC_EDIT, "",
+// WS_CHILD | ES_AUTOHSCROLL | WS_TABSTOP | WS_CLIPSIBLINGS | WS_VISIBLE |
+// ES_MULTILINE | ES_WANTRETURN,
+// 7, 10, 600, 38, CommentDialog, NULL, Instance, NULL);
+// FixedFont(CommentTextbox);
- OkButton = CreateWindowEx(0, WC_BUTTON, _("OK"),
- WS_CHILD | WS_TABSTOP | WS_CLIPSIBLINGS | WS_VISIBLE | BS_DEFPUSHBUTTON,
- 620, 6, 70, 23, CommentDialog, NULL, Instance, NULL);
- NiceFont(OkButton);
+// OkButton = CreateWindowEx(0, WC_BUTTON, _("OK"),
+// WS_CHILD | WS_TABSTOP | WS_CLIPSIBLINGS | WS_VISIBLE | BS_DEFPUSHBUTTON,
+// 620, 6, 70, 23, CommentDialog, NULL, Instance, NULL);
+// NiceFont(OkButton);
- CancelButton = CreateWindowEx(0, WC_BUTTON, _("Cancel"),
- WS_CHILD | WS_TABSTOP | WS_CLIPSIBLINGS | WS_VISIBLE,
- 620, 36, 70, 23, CommentDialog, NULL, Instance, NULL);
- NiceFont(CancelButton);
-}
+// CancelButton = CreateWindowEx(0, WC_BUTTON, _("Cancel"),
+// WS_CHILD | WS_TABSTOP | WS_CLIPSIBLINGS | WS_VISIBLE,
+// 620, 36, 70, 23, CommentDialog, NULL, Instance, NULL);
+// NiceFont(CancelButton);
+// }
-void ShowCommentDialog(char *comment)
-{
- CommentDialog = CreateWindowClient(0, "LDmicroDialog",
- _("Comment"), WS_OVERLAPPED | WS_SYSMENU,
- 100, 100, 700, 65, NULL, NULL, Instance, NULL);
+// void ShowCommentDialog(char *comment)
+// {
+// CommentDialog = CreateWindowClient(0, "LDmicroDialog",
+// _("Comment"), WS_OVERLAPPED | WS_SYSMENU,
+// 100, 100, 700, 65, NULL, NULL, Instance, NULL);
- MakeControls();
+// MakeControls();
- SendMessage(CommentTextbox, WM_SETTEXT, 0, (LPARAM)comment);
+// SendMessage(CommentTextbox, WM_SETTEXT, 0, (LPARAM)comment);
- EnableWindow(MainWindow, FALSE);
- ShowWindow(CommentDialog, TRUE);
- SetFocus(CommentTextbox);
- SendMessage(CommentTextbox, EM_SETSEL, 0, -1);
+// EnableWindow(MainWindow, FALSE);
+// ShowWindow(CommentDialog, TRUE);
+// SetFocus(CommentTextbox);
+// SendMessage(CommentTextbox, EM_SETSEL, 0, -1);
- MSG msg;
- DWORD ret;
- DialogDone = FALSE;
- DialogCancel = FALSE;
- while((ret = GetMessage(&msg, NULL, 0, 0)) && !DialogDone) {
- if(msg.message == WM_KEYDOWN) {
- if(msg.wParam == VK_TAB && GetFocus() == CommentTextbox) {
- SetFocus(OkButton);
- continue;
- } else if(msg.wParam == VK_ESCAPE) {
- DialogDone = TRUE;
- DialogCancel = TRUE;
- break;
- }
- }
+// MSG msg;
+// DWORD ret;
+// DialogDone = FALSE;
+// DialogCancel = FALSE;
+// while((ret = GetMessage(&msg, NULL, 0, 0)) && !DialogDone) {
+// if(msg.message == WM_KEYDOWN) {
+// if(msg.wParam == VK_TAB && GetFocus() == CommentTextbox) {
+// SetFocus(OkButton);
+// continue;
+// } else if(msg.wParam == VK_ESCAPE) {
+// DialogDone = TRUE;
+// DialogCancel = TRUE;
+// break;
+// }
+// }
- if(IsDialogMessage(CommentDialog, &msg)) continue;
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
+// if(IsDialogMessage(CommentDialog, &msg)) continue;
+// TranslateMessage(&msg);
+// DispatchMessage(&msg);
+// }
- if(!DialogCancel) {
- SendMessage(CommentTextbox, WM_GETTEXT, (WPARAM)(MAX_COMMENT_LEN-1),
- (LPARAM)comment);
- }
+// if(!DialogCancel) {
+// SendMessage(CommentTextbox, WM_GETTEXT, (WPARAM)(MAX_COMMENT_LEN-1),
+// (LPARAM)comment);
+// }
- EnableWindow(MainWindow, TRUE);
- DestroyWindow(CommentDialog);
- return;
-}
+// EnableWindow(MainWindow, TRUE);
+// DestroyWindow(CommentDialog);
+// return;
+// }