|
Dude, can you optimise it?
|
|
|
|
|
Aljechin wrote: Dude, can you optimise it?
|
|
|
|
|
I can well optimise it, dont have the time.
Since you are asking for me to optimise it , i can understand that you dont want to spend too much effort on ur work.
-Prakash
-- modified at 3:39 Wednesday 4th January, 2006
|
|
|
|
|
I have optimised and modified the code to suit my need. I never meant to say that you don't know it, but I was trying to tell you gave me some idea, but Kakan gave me the same with a proper sample.
Many thanks for your time.
Aljechin
|
|
|
|
|
Aljechin wrote: I have optimised and modified the code to suit my need. I never meant to say that you don't know it, but I was trying to tell you gave me some idea, but Kakan gave me the same with a proper sample.
yes, kakan gave you the solution after we had couple of converstation to pinpoint the exact problem.
-Prakash
|
|
|
|
|
Ah, yes of course. If there was a start you gave it and you were the first to reply too. I thanked you there i think. full of gurus here. I'm a bit scared. I am good at chess, not at MFC. LOL.
Aljechin
|
|
|
|
|
See how looooooooooooong you all have been fighting.;P
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Owner drawn wrote: See how looooooooooooong you all have been fighting.
I was not fighting
-Prakash
|
|
|
|
|
Did i hear someone saying the word fight? Who was fighting here?
Aljechin
|
|
|
|
|
Did you take note of the return value...
The return value is the number of characters copied to the buffer, not including the terminating null character.
So why don't you loop through the string instead of checking for NULL. This way you will get the full settings.
Here each string is seperated with a NULL char. So while looping you can replace these NULL chars with a semicolon or some special char.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thanks sir, the problem is solved.
Aljechin Alexander
|
|
|
|
|
and a similar, but more simple solution:
TCHAR chpValue[32767];
int ret = GetPrivateProfileSection(_T("WorkingDirs"),chpValue,startLen,m_IniFileName);
TCHAR* pBuf = chpValue;
while (pBuf[0] != '\0') {
CString buf(pBuf);
// do something
int len = buf.GetLength();
pBuf += len+1;
}
|
|
|
|
|
Helly can any one please let me know any difference between MFC and VC++.
Interviewer asking me as that
1. Rating on VC++
2. Rating on MFC
3. Rating on COM
So does it mean that VC++ AND MFC are different?
Any conclusions please.
Great people does great things.
|
|
|
|
|
VC++ generally means that you know programming for windows OS. i.e using its SDK.
MFC - its is a Framework provided by microsoft to develop application quickly and in OOP way it is developed using VC++.
COM - Component object model is again a technology on MS world where both C/C++ can be used.
-Prakash
|
|
|
|
|
VC++ is a programming language that can create programs to run on any system(windows, UNIX, CE, palm, XBox etc), if you have the correct compiler for that system.
MFC is a tool to make programming easier, with much code being generated automatically(although I personally feel it's overly convoluted)
COM is a tool to allow use of code from other programs and other languages with relative ease. Eg with COM you can write a program in C++ or pascal(or any language that supports com) that allows you to have an Excel spreadsheet running in the middle of your program. COM & OLE are debatably the same thing, but I think they are both getting old now.
|
|
|
|
|
VC++ is not a language, C++ is a language.
VC++ is just a SDK to program on windows platform using C++ or C.
-Prakash
|
|
|
|
|
Difference between copy constructor and asignment operator?
Please let me know any one?
Great people does great things.
|
|
|
|
|
Search google for Interview Questions.
-Prakash
|
|
|
|
|
A copy constructor works on an uninitialized object. An assignment operator works on an initialized object.
foo f1(someotherfoo); //copy constructor (uninitialized object)
foo f2 = f1; //copy constructor (uninitialized object)
foo f3;//f3 is initialized here
f3 = f2;//Assignment operator, because f3 has already been initialized
Top ten member of C++ Expert Exchange.
http://www.experts-exchange.com/Cplusplus
|
|
|
|
|
In workspace, there are eleven projects. In VC toolbar , Select "Project->Dependencies" , in options of "Dependent on the following projects" ,one of projects--** (this project is main project which call others projects) always depents six projects. when I run this program , my VC will paralysis. If I cancel these six depents in **, my VC program will run rightly. But this operation will do every time when I open VC. That is to say when I close VC and open again, this project ** will depent others six projects again. So what is the reason ?
Can you help me ? Thank you very much!
|
|
|
|
|
spy++ info:
<00201> 002C0724 S WM_NCHITTEST xPos:178 yPos:102
<00202> 002C0724 R WM_NCHITTEST nHittest:HTSYSMENU [lResult:00000003]
<00203> 002C0724 S WM_SETCURSOR hwnd:002C0724 nHittest:HTSYSMENU wMouseMsg:WM_LBUTTONDOWN
<00204> 002C0724 R WM_SETCURSOR fHaltProcessing:False [lResult:00000000]
<00205> 002C0724 P WM_NCLBUTTONDOWN nHittest:HTSYSMENU xPos:178 yPos:102
<00208> 002C0724 S WM_SYSCOMMAND uCmdType:SC_MOUSEMENU xPos:178 yPos:102
<00209> 002C0724 S .WM_ENTERMENULOOP fIsTrackPopupMenu:False
<00210> 002C0724 R .WM_ENTERMENULOOP lResult:00000000
<00211> 002C0724 S .WM_SETCURSOR hwnd:002C0724 nHittest:HTCAPTION wMouseMsg:0000
<00212> 002C0724 R .WM_SETCURSOR fHaltProcessing:False [lResult:00000000]
<00213> 002C0724 S .WM_INITMENU hmenuInit:002A0749
<00214> 002C0724 R .WM_INITMENU lResult:00000000
<00215> 002C0724 S .WM_CAPTURECHANGED hwndNewCapture:00000000
<00216> 002C0724 R .WM_CAPTURECHANGED lResult:00000000
<00217> 002C0724 S .WM_MENUSELECT uItem fuFlags:FFFF hmenu:00000000
<00218> 002C0724 R .WM_MENUSELECT lResult:00000000
<00219> 002C0724 S .WM_EXITMENULOOP fIsTrackPopupMenu:False
<00220> 002C0724 R .WM_EXITMENULOOP lResult:00000000
<00221> 002C0724 S .WM_NCHITTEST xPos:178 yPos:102
<00222> 002C0724 R .WM_NCHITTEST nHittest:HTSYSMENU [lResult:00000003]
<00223> 002C0724 R WM_SYSCOMMAND lResult:00000000
------------------------------------
case HTSYSMENU:
SendMessage(WM_SYSCOMMAND, SC_MOUSEMENU + HTSYSMENU, lParam);
Mouse left down the window icon last right area not system menu popup, but mouse left down in window icon (HTSYSMENU) other area is OK ? what happen?
now i know the key in <215><216>, but my project not used SetCapture and ReleaseCapture, where and why send the message to window?
how to fix it?
|
|
|
|
|
hello there,i need help in my GUI interface.
how do i display a bitmap images and having a button that can perform zooming in and also zoom out.
DIE!!DIE!!
|
|
|
|
|
There are lots of articles in CP for that.
Here's a brief example from MSDN....
// This OnDraw() handler loads a bitmap from system resources, centers
// it in the view, and uses BitBlt to paint the bitmap bits.
void CMyView::OnDraw(CDC* pDC)
{
CBlat2Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CBitmap bmp;
if (bmp.LoadBitmap(IDB_BITMAP1))
{
BITMAP bmpInfo;
bmp.GetBitmap(&bmpInfo);
CDC dcMemory;
dcMemory.CreateCompatibleDC(pDC);
CBitmap* pOldBitmap = dcMemory.SelectObject(&bmp);
CRect rect;
GetClientRect(&rect);
int nX = rect.left + (rect.Width() - bmpInfo.bmWidth) / 2;
int nY = rect.top + (rect.Height() - bmpInfo.bmHeight) / 2;
pDC->BitBlt(nX, nY, bmpInfo.bmWidth, bmpInfo.bmHeight, &dcMemory,
0, 0, SRCCOPY);
dcMemory.SelectObject(pOldBitmap);
}
else
TRACE0("ERROR: Where is IDB_BITMAP1?\n");
}
As far as Zoom in and out are concerned I think you can use StretchBlt.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you for replying to my problem..now im going to try it and see how it goes..
wooohooo
|
|
|
|
|
Hi everybody, so this is my first time to using C++ since 5 years ago. So i lost so many thing. Now i needs help. My questions is how can i combine or create html interfaces by using visual C++. Actually,i'm working on biometrics system authentication.i already create an interface but it doesnt have a good looking, so i decide to use HTML as a interface but i don't know how to do it.. i will appreaciate to any answer. Thanks.
|
|
|
|