|
Coder Block wrote: CPageSetupDialog abc;
abc.papersize = 10;
abc.sorce = "ACC";
abc.margin = 44;
if(abc.DoModal() == IKOK)
{
}else
{
}
gives error
error C2039: 'margin' : is not a member of 'CPageSetupDialog'
error C2039: 'papersize' : is not a member of 'CPageSetupDialog'
error C2039: 'sorce' : is not a member of 'CPageSetupDialog'
|
|
|
|
|
Read the docs, PLEASE!
abc.m_psd.ptPaperSize = 10;
abc.m_psd.rtMargin = 44;
...
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
As usual declare all this in .h file of CPageSetupDialog..
|
|
|
|
|
I need to debug a program for which I do not have the source code.
I want to place a breakpoint at the CreateFile() Win32 API.
I have told Visual Studio to load the symbols for KernelBase.dll and Kernel32.dll .
Now how can I tell the Disassembly View to take me to the location of CreateFile()?
Thanks in advance.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Visual Studio is not the right tool for reverse engineering. Use IDA Pro or OllyDbg. IDA Pro is damn expensive while OllyDbg is free. A lot of reverse engineering guys use these.
|
|
|
|
|
Thanks, I'll look into both of those.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I'd use WinDing, set up a symbol server and place a breakpoint directly on CreateFile. No need for disassembling.
Steve
|
|
|
|
|
Is WingDing a tool? My Google foo is not working.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
WinDbg. Look up "debugging tools for windows".
Steve
|
|
|
|
|
Sorry about the "WingDing". Auto correction got me.
Steve
|
|
|
|
|
Using WinDbg try these two commands:
bp kernel32!CreateFileA
bp kernel32!CreateFileW
Steve
|
|
|
|
|
Thanks, I didn't realize it was so easy with WinDbg.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Take a look at Microsofts public symbol server. You can download symbols for all their code from it, and set breakpoints and so on.
You can speciyf these sylbols in VS and when it tries to load downloads them automatically. I use windbg though so I cant help you much more than that, and I work in the kernel, but if you choose to do the same this is a usefull command:
bp nt!ntcreatefile "dt nt!_UNICODE_STRING poi(poi(@esp+0xc)+0x8)"
It sets a break point on createfile (this is what CreateFile maps to in the kernel) and displays the file being opened (This is 32 bit, if it was 64 the parameter would be in a register not on the stack).
SO any user mode acces to creatfile you can break on and have a wander arond the stack and see whats doing what.
--edit--
Or as the poster above says, set the bp in the usermode dll.
I can deffinitely recomend using windbg, it is a hell of a debugger, everyone in microsoft uses it, VS is a toy in comparison.
==============================
Nothing to say.
|
|
|
|
|
Erudite_Eric wrote: I can deffinitely recomend using windbg, it is a hell of a debugger, everyone in
microsoft uses it, VS is a toy in comparison.
Yes, but I have shyed away from it due to its complexity. I guess I'm just a dumb "user" at heart.
Maybe this will encourage me to try it.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
It is complex and command driven rather than UI driven, but what a command set! It can do amazing things.
==============================
Nothing to say.
|
|
|
|
|
I use the IDE's debugger when I can cause it's convenient and easy to use, but the second things get even a little complex I break out WinDbg.
Steve
|
|
|
|
|
Remote debugging over a network is one things VS is better at IMO.
==============================
Nothing to say.
|
|
|
|
|
My system is win7 64Bit
I use the VS2008 to compile the chrome solution. But I meet some problem about compile the FFMPEG.
I google that the others are all ok when compiling, but I have bad luck. I donot know why some error happen.
Does anyone meet the same problems?
1>------ 已启动生成: 项目: convert_ffmpeg_sources, 配置: Debug Win32 ------
1>Running external rules for convert_ffmpeg_sources
1>"python" "chromium/scripts/c99conv.py" "libavformat\oggparsedirac.c" "d:/Code/chromium/src/build/Debug/obj/global_intermediate/third_party/ffmpeg/libavformat/oggparsedirac.c" "-I" "chromium/config/Chromium/win/ia32"
1>cl: 命令行 error D8021 :无效的数值参数"/Fid:\Code\chromium\src\third_party\ffmpeg\libavformat\rmdec.c_preprocessed.c"
1>"python" "chromium/scripts/c99conv.py" "libavformat\oggparsevorbis.c" "d:/Code/chromium/src/build/Debug/obj/global_intermediate/third_party/ffmpeg/libavformat/oggparsevorbis.c" "-I" "chromium/config/Chromium/win/ia32"
1>cl: 命令行 error D8021 :无效的数值参数"/Fid:\Code\chromium\src\third_party\ffmpeg\libavformat\oggparsevorbis.c_preprocessed.c"
1>cl: 命令行 error D8021 :无效的数值参数"/Fid:\Code\chromium\src\third_party\ffmpeg\libavformat\oggparsedirac.c_preprocessed.c"
1>"python" "chromium/scripts/c99conv.py" "libavformat\rmdec.c" "d:/Code/chromium/src/build/Debug/obj/global_intermediate/third_party/ffmpeg/libavformat/rmdec.c" "-I" "chromium/config/Chromium/win/ia32"
1>make: *** [/cygdrive/d/Code/chromium/src/build/Debug/obj\global_intermediate\third_party\ffmpeg\libavformat\rmdec.c] Error 2
1>make: *** Waiting for unfinished jobs....
1>make: *** [/cygdrive/d/Code/chromium/src/build/Debug/obj\global_intermediate\third_party\ffmpeg\libavformat\oggparsevorbis.c] Error 2
1>make: *** [/cygdrive/d/Code/chromium/src/build/Debug/obj\global_intermediate\third_party\ffmpeg\libavformat\oggparsedirac.c] Error 2
2>------ 已启动生成: 项目: content_browser, 配置: Debug Win32 ------
|
|
|
|
|
See here[^] for D8021 errors; check the flags in your make file(s).
Use the best guess
|
|
|
|
|
Hi All, many thanks up-front to anyone who can help here.
I have a client that wants me to migrate a CTreeView-derived class to one which works like a docking pane. The class is so large now that it's not feasible to rewrite everything.
So...I still have the underlying CTreeCtrl-derived class (more/less untouched), which is a child of a class derived from CDockablePane (migrated from the CView class). I've also derived from CMultiPaneFrameWnd (used when the pane is floating) to try to trap events.
I've got it working about 80%. I need help/direction with the other 20%. I've got the CDockablePane derived class working with bulk of the MESSAGE_MAP events (menu handlers, ON_UPDATE_COMMAND_UI, etc.) working correctly. The events associated with the mouse are giving me grief.
I see 3 standard modes for the dockable pane: floating, docked, and tabbed. And they all behave differently w/r to mouse events - and depending on the docking mode.
For example:
* If the docking mode is DT_SMART *and* the pane is NOT floating, then drag&drop and double-clicking work correctly.
* If the docking mode isn't DT_SMART, then drag&drop usually tries to drag the complete docking pane instead of working correctly (regardless of floating, docked, tabbed).
* When the pane is floating, I can't trap WM_LBUTTONDBLCLK (unless you click on the lines and little [+] boxes...) or the respective notify or reflect messages - even Spy++ doesn't record them. I just don't see any left button double-click events - at all!
Google searches show that I'm not the only one with these types of issues. I've read and tried pretty well every suggestion...and I still have these issues. I'm now concerned about bugs or assumptions in the framework after reading this:
http://connect.microsoft.com/VisualStudio/feedback/details/641096/cdockablepane-calls-releasecapture[^]
This link: http://www.johnbyrd.org/blog/index.php?itemid=405[^] helped a lot but didn't solve all issues either.
I can also replicate these issues (unable to trap double-clicking when floating) in the VisualStudioDemo feature pack demo.
Any suggestions on how to get a CTreeCtrl to work inside a CDockingPane - consistently - would be really appreciated. I feel that many issues are related to CMultiPaneFrameWnd, but can't resolve them.
Thanks!
|
|
|
|
|
Hm... My trees can register the double clicks in their floating panes
For example, it is possible to extend a node by the double click at its item...
The model in my case is (from outside): CXDocablePane->CXFrameWndEx->CXTreeCtrl
They sought it with thimbles, they sought it with care;
They pursued it with forks and hope;
They threatened its life with a railway-share;
They charmed it with smiles and soap.
|
|
|
|
|
Found it! There is an intermediate class which inherited from CTreeCtrl. It was originally set up to support a CView, and forwarded the LButtonDown event to its parent. Well, now that the parent is a dockable pane, the behaviour changed a lot! Removing that handler got lots of stuff working!
|
|
|
|
|
i know accessing was ok with windows 98/me but with windows 7 it cannot be done.
but i have read that they can be accessed by making some drivers orany extra special drivers for this !! help needed realy hard time !! i work on windows 7 now and getting win 98is a big issue for me !! help !
|
|
|
|
|
What exactly is your C/C++/MFC question? What code have you put together that you need help with?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
If a PC running Windows 7 has a parallel port then you will probably find that it also has a driver. Now try posting a proper question, and stop filling your post with all those pointless emoticons.
Use the best guess
|
|
|
|