|
Hi all im getting error as :C1010: unexpected end of file while looking for precompiled header directive.. whenever i try to compile program with CppSQLite headers.. I included the sqlite.lib reference in thye linker options.. pls its urgent... i need to submit a mini project.. its dependent on ur help....
|
|
|
|
|
gkns wrote: pls its urgent
Well, you know, Google is very fast [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
and if the previous answer doesnt help, read the comments (on about Page 5) of the CPPSqlLite article by Rob Groves, where someone had that exact issue and was given two ways of fixing it (one of which CPallini's google search found for you)
Often it helps to read through the comments at the bottom of an article ..
'g'
|
|
|
|
|
HI
im using HRGN stuff, i have 2 boxes that have a variable width and height, on mouse down in the corner ive coded it to change the width and the height variables and update but the two HRGN's dont update,
int nWidth = 550;
int nHeight = 400;
HRGN hRegion1 = CreateRectRgn(0, 0, nWidth, nHeight);
HRGN hRegion2 = CreateRectRgn(0, 0, nWidth, nHeight);
void ClientResize(HWND hWnd, int nWidth, int nHeight)
{
RECT rcWnd;
POINT pnt, pntDiff;
GetCursorPos(&pnt);
GetWindowRect(hWnd, &rcWnd);
if((pnt.x >= (rcWnd.right-20))&&(pnt.y >= (rcWnd.bottom - 20)))
{
pntDiff.x = pnt.x - nWidth;
nWidth += (int)pntDiff.x;
pntDiff.y = pnt.y - nHeight;
nHeight += (int)pntDiff.y;
MoveWindow(hWnd, rcWnd.left, rcWnd.top, nWidth, nHeight, TRUE);
}
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
case WM_CREATE:
g_Hwnd = hWnd;
dwStyle &= ~(WS_CAPTION|WS_SIZEBOX);
SetWindowLong(hWnd, GWL_STYLE, dwStyle);
CombineRgn(hRegion1, hRegion1, hRegion2, RGN_OR);
SetWindowRgn(hWnd, hRegion1, true);
break;
case WM_LBUTTONDOWN:
ClientResize(hWnd, nWidth, nHeight);
break;
case WM_LBUTTONUP:
UpdateWindow(hWnd);
break;
}
|
|
|
|
|
Sarriss wrote: but the two HRGN's dont update
I don't see any code that changes the regions there
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
it changes the values used in the region, do i have to restate those regions then or is there a way of updating them
|
|
|
|
|
The values used to create the region have no relevance later.
Yes, you need to alter the regions if you want them altered.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Also note that once you call SetWindowRgn(), the window owns the region
(you aren't supposed to touch it).
You need to create a new region to update the window region again.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I want to know if any application is listening to my keyboard activity by set using the low level keyboard hook.
How can i do it ?
|
|
|
|
|
Pray for divine guidance. I am serious - that is about the only fool-proof way. Any way you can come up with to detect a hook, some malicious soul can defeat. At his worst, HWMNBN (he who must not be named) will install a keyboard filter and then you are totally at his monitoring-mercy.
How can you tell what is an "appropriate" use of a keyboard hook and what is a malicious one? Ain't no way.
Judy
|
|
|
|
|
Hi All
I have a problem to cut the string.How can i cut this string last file name. Old String
C:\abc\cd\as.txt And i want to show New String
C:\abc\cd
Plz help me
|
|
|
|
|
You can use of CStringMid or CString:Left.
|
|
|
|
|
You can use CString::ReverseFind() to get the zero based index of the last backslash and then truncate it with CString::Mid() .
You can also use _splitpath() to split a path into its contents and then rebuild the string.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Can you give me example.Plz help me
|
|
|
|
|
Something like the snippet below
This is at the top of my head and I haven't tried to compile it, but you should get the idea anyway...
CString FullPath = _T("C:\\abc\\cd\\as.txt");
CString DirPath;
int nPos = FullPath.ReverseFind( _T('\\') );
if( nPos >= 0 )
{
DirPath = FullPath.Mid( 0, nPos + 1 );
}
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
How is declared your string?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This type
CString array[10]
|
|
|
|
|
Hence follow the Roger Stoltz's advice [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Sir My Problem is that i want to cut File name in the exiting string.
|
|
|
|
|
u can use the ReverseFind() and mid() functions to cut the file name. please check the examples the functions.
|
|
|
|
|
Hi,
Roget scoltz has given a nice solution. Did you tried that.
CString FullPath = _T("C:\\abc\\cd\\as.txt");
CString DirPath;
int nPos = FullPath.ReverseFind( _T('\\') );
if( nPos >= 0 )
{
DirPath = FullPath.Mid( 0, nPos);
}
AfxMessageBox(DirPath);
|
|
|
|
|
Thank it is working.
Can i cut like this C:\\abc.If yes then plz help me
|
|
|
|
|
Roger said to you how to do it, you then comeback to ask for code. Now, there's something else which is utterly similar, but you want someone else to do it for you.
Why don't you write your code yourself? Today is a good day to start.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Not code just tell me how can i cut this C:\\abc\\cd\\as.txt and show C:\abc.
Thanks in advance
|
|
|
|