|
No, I just removed all the irrelevant code. I did remember to pass the string. It is a LPTSTR.
And as to the other poster's statement, been there, done that. It is calling into the debug dll correctly, but the stack overflows when the program steps through from the calling EXE to the debug DLL in VC++
|
|
|
|
|
in loadlibrary first u enter the dll name. and to debug dll ,open workspace of dll and open Projects->setting->Debug and in executable for debug section ,give path name of client exe and then debug it
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi All
I've got a menu to attach to my class derived from CFrameWindow.
I would like to set my menu to OWNERDRAW so that I can draw it and customize the layout.
In the constructor of my window class I put the following but GetMenuItemInfo doesn't work.
It never enters the if block so that I can set the MFT_OWNEDRAW style.
Retrieving the error code I've got 87 ERROR_INVALID_PARAMETER
Can you help me with that issue?
Regards
manustone
<br />
CGuiTestFrameWnd::CGuiTestFrameWnd()<br />
{<br />
<br />
Create( NULL, _T("Test"), WS_OVERLAPPEDWINDOW );<br />
CMenu menu;<br />
menu.LoadMenuA( MAKEINTRESOURCE(IDR_MENU1) ); <br />
SetMenu( &menu ); <br />
<br />
<br />
MENUITEMINFO itmInfo;<br />
if(menu.GetMenuItemInfo( 1, &itmInfo ))<br />
{<br />
itmInfo.fType |= MFT_OWNERDRAW;<br />
menu.SetMenuItemInfo( 0, &itmInfo );<br />
}<br />
<br />
menu.Detach();<br />
<br />
}<br />
|
|
|
|
|
manustone wrote: if(menu.GetMenuItemInfo( 1, &itmInfo ))
What is the "1" you are passing here? Is it an ID or a position? If it's a position then you
need to call like this:
if(menu.GetMenuItemInfo( 1, &itmInfo. TRUE ))
...
|
|
|
|
|
if your problem is of GetMenuItemInfo see this examples "Plug-in DLLs and Menu Interfaces " on codeproject(dll) it works with this function maybe it some helpfuls
|
|
|
|
|
Hi all,
I want CLSID from prog id in managed code. i am using code as follows but
CLSID clsid;
HRESULT hr;
hr= CLSIDFromProID(OLESTR(“AtlServer.MyMath”),&clsid);
it is not working.
please tell me which namespace i have to use and which function.
thanks
bankey.
|
|
|
|
|
Banks K wrote: I want CLSID from prog id in managed code
Please post on proper forum to get answer.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
How to update just 2 field from my table ?
i whant to edit a field from my database-> table but i dont know how to update just that field!
My database visual fox pro 6.0
Database name : Database_Pers
Table name : city
my string to update in the field city is CString sTemp;
this is :
CDatabase_Pers pPers;
...
pPers.Edit();
pPers.m_city = sTemp;
....This is update ....but if update all i have this error:
SQL:statement too long !
pPers.Update(); <-This generate this error !
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: SQL:statement too long !
You've still not indicated how long the SQL statement is.
Bravoone_2006 wrote: pPers.Update(); <-This generate this error !
Step into this method to see what the actual SQL statement looks like. That will go a long way towards finding the problem.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
if your problem is on sql I suggest aks on sql forum
|
|
|
|
|
Please can anybody give me any cites from where i could learn MFC
gujar
|
|
|
|
|
You're here already! I don't know a website that's better than the CodeProject to learn MFC. Get a life dude.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
|
|
|
Hello,
I have an existing Programm without sources and i want edit the forms icon and text. is there any API Function/Call or something else?
Greetings from germany
|
|
|
|
|
Hi all,
I am trying to set some Background colors to CpropertSheet Tab controls.
I have tried Handling
OnPaint
OnCtlColor
OnEraseackground to acheive it.But none is helping
This is a Samble code which i used in EraseBackground handler
CPropertyPage::OnEraseBkgnd(pDC);
CRect rect;
CTabCtrl *tab = internal_sheet.GetTabControl();
tab->GetItemRect(0,&rect);
pDC->FillSolidRect(&rect, RGB(255, 0, 0));
return true;
This also not working
I am also trying to set the Tap position from the default left side to Right
This ModifyStlye(0,TCS_RIGHT); Positioning the tab in the bottom side.
ans the "TCS_VERTICAL" is not showing other tabs.
Please throw some ideas to acheive this.
-- modified at 4:19 Wednesday 13th December, 2006
|
|
|
|
|
Does this work?
BOOL CMyPropertyPage::OnEraseBkgnd(CDC* pDC)
{
CRect rect;
GetClientRect(&rect);
pDC->FillSolidRect(&rect, RGB(255, 0, 0));
return TRUE;
}
|
|
|
|
|
if you use of WM_PAINT what happens?
|
|
|
|
|
Hey,,,
I have a fer function that wait for input for a while...
at the moment... I code it simple like this...
for(i=0; i<50000000; i++){
//waiting for input
}
As Processes inside the loop are changing, the loop takes longer and shorter amounts of time to complete.. 3sec to 50sec.
what the easiest way to set up a timed loop that loops the same amount of time every time?
Example:
While ( time < 10Seconds ){
//wait for input
}
|
|
|
|
|
Hi!!,
u can put a counter inside the loop that increments to a particular no every time
e.g.
int count=0
for(i=1;i<=50000000;i++)
count = count+i
|
|
|
|
|
Later I'll be adding a "wait time option" so I gotta go by time... Just looking for the easiest way to code in a timer into a loop.
|
|
|
|
|
Ok.. I think I figured out the easiest way
DWORD dwStart = GetTickCount();
while( GetTickCount() - dwStart < WAITTIME ){
//loop for WAITTIME milliseconds
}
|
|
|
|
|
What about WM_TIMER ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I am confused that why we have to pass a reference of same class type into a copy constructor? I searched a lot but i am not able to find out the exact answer.So,plz if anybody can forward me the relevant answer of this question then plz forward it as soon as possible.Please specify the reason.
thanks..
|
|
|
|