diff options
Diffstat (limited to 'ldmicro/miscutil.cpp')
-rw-r--r-- | ldmicro/miscutil.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ldmicro/miscutil.cpp b/ldmicro/miscutil.cpp index 0a9379f..6014731 100644 --- a/ldmicro/miscutil.cpp +++ b/ldmicro/miscutil.cpp @@ -102,7 +102,7 @@ void Error(char *str, ...) printf("%s\n", buf); } else { //HWND h = GetForegroundWindow(); - // MessageBox(MainWindow, buf, _("LDmicro Error"), MB_OK | MB_ICONERROR); + MessageBox(MainWindow, buf, _("LDmicro Error"), MB_OK | MB_ICONERROR); } } @@ -208,7 +208,7 @@ QDialog* CreateWindowClient(char *windowName, int x, int y, int width, int height, HWND parent) { QDialog* h = new QDialog(parent); - h->resize(width,height); + h->resize(width, height); h->setWindowTitle(windowName); // HWND h = CreateWindowEx(exStyle, className, windowName, style, x, y, // width, height, parent, menu, instance, param); @@ -292,6 +292,18 @@ void FixedFont(HWID h) // SendMessage(h, WM_SETFONT, (WPARAM)MyFixedFont, TRUE); } +void SetFont(HWID h, HFONT f) +{ + QFont qtfont = h->font(); + qtfont.setFamily(f->lpszFace); + qtfont.setPixelSize(f->nHeight - 3); + qtfont.setFixedPitch(TRUE); + qtfont.setStyle(f->fdwItalic ? QFont::StyleItalic : QFont::StyleNormal); + qtfont.setWeight(f->fnWeight == FW_BOLD ? QFont::Bold : QFont::Normal); + h->setFont(qtfont); + // SendMessage(h, WM_SETFONT, (WPARAM)MyFixedFont, TRUE); +} + //----------------------------------------------------------------------------- // Create our dialog box class, used for most of the popup dialogs. //----------------------------------------------------------------------------- |