|
hi,
How to add keyboard shortcuts to menu..item..by default Ctrl+N for new document..it is provided by default..i want my own..shortcut keys to the new added menu items..will it work just by adding Ctrl+some character.or ..do i need to any extra work...please help..
regard`s
James
|
|
|
|
|
put a & before the name of the menu.
eg:
&open
E&xit - here x is the short cut key
nave
|
|
|
|
|
That`s ok....but i have menu item graph in file menu..to draw a graph..i want the short key to be Ctrl+G....how to do it...
|
|
|
|
|
for that add new accelerator with the same id of the graph menu
nave
|
|
|
|
|
thank q friend its working
|
|
|
|
|
Is there a way to use the following code with createprocess to startup another application and place it into the current applications child window?
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_MDIWITTYPE,
RUNTIME_CLASS(CMDIWithExeDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CMDIWithExeView));
AddDocTemplate(pDocTemplate);
CMainFrame* pMainFrame = new CMainFrame;
if (!pMainFrame->LoadFrame(IDR_MAINFRAME))
return FALSE;
m_pMainWnd = pMainFrame;
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
if (!ProcessShellCommand(cmdInfo))
return FALSE;
pMainFrame->ShowWindow(m_nCmdShow);
pMainFrame->UpdateWindow();
Chris
|
|
|
|
|
Hi guys,
what is the best methods to hunt for the memory leaks?
thanks
|
|
|
|
|
Kleser wrote: best methods to hunt for the memory leaks
See here
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Use the debugger, it will show you where the memory was allocated and give you a dump of the values. If it was a string, this is REALLY helpful. A bitmap, less so
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hello everyone,
I forget how to use the two tricks in Visual Studio debug mode,
1. What is the short-cut for run to cursor (or run to current line) command?
2. How to modify the value of some variables during debugging?
Any recommended reading materials are welcome.
thanks in advance,
George
|
|
|
|
|
George_George wrote: 1. What is the short-cut for run to cursor (or run to current line) command?
Ctrl+F10
George_George wrote: 2. How to modify the value of some variables during debugging?
Alt+F10 to apply code changes.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you _AnShUmAn_!
regards,
George
|
|
|
|
|
2 - set a breakpoint and in the watch window, type something like i=5
remember to delete the line, or every break point will reset i to 5
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thank you man!
regards,
George
|
|
|
|
|
Does anyone knows a Win32API function that can be used as a substitute for POSIX fnMatch()?
What it should do is bassically tell if a file name, letssay c:\windows\test.exe match a certain pattern (C:\windows\*.?xe).
Thanks.
|
|
|
|
|
I'd use regular expressions to do this. Look here[^].
Steve
|
|
|
|
|
Yes, that would be the obvious choice. But I only need this specific check on my program, and I don't want to add another library, dependencies, etc to my project unless there's no other way.
|
|
|
|
|
Would PathMatchSpec() be of any help here?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Indeed, that's exactly what I need.
Thanks.
|
|
|
|
|
by adding these code to the case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
MoveToEx (hdc, 100, 100, NULL) ;
LineTo (hdc, 100, 200) ;
EndPaint(hWnd, &ps);
why can I adding them to the case WM_CREATE to realise it?
|
|
|
|
|
What problem with this code? and i said you about WM_CREATE & WM_PAINT
|
|
|
|
|
there is nothing wrong with the code,
I just want to know, why can't I move this code into WM_CREATE to get the same result- just draw a line in the window when the window is created.
|
|
|
|
|
Because when it receives the WM_PAINT message, the window will be redrawn and thus if you don't redraw your line too, it will be erased.
|
|
|
|
|
And From the MSDN:
WM_CREATE:
This message is sent when an application requests that a window be created
|
|
|
|