|
Well, I'm not so expert in VC++ as you think. I've activate the debugger,
and appea the window "Unhandled exception in xxx.exe 0xC0000005.
Access violation" and the code stop at the statement m_pMainWnd = &dlg;
The problem is that I don't Know what this means !!!!
I'm on the Titanic ship and I scream "HELP!!!!"
|
|
|
|
|
Is this an MFC app, or Win32 ? Is the line written by you, or the wizard ? What is the value of &dlg ? Is dlg a global, or is the pointer being stored about to belong to an object that has been destroyed ( when dlg goes out of scope ) ???
Not to be rude, but how long have you been using VC ? Do you have a specific project you need to get done, or are you a student ? I have no trouble helping you if you're studying, but I just want to know what your long term goal is so I can suggest some resources to help you understand what is going on here.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
It sounds like you have a Dialog App that is failing to create the dlg for some reason. Are you using some specialist controls on the dialog or have you assigned variables to controls you have later removed from the resource.
Sooner or later you are going to need to learn the art of debugging, you need to put a breakpoint at the beginning of the InitInstance function of your WinApp derived class and step (F11) into each function until you spot something going wrong.
If you post a portion of the dialog code that is going wrong, somebody here might be able to point you in the right direction.
Michael
Life’s not a song.
Life isn’t bliss.
Life is just this.
It’s living. -- Buffy the Vampire Slayer: Once more, with feeling
|
|
|
|
|
Yes, may be that I've assigned variables to controls and later removed
from the resource!!! (Is that a problem ????).
The debugger say that there are problems on the global theApp here:
BOOL CVivoliApp::InitInstance()
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
CVivoliDlg dlg;
--->> m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// ,,,,,,,,
}
else if (nResponse == IDCANCEL)
{
// ......
}
}
|
|
|
|
|
nencini wrote:
about 30 variables
How are you using them?
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
What's the use of mfc42ud.lib? Thanks
|
|
|
|
|
It is the import LIB for mfc42ud.dll (unicode debug MFC DLL). The Unicode libs are not installed by default, but you can find them on the VC CD or in the VC service packs.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I'm receiving an error code of 1026 when I call SHFileOperation. I have read to documentation on the SHFILEOPSTRUCT structure and it indicates that I have to append an additional NULL at the end of the string to indicate the end of pFrom. I have done so, however I'm still receiving a 1026 error code. What am I doing wrong?
Help would be very much appreciated!
<br />
hResult = psfInternetFiles->EnumObjects(NULL, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN, &ppenumFiles);<br />
<br />
while (hResult = ppenumFiles->Next(1, &pidlInvFile, &lceltRecFetched) == S_OK && lceltRecFetched == 1)<br />
{<br />
memset(szSourceFiles, '\0', sizeof(szSourceFiles));<br />
SHGetPathFromIDList(pidlFiles, szSourceFiles);<br />
hResult = psfInternetFiles->GetDisplayNameOf(pidlInvFile, SHGDN_INFOLDER, &filename);<br />
hResult = StrRetToBuf(&filename, pidlInvFile, strFilename, MAX_PATH);<br />
<br />
hResult = psfInternetFiles->GetAttributesOf(1, (LPCITEMIDLIST *) &pidlInvFile, &uAttr);<br />
<br />
if(!psfFirstFolder)<br />
{<br />
uAttr = SFGAO_FOLDER;<br />
psfInternetFiles->GetAttributesOf(1, (LPCITEMIDLIST *) &pidlInvFile, &uAttr);<br />
if(uAttr & SFGAO_FOLDER)<br />
{<br />
hResult = psfInternetFiles->BindToObject(pidlInvFile, NULL, IID_IShellFolder, (LPVOID *) &psfFirstFolder);<br />
}<br />
}<br />
pMalloc->Free(pidlInvFile);<br />
<br />
strcat(szSourceFiles, "\\");<br />
strcat(szSourceFiles, strFilename);<br />
<br />
sfo.hwnd = NULL;<br />
sfo.wFunc = FO_DELETE; <br />
sfo.pFrom = szSourceFiles;<br />
sfo.pTo = NULL;<br />
sfo.fFlags = FOF_NOCONFIRMATION | FOF_SILENT | FOF_NOERRORUI;<br />
<br />
hResult = SHFileOperation(&sfo); <br />
SHChangeNotify(SHCNE_DELETE | SHCNE_DISKEVENTS , SHCNF_DWORD, 0, 0);<br />
}<br />
|
|
|
|
|
i am storing a lparam in callback recorder hook function in these lines of code.purpose is to store a keyboard event and replay it.
struct S_ENODE {
EVENTMSG Event;
};
S_ENODE *g_lpLastEvent= (S_ENODE*)malloc(sizeof(S_ENODE));
LPEVENTMSG lpEvent= (LPEVENTMSG)lParam;
g_lpLastEvent->Event.message = lpEvent->message;
g_lpLastEvent->Event.paramL = lpEvent->paramL;
g_lpLastEvent->Event.paramH = lpEvent->paramH;
g_lpLastEvent->Event.time = GetTickCount();
g_lpLastEvent->Event.hwnd = NULL;
i am replaying it like that where
h is the handle of edit box. is there any mistake in it ?because it display nothing in edit box .
::SendMessage(h, g_lpLastEvent->Event.message,(WPARAM) 0, (LPARAM)g_lpLastEvent);
r00d0034@yahoo.com
|
|
|
|
|
Why are you using malloc instead of new ?
Surely your last parameter needs to be g_lpLastEvent->Event.paramL ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
thanks for your reply.
it just a mistake?
i could not understand ?
why g_lpLastEvent->Event.paramL?
r00d0034@yahoo.com
|
|
|
|
|
Because that is where you stored the lparam value of the original event you're trying to duplicate, isn't it ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
yes.
its not working ?
r00d0034@yahoo.com
|
|
|
|
|
imran_rafique wrote:
its not working ?
Are you saying you changed the variable and it's still not working ? Why is wparam always 0, instead of passing in what you stored ? I dunno, I'm just looking at things that seem to me at first glance to be obvious errors, so I may be off base here.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
imran_rafique wrote:
its not working ?
Christian
Are you saying you changed the variable and it's still not working ? Why is wparam always 0, instead of passing in what you stored ? I dunno, I'm just looking at things that seem to me at first glance to be obvious errors, so I may be off base here.
imran
yes you are right.
infect i have study an articale here in codeproject thats the hookmanager where keyboard events are recorded and replayed ?
in that article only the lparam is stored and thats why i think wparam is 0.i could not remember the link but if you search it here by this hookmanager's name then please see the journalrecorder and journalplayback function.
the only difference between the hoomanager'article and my is the replaying.replaying in my code is done by threading in csharp i have been successed in doing that but only some charaters remains.
r00d0034@yahoo.com
|
|
|
|
|
transparent overlays in client areas
hi, a quick, but perhaps not so simple question.
I want a bunch of transparent overlays in the client areas. Perhaps the easiest way would be to create a bunch of transparent modeless dialogs? is this right?
And how can i make my modeless dialog be able to "snap" to certain part of the screen - u know, like toolbars?
btw, i want the transparent overlays (modeless dialogs) to be able to be dockable AND with NO titlebar (or if... a very small title bar) AND be able to move around by user?
thanks.
norm
|
|
|
|
|
I *think* CCommandBar is the class which does this in MFC. Basically it creates a docking window to insert the toolbar into when it docks, otherwise it floats as a child of the main window. I think that may be the smartest way, if you just handle WM_MOVE and move your children, they will inevitably lag behind when being moved quickly and look awful. The full MFC source is on your hard drive
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
i dont recall i've seen this class. but will check up on it.
but lag and flicker is unacceptable. no. every GUI is a piece of art. i came from an engineering background. and i'm real F***ING SICKKK of the utilitarian mentality (just because you are an engineer that doesnt mean that your website and your clothes and your creation and your everything around u has got to be disgusting! just because your production facility has to be efficient, it doesnt mean that it has to be digusting!)
well, i guess most engineer lack this artistic... whatever u call it.
sorry for the bitc*ING, cant help it.
|
|
|
|
|
Also, how can I make the scrolling tab method actually show the scrolling tab? If I could do that, that would answer all my other questions.
|
|
|
|
|
I am still stuck. I have a property sheet with 20+ property pages. It just cuts of the 16th property page (and doesn't display or even let me access any page past the 16th). I added:
int CMyPropertySheet::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
// Set for Scrolling Tabs style
EnableStackedTabs(TRUE);
// Call the base class
if (CPropertySheet::OnCreate(lpCreateStruct) == -1)
return -1;
return 0;
}
But it looks funny initially. The rows are stacked, but the top row looks cut off. Once I click on a page, then the rows look stacked.
If the rows are stacked, how can I make it select the first page so that one row doesn't cut off another row?
Is it possible to make 10 pages the first row and 10 pages the second row? Currently, it just goes to 16 for the first row and then the next 4 rows are really long tabs?
Please, please, please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
It's better to use a tree control to organize option dialogs instead of tabs if you have so many pages - like this[^].
Pavel
Sonork 100.15206
|
|
|
|
|
|
I feel kinda dumb asking this question...
How can I display a bitmap onto a dialog from a file not a resource. All the examples I've been able to find require handles for API. Thanks
-Ken Mazaika
|
|
|
|
|
::LoadImage
Or if it's not a bmp, use CXImage, GDI+, Paintlib, FreeImage, or something like that.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
For ::LoadImage what could I put for the HINSTANCE? Thanks
-Ken Mazaika
|
|
|
|
|