|
Thanks Christian
another quick question..
I want to take the finished image and basically double up its size but leaving a blank between each pixel..
(basicaly I am making a pinball dmd)
I could (offcourse) draw it like that but I want to also do a background image (from another source (bit like an animated gif) and merge it in with my dots..
i was thinking to copy it line at a time (first vertical and then horizontal) into 2 other surfaces (of the new expanded size).
|
|
|
|
|
They are stored in lines, so it would be very simple to write a function that copies a bitmap into one twice it's size and steps through the destination pixels in 2's across and or down. Do you want to create the illusion of scanlines ?
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
|
|
|
|
|
a simular type of effect.. both horizontal and vertical (at the same time).. double spacing sort of thing where the space is 100% black and not aliased.
|
|
|
|
|
|
It's the first time that I work with MFC Appwizard(exe)
with many member variables on the screen, and when
I reach a certain number of "add variables", the program
compile well, but when I try to execute it CRASH.
Somebody can tell me how to avoid this? - Yhanks.
|
|
|
|
|
How many variables do you have ? I doubt this is the problem.
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've about 30 variables, and this is not the first time I work with
MFC Appwizard(exe).
What a sympatic fellow is Larry Antram 22 Oct 2002 !!
|
|
|
|
|
nencini wrote:
I've about 30 variables
Am if you remove some, does it work ? Have you used the debugger to see where it crashes ? I guarentee that it's not an upper variable limit you're hitting, unless you've got no HDD space for virtual memory and they are each 1600x1200x32 bit images.
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
|
|
|
|
|
Unfortunately I think that the debugger can't help me, because there
are not error in compiling. The crash only happen when I execute, with
the message "This program has executed an invalid opratione and willl
be teminated" .
If I remove some variables - of various type - (now I can't say how
many) all is going well.
I've never used the debugger, and I read alwais the error message that
appears on the output pane.
|
|
|
|
|
nencini wrote:
I've never used the debugger, and I read alwais the error message that
appears on the output pane.
Apparently not. The debugger is ONLY of use if your code compiles. Use F9 to set a breakpoint, make sure you're building a debug version, and hit F5 to start debugging. Your program will stop at your break point and you can step through the code by hitting F10, and see the values of your variables in the watch window.
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
|
|
|
|
|
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
|
|
|
|
|