|
I did that. But no use. The same erro exist. Whenever i click OK in the erro message,
The message map function declared in header file, get increased...like below
virtual BOOL OnInitDialog();
afx_msg void OnDblclkModelname();
virtual void OnOK();
virtual void OnCancel();
virtual BOOL OnInitDialog();
afx_msg void OnDblclkModelname();
virtual void OnOK();
virtual void OnCancel();
....
LIke this it continuosly goes........
Where is the problem...why it occurs like this....
Anu
|
|
|
|
|
Anu_Bala wrote: virtual BOOL OnInitDialog();
afx_msg void OnDblclkModelname();
virtual void OnOK();
virtual void OnCancel();
virtual BOOL OnInitDialog();
afx_msg void OnDblclkModelname();
virtual void OnOK();
virtual void OnCancel();
....
LIke this it continuosly goes........
Where is the problem...why it occurs like this..
Not sure Anu! Did you modify this file, class wizard adds certain markers to insert definitions and declarations for functions, if anyone of them gets modified then it's trouble.
Learn to do such things without help from class wizard, so that you don't get into trouble when it's not working! MSDN has method signatures for event handlers.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Hi,
InitThunk((TMFP) &CExtBox::HookProc, this);
m_hHook = SetWindowsHookEx(WH_CBT, (HOOKPROC) GetThunk(), NULL,GetCurrentThreadId());
ASSERT(m_hHook);
nRes = MessageBoxIndirect(&mp);
if(m_hHook)
UnhookWindowsHookEx(m_hHook);
This is the code part i am using and it was crashing when it calls MessageBoxIndirect().
This code was running from a long time now in fresh version of release this is giving problem. If i use MessageBox( ) then it is working but the function that i am calling is used in somany places so i cannot avoid it.
It is giving the following Application error
Event Type: Error
Event Source: Application Error
Event Category: (100)
Event ID: 1000
Date: 3/13/2008
Time: 7:14:39 AM
User: N/A
Computer: SILT06-FERG
Description:
Faulting application Acp.exe, version 5.2.1002.21, faulting module unknown, version 0.0.0.0, fault address 0x01f5f968.
Data:
0000: 41 70 70 6c 69 63 61 74 Applicat
0008: 69 6f 6e 20 46 61 69 6c ion Fail
0010: 75 72 65 20 20 41 63 70 ure Acp
0018: 2e 65 78 65 20 35 2e 32 .exe 5.2
0020: 2e 31 30 30 32 2e 32 31 .1002.21
0028: 20 69 6e 20 75 6e 6b 6e in unkn
0030: 6f 77 6e 20 30 2e 30 2e own 0.0.
0038: 30 2e 30 20 61 74 20 6f 0.0 at o
0040: 66 66 73 65 74 20 30 31 ffset 01
0048: 66 35 66 39 36 38 f5f968
I do not know how to check the callstack so please suggest me, now what can i do? This is a customer issue i need a solution badly please help me.
Yes everything is fine it was working from a long time and recently it is causing this problem and only with some systems.
So i dont think it is the problem with coding, it might be the problem with PC because it varies from PC to PC(It is crashing in Windows 2003).
Thanks & Regards,
Ramarao.
|
|
|
|
|
Give us something to work with?
Does it crash if you remove the hook code?
Steve
|
|
|
|
|
Maybe your program needs to some dlls that arent in 2003.
|
|
|
|
|
Here’s what i am trying to do. My application call setcapture, then on the window that is clicked i would like to retrieve the coordinates inside that window. In lmousebuttondown i convert clienttoscreen, get hwnd from windowfrompoint, and then call screentoclient with the hwnd of the target window. The coordinates are the client area, but arent correct if the window is being scrolled. What can i do?
Thanks
|
|
|
|
|
Nathan Going wrote: The coordinates are the client area, but arent correct if the window is being scrolled. What can i do?
Use GetScrollInfo , add amount scrolled(lpsi->nPos) to retrieved client co-ordinates. Hope this helps!
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Just to add to the other reply.
The scroll window has no actual relationship to window it is attached to.
Take notepad for example. Every time you click on the up arrow on the scroll bar, the text moves by one line of text. So the amount of pixels will vary depending on the font size. Which won;t really be available to some external program.
When a program uses scroll bars, and is asked to paint a window, it gets the scroll pos, and interprets that however it likes. And how they do it will be app dependent...
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
I don't know much about GDI stuff so I have a question that is probably quite striaghforward for someone...
I've added OLE to my application's document. I want to be able to epxort the OLE items as bitmaps to PDF. I've managed to add a function that will print my OLE items, by drawing them to the printer DC, thus:
void PrintOLEItems()
{
CDC dcWorld;
HDC hDC;
short iError;
hDC = (HDC)GetDC(&iError);
dcWorld.Attach(hDC);
dcWorld.SetMapMode(::GetMapMode(hDC));
CIrricadDoc* pDoc = m_pView->GetDocument();
if (pDoc!= NULL)
{
POSITION pos = pDoc->GetStartPosition();
while (pos != NULL)
{
CContainerItem* pItem = (CContainerItem*)pDoc->GetNextItem(pos);
LONG lHandle = pItem->GetRectHandle();
short nLayer = GetLayer(lHandle);
if (nLayer != -1)
{
Array<Layer>* pLayers = pDoc->GetLayers();
if ((*pLayers)[nLayer].IsVisible())
{
Polyline Rect;
GetEntityPoints(lHandle, VCRect);
Rectangle newrect;
newrect.Construct(Rect[0], Rect[2]);
CRect newsize = WorldRectToDeviceRect(&dcWorld, newrect, TRUE);
pItem->Draw(&dcWorld, &newsize, DVASPECT_CONTENT);
}
}
}
}
dcWorld.Detach();
}
Now, my PDF export object has a 'WriteImage' function to which I need to pass BYTE* Data. The pixel data must be arranged as an array of pixels with each pixel specified by three bytes, with a byte for red, a byte for green and a byte for blue. The pixels are arranged in rows starting from the top of the bitmap.
So I think, if I create a compatible dc, draw my OLE items to that dc I can extract the relvant data from the CBitmap object of the dc. The problem is, I have no idea how to do that...
Can anyone help?
Thanks
|
|
|
|
|
Hi all,
Can I pick your brains on RasDial as decribed in this MSDN article: http://msdn2.microsoft.com/en-us/library/aa377004.aspx[^]
I need to develop a very small application to deploy on WinCE 4.2 and 5.0 which can either create RasBook entries or demonstrate to a particularly unhelpful developer how to dynamically create/connect to a remote computer.
The problem I've come up against is this: The Ras entry needs to have some "Extra initialization settings" as Windows calls them (I'd call them Modem commands) as the WinCE devices connect to the internet via GPRS mobile phones - commands such as +CGDCONT=1,"IP","INTERNET" for example for Vodafone, and I can't see how to specify this.
One resource/ancient blog post I looked at suggested that the szEntryName of the RASDIALPARAMS can be used to do this, but I've no idea how to construct the connection string...
Any help appreciated!
|
|
|
|
|
The RasDial documentation your URL points to does not say it is supported on any version of WinCE.
led mike
|
|
|
|
|
True, but if I can even get something working on a desktop o/s that's a start.
|
|
|
|
|
Ok, take a look at the files in your system32/ras folder. But I don't think this is going to help your WinCE efforts.
led mike
|
|
|
|
|
First a disclaimer: I did not vote your post down.
From MSDN 6.0 days...
(For RasDial)
Windows CE: Requires version 1.0 or later.
|
|
|
|
|
bob16972 wrote: I did not vote your post down.
Yeah I don't care. hughes posted a URL and I commented that it doesn't say CE is supported, and it doesn't. Then people vote '1's without showing how my post is wrong. Bunch of f***ing monkeys.
led mike
|
|
|
|
|
I'm working on a project where I have two projects.
#1 is c++ dll. Works just fine
#2 is a unit test exe that test's out the DLL. My problem is that when I do a build, I cannot get the dll to automatically copy into my exe's debug directory.
I think I'm missing something. I did try using references, thinking that it worked like in c#, but did not solve my problem.
Any thoughts on how to do this.
Tom
|
|
|
|
|
perhaps in the project properties/general/ output directory?
|
|
|
|
|
Hi,
You can use custom build step for copying the DLL to destination folder.
Go to "Project | Properties | Custom Build Step | Command Line".
Enter Copy command.
Hope this will help you.
Regards,
Paresh.
|
|
|
|
|
Hello everyone, i finished with yesterdays work and got a fully functional crytography class that builds perfectly and today im starting to write my dialog based aplication.
i created a few dialogs and im trying to link them but i havent found how.
i know its an easy question but still i would like a recomendation.
in dialog A theres a button, when i press it i want to make dialog B appear on the screen, i've tryed the ->Create(); command but i think im using it wrong
ps: the aplication is in C++ for visual studio 2005
|
|
|
|
|
pabloraul wrote: in dialog A theres a button, when i press it i want to make dialog B appear on the screen, i've tryed the ->Create(); command but i think im using it wrong
So dialogA is showing when you run the application? If so then you have code that does shows a dialog, it's the same for DialogB, yes?
Abandon hope all ye who answer here.
Pete O'Hanlon - the General Discussions forum
|
|
|
|
|
yes, dialog A runs when the App starts the code is the following:
CZEUSv2008Dlg(CWnd* pParent = NULL); <br />
CEncriptacion * dialogo_encriptar;
but i dont know how to use it since im copying from a thing done like 10 years ago.
i tried
dialogo_encriptar->DestroyWindow();<br />
dialogo_encriptar->Create();
but it gives me
error c2027 for using an undefined class
and a c2227 for the left part of the "->" must point to a class struct union or generic type
im just plain confused with this
|
|
|
|
|
|
Where you tried it? I mean, does the posted code belong to a single source file?
Which line is the error c2027 for?
Maybe you need to post more code.
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
|
|
|
|
|
i asked my dad about it and he said it was from an old stupid class called "MyDlg" so he told me to find a new way to call dialogs.
now that code and way of doing it its obsolet so if i acomplish solving this issue i solved the issue for all the dialogs that need to be called.
already tryed to use the .DoModal(); thing but it didnt work
modified on Wednesday, April 2, 2008 4:04 PM
|
|
|
|
|
pabloraul wrote: ...i think im using it wrong
That all depends on if you want a modal or modeless dialog. If the former, use DoModal() , much like you are already doing in your app's InitInstance() method to bring up dialog A.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|