|
yaminisridaran wrote: I have added the below line in oncreate
dlg.Create(IDD_DIALOG1,this)
and the below line in ondraw
dlg.MoveWindow(rcBounds,TRUE)
Huh? Is that really where you want to do the create and movewindow?
Mark Salsbery
Microsoft MVP - Visual C++
"Remember the five Ds of dogeball: Dodge, Dip, Duck, Dive, and Dodge."
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
just like we need a :filetOfish:
Happy Friday!
|
|
|
|
|
Indeed!
Cheers!
Mark Salsbery
Microsoft MVP - Visual C++
"Remember the five Ds of dogeball: Dodge, Dip, Duck, Dive, and Dodge."
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
how can i know on which menu item, the mouse pointer is currently hovering
in MFC doc/view architecture?
|
|
|
|
|
Abhijeet Pathak wrote: how can i know on which menu item, the mouse pointer is currently hovering
Try WM_MENUSELECT .
|
|
|
|
|
thanks
that works great for normal menu items...
but if i tried to retrieve menu string (caption) of menu item which contains
popup menu then it fails.
how can i retrieve caption of an menu item which contains popup (sub) menu.
i'm facing difficulties because such menu items don't have an ID.
|
|
|
|
|
Abhijeet Pathak wrote: but if i tried to retrieve menu string (caption) of menu item which contains
popup menu then it fails.
When it's a popup menu then it won't have a command id but it will have an index right. You get index in LOWORD( WPARAM ). Use MF_BYPOSITION with GetMenuString to retrieve menu string.
Tell me if it works.
|
|
|
|
|
|
hi
first of all, this forum is for asking questions related to C++/MFC Programming.
To ask questions like this, use another appropriate forum.
anyways http://en.wikipedia.org/wiki/Online_chat will give you some information.
|
|
|
|
|
Lol :p maybe he means how do you create a chat application? I'm not sure though
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
hari4ur wrote: How to chat with online people.
Get online with them and use a chat program.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yeah! Not MSN.. always crashes etc.. typical MS software
--PerspX
"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates
|
|
|
|
|
How to chain calls from a "variable number of argument" function to an other one ?
For exemple
bool IsFlagsCompliant( long Flag1, ...)
{
va_list liste;
long Param;
va_start ( liste, Param);
// code for the test on all parameters
while( Param != 0)
{
// next
Param = va_arg( liste, long);
}
va_end( liste);
}
bool GetCompliantElement( long Flag1, ...)
{
// some code...
bool bResult = IsFlagsCompliant( ???????); // <<<< how to call function ????
return bResult;
}
PDf
|
|
|
|
|
You can chain the variable arguments but only the top level function can use ... (ellipsis)
Here's a trivial example
void CMSErrorHandlingImpl::mxTrace(const mxCHAR* szFormat, ...)
{
va_list args;
va_start(args, szFormat);
CErrorHandling::Trace( szFormat, args );
va_end(args);
}
void CErrorHandling::Trace(LPCTSTR lpszFormat, va_list args)
{
va_list theargs = args;
if( _vftprintf(stderr, lpszFormat, args) < 0 )
{
_ftprintf(stderr, _T("%s"), _T("Trace failure! Unable to format a Trace message\n"));
_ftprintf(stderr, _T("Format:- %s\n"), lpszFormat);
}
TCHAR traceBuffer[1024];
if( _vstprintf(traceBuffer, lpszFormat, theargs) < 0 )
{
}
OutputDebugString(traceBuffer);
va_end(args);
}
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
marcelcerdanjunior wrote: va_start ( liste, Param);
va_start(liste, Flag1);
marcelcerdanjunior wrote: bool bResult = IsFlagsCompliant( ???????); // <<<< how to call function ????
bool bResult = IsFlagsCompliant(1, 2, 3);
bool bResult = IsFlagsCompliant(1, 2, 3, 4, 5);
Also, IsFlagsCompliant() needs to return a value.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
can i use MatchDocType() in Mainframe class tocheck whether a document is opened or not?
|
|
|
|
|
Yes.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Remember the five Ds of dogeball: Dodge, Dip, Duck, Dive, and Dodge."
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
After seeing your previous post, I thought maybe this would help...
CDocument *pDoc;
CDocTemplate::Confidence conf = pDocTemplate->MatchDocType(pszePathname, pDoc);
if (CDocTemplate::yesAlreadyOpen == conf)
{
}
Mark Salsbery
Microsoft MVP - Visual C++
"Remember the five Ds of dogeball: Dodge, Dip, Duck, Dive, and Dodge."
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
hi all
please tell me what is the problem with
this line of code
aqp ="SELECT id from login WHERE user= \'" + user + "\'" ;
as i connect vc++(mfc) with mysql 6.0
and the result from SELECT id from login WHERE user= \'" + user + "\' does not store
in aqp
i use debugger and aqp does not show any data
so this application gives exception at this line as it will store null value
thanks
hi
|
|
|
|
|
paras_s12 wrote: i use debugger and aqp does not show any data
Are you looking at aqp before or after the assignment?
paras_s12 wrote: so this application gives exception at this line
What does the stack trace look like at the time of the exception? Is user valid?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi All,
I want to add small images horizontally in ListBox. I add images in
vertical manner,but my requirement is to add them in horizontal manner.So any body have some hint related to it then plz send me.
Thanks and Regards
Atul
|
|
|
|
|
M. Atul wrote: I want to add small images horizontally in ListBox.
Listbox is not the ideal control for such a purpose. Use CListCtrl.
|
|
|
|
|
CListCtrl is flexible than to CListBox and you have control to that control.
|
|
|
|
|
I'd like to record more than 10000 records from serial port. they are from 30 signals, the software will record all the data into a data file and choose 8 signals to display in a chart in real time. how to define the data struct and store them in memory?
thank you.
|
|
|
|
|
Usually I prefer STL containers such as vector , anyway it also depends on the existing (if already exists) overall program design: for instance, if you've already choosen MFC containers for other purposes than continue to use them.
Hope that helps.
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.
|
|
|
|