|
Do you have any IDE plugins? If so, disable them and see if that helps.
|
|
|
|
|
dear all
urgent problem, how to delete icon of tool bar in vc++2008, and also how to change the title of project? thanks a lot
|
|
|
|
|
Do you want to change some icons of Visual studio or of your program and for second sextion you can use of SetWindowText ?
|
|
|
|
|
hi,
I allocate a memory on heap and copy some code to that heap from my program. Now, I want to execute that code from heap but I am unable to understand how I can jump or change instruction pointer to point to that(heap) location and start execution. I am using C to do this.
Thanks,
|
|
|
|
|
Use assembly, push the address of your code on the stack, then execute a ret instruction. Be sure to mark the memory as executable or the CPU may raise an exception (depending on the OS type, CPU type, and DEP settings).
|
|
|
|
|
Hello,
I have a child window in my application but when I maximize the window the child window doesn't get merged with the main window.
Pritha
|
|
|
|
|
You mean the child window is not getting resized?
|
|
|
|
|
Hello,
The child window is getting resized but when I press the maximize button of the child window , the whole of child window is seen without the main window having the restore button.The child window is now seen as the main window without the restore button.
Prithaa
|
|
|
|
|
Could please show me the code part of child creation and maximize handling?
|
|
|
|
|
hello,
The TableFrame's CreateFrame() is creating the Child Window and when the maximize is pressed the OnSize() is called.
TableFrame::CreateFrame()
{
if(!CMDIChildWnd::Create(NULL, FrameName , WS_VISIBLE | WS_CHILD |
WS_BORDER |WS_MAXIMIZEBOX | WS_MINIMIZEBOX |
WS_THICKFRAME | WS_OVERLAPPEDWINDOW
|WS_VSCROLL | WS_HSCROLL ,
WindowSize(), pFrame, NULL))
{
TRACE0("Failed to create view window\n");
return false;
}
}
void TableFrame::OnSize(int nType)
{
switch(nType)
{
case SIZE_MAXIMIZED :
{
CRect ParentRect;
MDIMaximize();
break;
}
}
}
|
|
|
|
|
Is TableFrame derived from CMDIChildWnd?
|
|
|
|
|
hello,
thanks for your replies.
yes TableFrame is derived from CMDIChildWnd
Prithaa
|
|
|
|
|
Why are you calling MDIMaximize() from OnSize?
I just tried it in a sample application. But could not find any problem... If you can please mail me the source. It is ns.nest@gmail.com
|
|
|
|
|
Hello,
I am using MDIMaximize() to maximize the child window. I ll try to post the code.
Thanks,
Prithaa
|
|
|
|
|
I shall check the code... may be a little bit later...
|
|
|
|
|
Problem can be solved by calling CMDIChildWnd::OnSize in TableFrame::OnSize.
|
|
|
|
|
Hello,
Thanks ,
Now I am getting the minimize,restore,close buttons for the child window and minimize,maximize,close buttons for the main window but it looks like the minimize,restore,close buttons for the child window does not have a handler function
but the main window's button handler is the TableFrame's OnSize().
Pritha
|
|
|
|
|
Ya... I found that but didn't get enough time to resolve that...
prithaa wrote: but the main window's button handler is the TableFrame's OnSize().
I didn't understand...
|
|
|
|
|
Thanks for all the help
If you happen to find out the problem then please let me know
my address
priyakalashi@yahoo.com
|
|
|
|
|
Hi,
I'm hacking at this now for several hours, it will not compile.
I've the following declaration
<br />
class CCmdLineParserApp;
typedef BOOL (CCmdLineParserApp::*PFN_CMDLINE_ACTION)(LPCSTR pAction=NULL);<br />
<br />
typedef struct {<br />
char Switch[16];<br />
PFN_CMDLINE_ACTION pCmdAction;<br />
BOOL bIsTerminal;<br />
}CMD_LINE_ENTRY,*LP_CMD_LINE_ENTRY;<br />
Later on in the code I've found a LP_CMD_LINE_ENTRY pE. I try to execute
the Relevant pCmdAction function as follows:-
<br />
(pE ->*pCmdAction)(ResultString);<br />
I get:
C:\Projects\CmdLineParser\CmdLineParser.cpp(143) : error C2065: 'pCmdAction' : undeclared identifier
C:\Projects\CmdLineParser\CmdLineParser.cpp(143) : error C2297: '->*' : bad right operand
I do not use this syntax very often, and I'm obviously making a very silly syntactic mistake. Any ideas??
regards
Bram van Kampen
|
|
|
|
|
Bram van Kampen wrote: 'pCmdAction' : undeclared identifier
Where is pCmdAction declared? I don't see relevant code in your post
that would cause the error.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Where is pCmdAction declared? I don't see relevant code in your post
that would cause the error.
<br />
class CCmdLineParserApp;
typedef BOOL (CCmdLineParserApp::*PFN_CMDLINE_ACTION)(LPCSTR pAction=NULL);<br />
<br />
typedef struct {<br />
char Switch[16];<br />
PFN_CMDLINE_ACTION pCmdAction; <----HERE!<br />
BOOL bIsTerminal;<br />
}CMD_LINE_ENTRY,*LP_CMD_LINE_ENTRY;<br />
pCmdAction is a member of structure CMD_LINE_ENTRY. CCmdLineParserApp, which is derrived from CWinApp, contains a static array of these. pE is a pointer into that array, and hence points to a structure of type CMD_LINE_ENTRY.
Bram van Kampen
|
|
|
|
|
Bram van Kampen wrote: (pE ->*pCmdAction)(ResultString);
You need to precede this with an instance of CCmdLineParserApp , like:
CCmdLineParserApp c;
(c.*(pE->pCmdAction))(ResultString);
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DavidCrow wrote: You need to precede this with an instance of CCmdLineParserApp, like:
No, I forgot to tell, the code snippet is called from within a memberfunction of CCmdLineParserApp.
however I tried :(this->*(pE ->pCmdAction))(ResultString) and it worked. Have no Idea why.
Bram van Kampen
|
|
|
|
|
Bram van Kampen wrote: I tried :(this->*(pE ->pCmdAction))(ResultString) and it worked. Have no Idea why.
Because you were trying to call a CCmdLineParserApp method using a pointer
to a CMD_LINE_ENTRY as the CCmdLineParserApp object.
In your fixed version, "this" is the CCmdLineParserApp object the method is being
called in the context of, and "pE->pCmdAction" is the pointer to the method.
Much better
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|