The problem was in the messages handling, i belive. I changed to PeekMessage from GetMessage. is this Ok? while (true) { if(PeekMessage(&message, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&message); DispatchMessage(&message); } checkalarm(); // func.to check if the window is to restore } return message.wParam; } return message.wParam; }
leifmikael
Posts
-
ShowWindow -
ShowWindowI have already tried that and it don't work. But the functions work when the prg window is active and displayed. Isn't true that the prg still working in minimized mode or is there any difference.
-
ShowWindowvoid checkalarm() { getTime(date); if (notesamling.alarmchecknotesamling (date)) {ShowWindow(hwnd, SW_SHOW);} } This is the part of the code that should activate and display the window.
-
ShowWindowI have done a windows prg with an alarm function (checking date and time), then i minimize the prg with the MINIMIZEBOX and the prg should activate and display the window at correct time and date, but it doesnt.t work, I have tried all kind of ShowWindod codes, i think there is something else i'm missing.
-
ShowWindowMy minimized program doesn't display when an alarmfunction in the program call ShowWindow(hwnd, SW_MAXIMIZE); What's mising?:confused:
-
Date and Time Picker ControlI have created ActiveX Microsoft Date and Time Picker Control resource: DIALOG_1 DIALOG DISCARDABLE 0, 0, 186, 90 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Dialog" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,114,55,50,14 PUSHBUTTON "Cancel",IDCANCEL,20,55,50,14 CONTROL "",IDC_DTPICKER1,"{20DD1B9E-87C4-11D1-8BE3-0000F8754DA1}", WS_TABSTOP,13,12,67,31 END But it don'tdisplay when i try activate it: DialogBox(hinstance, MAKEINTRESOURCE(DIALOG_1), hwnd, DlgProc); FreeProcInstance(lpproc);
-
Background ColorThank You very much now i'm on track againa'
-
Background ColorI'm using the CHOOSECOLOR to change the background color on a hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT",..... control window. However there is only the background on the main window that changes hwnd = CreateWindowEx(WS_EX_CLIENTEDGE,MainWindow,..... Part of the code SetClassLong(hwnd, GCL_HBRBACKGROUND, (LONG)hbrush); InvalidateRgn(hwnd, NULL, TRUE); What's wrong? Is it possible to edit the bg color on the hedit window?