|
|
thanks~ but.. what is alpha??
woosoo
-- modified at 9:38 Sunday 19th March, 2006
|
|
|
|
|
Hi,
Wen i open a particular project and try to compile it my msdev crashes and wen i debug it i get the following info:-
Unhandled exception in MSDEV.EXE(MSPDB60.dll)0x0000005 Access Violation
This hapens only for this paricular project .
has anyone of you faced similar problems .
Thanx in Advance
Regards,
FarPointer
|
|
|
|
|
I had a similar problem earlier today. MSDEV crashed when I tried to run my code in the debugger. I tracked the problem down to the initialisation of a basic_string class. For some reason when inisializing the string object the string was too long, even though it was well under the 4294967294 chars specified by MS.
Your project may have a similar problem in that something is being initialised beyond it's memory allocation.
|
|
|
|
|
Well Thanx for showing the interest :-
Actually wat i feel is MSPDB60.dll is for Microsoft-Program-DataBase , something like the linker data overriding the compiler data , etc which gets the msdev enter an infinite loop and leading to stack overflow and crash.
While in your case it was during runing in my case its during compilation this worked fine in another pc .
All i know is iam stuck and need to recreate the whole project(dsz,etc..)
Regards,
FarPointer
|
|
|
|
|
when I run my application , it occurs follow error :
Debug assertion failed
Program E:\Visual C\booth\Debug\booth.exe
File:strex.cpp
line:672
For information on how your program can cause an assertion failure ,
see the Visual C++ documentation on asserts
(Press retry to debug the application )
Abort Retry Ignore
How can i debug it ?
thanks
|
|
|
|
|
Do you test with Debug(key F5)?
I suggestion that you insert breakpoint(key F9) in the any function and use
key F5,Now you can find error(I hope)
maybe it is some helpful to you
|
|
|
|
|
|
how to update the font dialog box in the second tme you open it.
|
|
|
|
|
The first parameter to the CFontDialog c'tor is either a pointer to a LOGFONT structure or a reference to a CHOOSEFONT structure. If use the same structure every time (ie do not create a new one every time) then the CFontDialog will have the same settings as the last time.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
I'm trying to obtain the recycle bin folder and have tried the following two ways. Both of them dont work, any idea what is wrong in each of them? I ran them on Windows XP.
<br />
void recycle_bin1()<br />
{<br />
char szPath[4096] = { '\0' };<br />
HRESULT hr = SHGetFolderPath(NULL, <br />
CSIDL_BITBUCKET,<br />
NULL,<br />
SHGFP_TYPE_CURRENT,<br />
szPath);<br />
<br />
const char *str = "SUCCEEDED";<br />
if (hr == S_FALSE) {<br />
str = "S_FALSE";<br />
} <br />
if (hr == E_FAIL) {<br />
str = "E_FAIL";<br />
}<br />
if (hr == E_INVALIDARG) {<br />
str = "E_INVALIDARG";<br />
}<br />
<br />
MessageBox(NULL, szPath, str, NULL);<br />
<br />
}<br />
void recycle_bin2()<br />
{<br />
char szPath[4096] = { '\0' };<br />
<br />
BOOL bRet = SHGetSpecialFolderPath(NULL, <br />
szPath,<br />
CSIDL_BITBUCKET, <br />
FALSE);<br />
<br />
const char *str = "SUCCEEDED";<br />
<br />
if (bRet == FALSE) {<br />
str = "FAILED";<br />
}<br />
<br />
MessageBox(NULL, szPath, str, NULL);<br />
<br />
}<br />
<br />
thanks!
|
|
|
|
|
|
|
The first one returns E_INVALIDARG and the second one returns FALSE.
MSDN doesnt say these APIs set the last error code, so I havent printed them.
I'm away from the computer that has this code, I will get back with the error codes in a couple of hours.
thanks!
|
|
|
|
|
Most APIs that return a BOOL will set the last error - otherwise there's no indication of what the error was.
SHGetFolderPath() is returning E_INVALIDARG because CSIDL_BITBUCKET isn't a constant that it supports (the docs list which ones it accepts, it's a subset of the full list).
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
OK, that means I cannot use both of SHGetFolderPath and SHGetSpecialFolderPath .
Btw, both of these APIs returned last error 6 (invalid handle), which in some sense is meaningless.
Looking at the codeproject article you gave, they use SHGetSpecialFolderLocation which supports CSIDL_BITBUCKET , but it returns LPITEMIDLIST and I am not sure how to obtain the folder name from that.
In any case, I was looking at the documentation of CSIDL_BITBUCKET again, and it gives me the virtual folder containing the items in the recycle bin. I'm not sure if COM is the only way to access the items in this virtual folder, as shown in the article, or if there is a simpler way too.
So, what I really want is, the name of the recycle bin folder on each of the drives on the system, like C:\RECYCLER. Since it is C:\RECYCLED on a FAT drive, I wanted to use a windows API to obtain the correct name. So, I guess CSIDL_BITBUCKET wont give me that - is this right?
So, may be I should just enumerate the drives, get the file system type, and use RECYCLED or RECYCLER appropriately. Here is a link that talks about these folder names - http://blogs.msdn.com/oldnewthing/archive/2006/01/31/520225.aspx[^] - although it is not clear from this link what happens to a folder named RECYCLER on a FAT drive that is converted to NTFS.
thanks!
|
|
|
|
|
oh oh OH... that's the sound of me realizing something. I was focussing on the return values and not the folder you were looking at. The Recycle Bin isn't a file system directory, so SHGetSpecialFolderPath() will never work. I don't know of an API to get the name of the actual file system dir (recycled/recycler/whatever it is). If you are interested in the contents of the Bin, then use SHGetSpecialFolderLocation() to get the PIDL to the Bin, then use the shell folder interfaces to enumerate the contents.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Hi guys. how can I access and manipulate a slider found in my texture dialog box that i have created. I have the following procedure that handles textures in my program
BOOL CALLBACK IDD_TEXTUREProc( HWND hWnd,<br />
unsigned int uiMsg,<br />
WPARAM wParam,<br />
LPARAM lParam )<br />
{<br />
unsigned int uiSize;<br />
<br />
switch( uiMsg )<br />
{<br />
case WM_INITDIALOG:<br />
SetWindowPos( hWnd, <br />
NULL, <br />
350, 300, <br />
0, 0, <br />
SWP_NOSIZE );<br />
<br />
<br />
return TRUE;<br />
break;<br />
<br />
case WM_COMMAND:<br />
switch( LOWORD( wParam ) )<br />
{<br />
case ID_TEXTUREDD_GENERATE:<br />
uiSize= ( unsigned int )GetDlgItemInt( hWnd, IDC_ROUGHNESS, NULL, true );<br />
<br />
g_bruteForce.GenerateTextureMap( uiSize );<br />
<br />
EndDialog( hWnd, 0 );<br />
return TRUE;<br />
break;<br />
<br />
case ID_TEXTURE_CANCEL:<br />
EndDialog( hWnd, 0 );<br />
return TRUE;<br />
break;<br />
}<br />
break;<br />
}<br />
<br />
return FALSE;<br />
}
And in my main, im doing this:
int WINAPI WinMain( HINSTANCE hInstance, <br />
HINSTANCE hPrevInstance, <br />
LPSTR lpCmdLine, <br />
int nCmdShow ) <br />
{<br />
while( true )<br />
{<br />
if( !g_glApp.HandleMessages( ) )<br />
break;<br />
<br />
if( g_glApp.MenuDown( ID_EXIT ) )<br />
PostQuitMessage( 0 );<br />
<br />
else if( g_glApp.MenuDown( ID_SCREENSHOT ) )<br />
g_glApp.TakeScreenshot( "screenshot.bmp" );<br />
<br />
else if( g_glApp.MenuDown( ID_GENERATE_TEXTURE_MAP ) )<br />
g_glApp.CreateDialogBox( IDD_TEXTURESIZE, IDD_TEXTUREProc );<br />
<br />
}<br />
}
What code do i need to insert in main and where??
Please Help!!
P:S: Both BOOL CALLBACK IDD_TEXTUREProc and int WINAPI WINMAIN are found in main.cpp
Thanks in advance
|
|
|
|
|
I am doing MFC Dialog Based programming in vc++.
I have import an icon and i want to put this icon on a button.
How can i put that icon on a button.
Please give step by Step process to add it on button.
Thanks in Advance.
alok chauhan
|
|
|
|
|
check this[^] out
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
|
Hi All
I want to find all the sites visited by a user in Mozilla Firefox.
As I know that for Internet Explorere there are some interfaces like IEnumSTATURL, IUrlHistoryStg2 etc. for finding history and cahche files of internet explorer.
So is there any similar way to find out history, cache, cookies etc. in Mozilla Firefox. Please tell me.
if not then please guide me the way to achive this.( better if provide some code snippets)
Thanks.
|
|
|
|
|
Hi,
I am developing a program using C++ and WinAPI (no MFC). It contains resources like dialogs and menus. What is the best way to make those resources language independent? I'd like to provide language packs for English, German etc...
|
|
|
|
|
People generally use different resource DLLs for different languages
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|