DavidCrow wrote: Wrong again. ClassWizard has somehow been set to only show dialog-related messages. Click the Class Info tab and select Window in the Message filter: combobox. Back on the Message Maps tab, you should see WM_WINDOWPOSCHANGING in the list of messages. Thanks it worked.
balaclavabob
Posts
-
Tried dialog hidden technique from dlgboxtricks but it didn't work.... -
Tried dialog hidden technique from dlgboxtricks but it didn't work....I added it manually and it worked. I was looking thru the ClassWizard and unless I added in ON_WM_WINDOWPOSCHANGING() manually it wouldn't have appeared.... For future reference how should I use ClassWizard todo something like this.... Thanks for your help.
-
Tried dialog hidden technique from dlgboxtricks but it didn't work....DavidCrow wrote: You could have avoided all of this hassle by letting ClassWizard add the method for you. It would have updated both the .cpp and .h files. MFC is something I have been told to avoid at all costs and just go and learn .Net, so my knowledge of MFC is quite limited. DavidCrow wrote: Cab you confirm that the pos->flags &= ~SWP_SHOWWINDOW statement is actually executed? If not, is visible being changed to TRUE somewhere? It is not executing, I tried both: void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos) { if(!visible) { pos->flags &= ~SWP_SHOWWINDOW; MessageBox("This executed"); } CDialog::OnWindowPosChanging(pos); } void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos) { pos->flags &= ~SWP_SHOWWINDOW; MessageBox("This executed"); CDialog::OnWindowPosChanging(pos); } both didn't bring up the message box. visible is always false for the entire length of the program, I haven't modified it anywhere and it isn't being modified by anything. DavidCrow wrote: Do you have any calls to ShowWindow()? I have no calls to ShowWindow() at all.
-
Tried dialog hidden technique from dlgboxtricks but it didn't work....Hi, I am trying to make Nishant Sivakumar - "Using global hotkeys" start hidden: http://www.codeproject.com/system/nishhotkeys01.asp I have added the hidden modal code from Nishant Sivakumar - "Some handy dialog box tricks, tips and workarounds ": http://www.codeproject.com/dialog/dlgboxtricks.asp It compiles, but it doesn't become hidden. Changes to the "Using global hotkeys" project I made: In "HotKeyTestDlg.cpp" I added: void CHotKeyTestDlg::OnWindowPosChanging(WINDOWPOS * pos) { if(!visible) pos->flags &= ~SWP_SHOWWINDOW; CDialog::OnWindowPosChanging(pos); } and added "visible = FALSE;" to: CHotKeyTestDlg::CHotKeyTestDlg(CWnd* pParent /*=NULL*/) : CDialog(CHotKeyTestDlg::IDD, pParent) In "HotKeyTestDlg.h" I added "BOOL visible;" to protected under: class CHotKeyTestDlg : public CDialog This wouldn't compile "error C2509: 'OnWindowPosChanging' : member function not declared in 'CHotKeyTestDlg'" till I added "void OnWindowPosChanging(WINDOWPOS * pos);" to public under: class CHotKeyTestDlg : public CDialog So it now compiles and runs, but it doesn't start hidden.
-
Changing Turbo C 2.01 Key BindingsI have to use Turbo C 2.01 to access interrupts for a project I am working on. Is it possible to change the key bindings in Turbo C 2.01 to something more windows user friendly (Ctrl + Z, X, V, C, S) either by hack or some configuration option that I haven't found yet. Also, on that note, if someone knows howto hack it, I would like ctrl + alt + c to compile and ctrl + alt + x to execute. I know I could use TCC and compile from the command line and then use another editor, but I would rather do it this way if possible. THANKS!
-
Execute Program without waiting for terminationThanks tareq, worked perfectly.
-
Execute Program without waiting for terminationI need to execute 2 programs from within a program I am writing. I tried system() and winexec(). It would execute the first program and stop. It wouldn't execute the second program till I closed the first program.
-
Linking C libraries to C++?Thanks for the suggestion Chris, it didn't work. The cpp files generated a host of other errors. I googled extern "C" to see how else I could use it. I tried putting the function declaration at the top of my file and used: extern "C" int hInitialise(int count, HWND window, HDC screen, unsigned int flags); Got a compile error: main.cpp(13) : error C2732: linkage specification contradicts earlier specification for 'hInitialise' But I copied it straight from the header....:confused:
-
Linking C libraries to C++?Pre-compiled a C library using msvc 6, blah.lib In a new C++ project, include header and library location in Tools->Options->Directories, included header in the C++ file and include library in the Settings->Link tab I get a linker error stating: main.obj : error LNK2001: unresolved external symbol "int __cdecl hInitialise(int,struct HWND__ *,struct HDC__ *,unsigned int)" (?hInitialise@@YAHHPAUHWND__@@PAUHDC__@@I@Z) I was not able to recompile the library into C++, cause of header problems....
-
rawinput in backgroundusing this code: http://www.jstookey.com/arcade/rawmouse/raw\_mouse.c http://www.jstookey.com/arcade/rawmouse/raw\_mouse.h http://www.jstookey.com/arcade/rawmouse/raw\_mouse\_test.c to get raw mouse input for 2 or more mice. What I need to be able todo is have this program running in the background while still logging the mice. So that I can use my computer while logging the movements of the other connected mice. It is usuable just with one mouse, so you don't need 2 mice to run the code. It also required Windows SDK to compile.... From MSDN: Reading Raw Input http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/rawinput/aboutrawinput.asp An application receives raw input from any HID whose top level collection (TLC) matches a TLC from the registration. When an application receives raw input, its message queue gets a WM_INPUT message and the queue status flag QS_RAWINPUT is set (QS_INPUT also includes this flag). An application can receive data when it is in the foreground and when it is in the background. So it is possible, I just don't know how....