|
Thanks I found the answer the whole setting is stored in
HKEY_CURRENT_USER\Software\Local AppWizard-Generated Applications\%ApplicationName%
and I should delete this registry.
|
|
|
|
|
I am having the same problem and have to delete the registry entry. I wonder which part writes it to the registry, Visual Studio or my Application? And how do I disable writing to the registry either in the Visual Studio or in Application?
|
|
|
|
|
Of course the Application is responsible for saving registry info, you could test it with running release build explicitly from Bin file and changing the application custom setting, and the registry key Name is stored in your main application class cpp file (class drived form CWinAppEx) in the CwinAppEx::::InitInstance() method in the
SetRegistryKey(_T("Local AppWizard-Generated Applications")); but I have no idea of where it save the custom styles. It should be some where after whole main frame is created.
|
|
|
|
|
Yes, you could use your CWnAppEx::SaveState(..) and CWinAppEx::LoadState(...) virtual void BeHappy() = 0;
|
|
|
|
|
Any dynamic changes you make while your app is running are not saved into your source code. If you want changes to be permanent then you need to make them in your source code, before you rebuild. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
I think i couldn't discuss the problem clearly, I mean I have changed the application in running mode, know the application rebuilds every time in the way I have changed it in running mode and every change I have made in source code became defectiveness.
|
|
|
|
|
Hey,
i develop a application to control usb-devices under windows xp with winddk and i get everytime ERROR_GEN_FAILURE if i tried to connect.
i get a devicepath for every device connected to my computer with "SetupDiGetInterfaceDeviceDetail/SetupDiEnumDeviceInfo/..", then i tried to create a handle. If i connect to my keyboard or mouse i get this error code with "CreateFile" and if i use my mp3-player "CreateFile" works and i get this error code with "DeviceIoControl".
ERROR_GEN_FAILURE (31) = "A device attached to the system is not functioning."
my devices are working fine on windows xp without any problems.
thangs
|
|
|
|
|
Hi all,
i m working on dialog box type aplication.
i m using many controls,bitmaps over the button and background color for dialog box.
after some time of using application, application takes time to repaint the dialog box.
please tell me how can i recove it ,so dialog box display easily instead of time taken in repainting.
thanks in advance.
|
|
|
|
|
it depends on the actions performed by each controls or the size of the bitmap etc.
Please check that also.
Your system spec also have considerable role..
|
|
|
|
|
When just start the application its working fine,but after some time its behaves like this.
its occur on simple dialog box restore and Domodal of dialog box etc,here no button function is performed.
please help me what can i do 4 this.
thanks in advance.
|
|
|
|
|
May be you can check for GDI leaks & memory leaks in your application. I think you can use Task Manager to verify it.
|
|
|
|
|
Is it working fine in the initial startup?
You mentioned above,"After some time use of application, application takes time to repaint the dialog box".
thats why i am asking so...
|
|
|
|
|
I think there is memory leak in your application. Check all the allocated memory status. After use release all allocated memory. Check it especially in bitmap loading code.
Good Luck...
|
|
|
|
|
Output window is like this
‘Test.exe’: Loaded 'C:\Windows\System32\ntdll.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\kernel32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\user32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\gdi32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\advapi32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\rpcrt4.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\msimg32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\comdlg32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\msvcrt.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\shlwapi.dll'
‘Test.exe’: Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18005_none_5cb72f96088b0de0\comctl32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\shell32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\winspool.drv'
‘Test.exe’: Loaded 'C:\Windows\System32\oledlg.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\ole32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\oleaut32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\winmm.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\oleacc.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\imm32.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\msctf.dll'
‘Test.exe’: Loaded 'C:\Windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6002.18005_none_9e50b396ca17ae07\GdiPlus.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\lpk.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\usp10.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\uxtheme.dll'
‘Test.exe’: Loaded 'C:\Windows\System32\dwmapi.dll'
Detected memory leaks!
here i found Detected memory leaks!,but i dont know how can get the location of this memory leak,
how can get at which porint or on wich function memory leaks.
please help me for this.
thanks.
|
|
|
|
|
Can i see your code for loading the bitmap...?
|
|
|
|
|
For buttons i use this.
CBitmapButton m_t_btn;
m_t_btn.LoadBitmaps(IDB_B_N, IDB_B_P, IDB_B_N, IDB_B_P);
m_t_now_btn.SizeToContent();
here IDB_B_N and IDB_B_P
and on dialog box i m using picture ctrl pf bitmap type and provide image id to used
|
|
|
|
|
Is any memmory leak from CBitmapButton class..?
Use this utility separately in a test app to check the behavior...
|
|
|
|
|
actully i dont know how can i detected memory leak in application,
so how can i know memory leak occur from CBitmapButton or not.
|
|
|
|
|
Create a test application that using CBitmapButton class. Use the above code in that application and continuously use that application. Check the usage in Task Manager... It will help you to find the memory leak is from CBitmapButton ...
|
|
|
|
|
if i use application without CBitmapButton code,its still behave like this.
|
|
|
|
|
That means, the problem is not from the CBitmapButton. Now check your dialog skinning code.Just like commenting the code for coloring the dialog or controls.
This way you can find out the exact problem...
|
|
|
|
|
i use this for color
CBrush m_brush;
m_brush.CreateSolidBrush(RGB(241,244,250));
HBRUSH CTest::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
switch (nCtlColor)
{
case CTLCOLOR_EDIT:
pDC->SetTextColor(RGB(0,0,0));
pDC->SetBkColor(RGB(255,255,255));
return hbr;
case CTLCOLOR_STATIC:
LOGBRUSH logbrush;
m_brush.GetLogBrush( &logbrush );
pDC->SetTextColor(RGB(0,0,0));
pDC->SetBkColor(logbrush.lbColor);
return m_brush;
case CTLCOLOR_BTN:
case CTLCOLOR_MSGBOX:
case CTLCOLOR_DLG:
return m_brush;
default:
return m_brush;
}
}
BOOL CTest::OnEraseBkgnd(CDC *pDC)
{
CPen myPen,hpenOld;
CRect rect;
GetClientRect(&rect);
for(int i=0;i<rect.bottom;)
{ myPen.CreatePen(PS_SOLID,1,RGB(241,244,250));
pDC->SelectObject(&myPen);
pDC->MoveTo(0,i);
pDC->LineTo(rect.right,i);
i++;
myPen.DeleteObject();
}
return 1
}
|
|
|
|
|
I cant find any problem in your code... Any way just comment your code in the OnEraseBkgnd and try to sort out the problem... If the problem is still there then we can avoid this one also from the problem list...
|
|
|
|
|
Le@rner wrote: BOOL CTest::OnEraseBkgnd(CDC *pDC)
{
CPen myPen,hpenOld;
CRect rect;
GetClientRect(&rect);
for(int i=0;i<rect.bottom;)
{="" mypen.createpen(ps_solid,1,rgb(241,244,250));
="" pdc-="">SelectObject(&myPen);
pDC->MoveTo(0,i);
pDC->LineTo(rect.right,i);
i++;
myPen.DeleteObject();
}
return 1
}
Actually you are filling dialog with RGB(241,244,250) color.
Change the OnEraseBkgnd
BOOL CTest::OnEraseBkgnd(CDC *pDC)
{
CRect rect;
GetClientRect(&rect);
pDC->FillSolidRect(rect,RGB(241,244,250));
return TRUE;
}
to avoid for loop, unnecessary creation and destroying of pen,and filling dialog background color using LineTo and MoveTo functions.
This one can make you drawing bit faster.modified on Tuesday, March 9, 2010 8:00 AM
|
|
|
|
|