Hello, in my aplication there are two dialogs CCalibracionDlg and DlgMap1 both derived from Cdialog, when I press a button in DlgMap1 i have to send a message to CCalibracionDlg, how can i do this?
I've been trying to do this with PostMessage(hWnd, WM_MYCUSTOMMESSAGE,(WPARAM) wParam,(LPARAM) lParam ); or SendMessage , but in DlgMap1 how can i get the hWnd to CCalibracionDlg?
Thanks in advance.
well i dont think sendMessage is a good option if they are belonging to the same application and thread.
one method will be use FindWindowEx, that give you the handle if you specify the name of the dialog.
CCalibracionDlg and DlgMap1 both derived from Cdialog, when I press a button in DlgMap1 i have to send a message to CCalibracionDlg, how can i do this?
I've been trying to do this with PostMessage(hWnd, WM_MYCUSTOMMESSAGE,(WPARAM) wParam,(LPARAM) lParam ); or
Better to have an 'object' or pointer of CCalibracionDlg in DlgMap1.U can get handle through object.GetSafeHWND(). Or Simply u can call object.SendMessage(..) or object.PostMessage()
yeaa.. exactly. As you want to send message to a window from another window in same application, u can simply use a Callback or a direct function call. But if the situation needs, such as you need to call the function many times, its better to use PostMessage or sendMessage.
oh, I didn't know it , so it's imposible send and recive messages between a model and modeless? ok supose that i change the main dialog to modeless , how can i do te send or post a message between the two modeless? with PostMessage?
Thanks. But , wich is the correct syntax? i wrote the following code in CDlgMapa1
<code>CCalibracionDlg.PostMessage( ? , WM_MYCUSTOMMESSAGE,(WPARAM) wParam,(LPARAM) lParam);</code>
1-What have i put in'?' ? , the handler to CCalibracionDlg (is the object that recives the message) ? in this case , how can obtain it? if you could put some code like an example , would be nice.
2- at that line of code the compiler says : error C2143: syntax error : missing ';' before '.' , sounds like the compiler doesn't recognizes that line. thanks again.
I am trying to get started with some programming, but I'm getting nowhere with an actual interesting sort of a project.
I can do console examples fine, and follow the instructions on the MSDN, but what I want to do is work on editing and creating modules for a program called SynthEdit.
SynthEdit creates Music software synthesizers, and the software has an SDK released.
So if I can figure out how to load a project/solution file from the SynthEdit SDK and actually successfully compile it, I will be able to actually start working on something.
But I am getting nowhere, because I always get errors when trying to compile.
It should be as simple as installing Visual C++ and the Microsoft SDK, then just loading a file from the SynthEdit SDK and compiling it. But something is not working right.
Visual C++ 2008 installs with Windows SDK version 6.0A already installed and ready to go, right? But it doesn't work. I added the file paths to the VC++ directories for Executable files, Library and Include files, it still doesn't work.
I downloaded Windows SDK v 7.0 and added the paths to the VC++ directories, it still does not work.
So What do I need to do to get a Windows SDK integrated into my Visual C++ 2008, so that I can compile something?
I have seen the Microsoft Blog about using the Microsoft Windows SDK configuration tool, it is no help. It fails to be a straightforward step by step guide, and goes into setting directories using the command prompt window without explaining how exactly to do that. So it is useless for a beginner such as myself.
I am pasting the log for my attempt to compile a project called "AGain" below. If anyone sees exactly what the problem is, that would be great. Please don't spend more than a minute or two, I'll have to eventually figure this out, even if it takes weeks.
cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385
Copyright (C) Microsoft Corporation. All rights reserved.
.\AGain.rc(10) : fatal error RC1015: cannot open include file 'winres.h'.
Build log was saved at "file://c:\Program Files\se_sdk3\AGain\Debug\BuildLog.htm"
AGain - 1 error(s), 1 warning(s)
Your source code seems to be compiling correctly according to your logs. Its the resource compiler that is failing. Your AGain.rc resource file is including a file named winres.h but the compiler cannot find it. You may be missing an #include path... locate this file and add the path into the projects 'Additional Include Directories'
I come to know IE use "Acrobat Browser document" ocx control to open pdf file.
I am using same ocx control but it doesn't expose any function to get open PDF page count.
BUT IE do the same.
I also come to know you can get page count by opening PDF in binary format and search for /Count or /Type /Page pattern.
I opened PDF in binary form using CFile and try to read single line and count " /Type /Page " pattern but as it is binary file, I could not able to read single line.
Line end is specified by '\n' or '\r' or '\r\n' i.e. 0x0A or 0x0D 0r 0x0D 0x0A.
To check the regular expression I used CAtlRegExp class.
If i check all these patterns and read single byte at a time, it takes lot of time. So can you please provide me some c++/VC++ code sample if possible to read the single line in PDF or get the page count.
Last Visit: 31-Dec-99 19:00 Last Update: 28-Nov-23 22:52