|
Thanks for your advice, Mark!
I think I need to merge them into one pch file.
regards,
George
|
|
|
|
|
Hi I would like to Know the steps reqd to connect from VC++9 to oracle?
Cheers
|
|
|
|
|
|
Hi all,
I m working on VC++2005, and my application is SDI type.
when i run my application in MENUBAR the option of Print and print preview are disabled.
any one can tell me how can enable them.
Thanks in advance
|
|
|
|
|
Hi,
Is this discussion helpful: print handler[^]?
Best Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi all,
i have an problem in load icon for sub-dialog box.
i want to show main application icon on subdialog box or internal dialog box of application.
i m using this.
HICON m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
where IDR_MAINFRAME is icon of main application.but it not works.
anyone can help me.
thanks in advance
|
|
|
|
|
Hi,
Are you calling SetIcon() to set the loaded icon or not?
Best Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
thanks. now my problem is resolved
|
|
|
|
|
|
|
Where are you trying to change it? In the VS6 resource editor for example you right-click on the stringtable in Resource View -> Properties -> Language.
|
|
|
|
|
Today I wrote some code for my program. Unfotunately, it didn't work, and the reason was RegQueryValueEx failed Please check my code and help me to determine why it's fail.
DWORD dwType = REG_DWORD;
DWORD dwLength = sizeof(DWORD);
HKEY hkey;
long lres = RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\DeltaX\\TicTacToe"),0,KEY_QUERY_VALUE|KEY_SET_VALUE,&hkey);
if(lres!=ERROR_SUCCESS)
{
lres = RegCreateKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\DeltaX\\TicTacToe"),0,NULL,
REG_OPTION_VOLATILE,
KEY_SET_VALUE|KEY_QUERY_VALUE,
NULL,
&hkey,
NULL);
}
lres = RegQueryValueEx(hkey,TEXT("DifficultLevel"),NULL,&dwType,(PBYTE)&dwMode,&dwLength);
if ((lres!=ERROR_SUCCESS))
{
dwMode = 1;
RegSetValueEx(hkey,TEXT("DifficultLevel"),NULL,REG_DWORD,(LPBYTE)&dwMode,sizeof(DWORD));
}
RegCloseKey(hkey);
everything seems to be fine, but nothing's done. dwMode var gets 0 value, and I don't know why
I checked the registry, and the value of dwMode is OK.
Please tell me why
Thanks in advance
|
|
|
|
|
The code you provided never sets dwMode to 1
Maybe it should be:
if ((lres==ERROR_SUCCESS))
{
dwMode = 1;
RegSetValueEx(hkey,TEXT("DifficultLevel"),NULL,REG_DWORD,(LPBYTE)&dwMode,sizeof(DWORD));
}
|
|
|
|
|
Thank you, but you don't understand my code. In case that RegQueryValueEx fails (cause of something such as the value doesn't exit, etc), my program will re-create that value for later run.
Anyway, I changed my code and now it works well.
lres = RegQueryValueEx(hkey,TEXT("BoardSize"),0,&dwType,(PBYTE)&dwSize,&dwLength);
Thank you all!
|
|
|
|
|
Vimvq1987 wrote: ...RegQueryValueEx failed . Please check my code and help me to determine why it's fail.
I see no call to GetLastError() . Why?
"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
|
|
|
|
|
Hello everyone,
What I am confused is about,
http://www.gotw.ca/gotw/059.htm
--------------------
Indeed, often the best way to implement the Pimpl idiom is exactly as shown in Example 4 above, by using a pointer (in order to take advantage of nonthrowing operations) while still wrapping the dynamic resource safely in an auto_ptr manager object. Just remember that now your object must provide its own copy construction and assignment with the right semantics for the auto_ptr member, or disable them if copy construction and assignment don't make sense for the class.
--------------------
1. What means "the right semantics for the auto_ptr member"?
2. "disable" means for the class, copy construction and assignment are not needed? Curious. Never thought of a class which does not need that two basic functions.
thanks in advance,
George
|
|
|
|
|
George_George wrote: 1. What means "the right semantics for the auto_ptr member"?
Right semantics means: "a copy constructor and a assignment operator that make sense for that class", I think. Maybe a deep member copy, maybe different.
George_George wrote: 2. "disable" means for the class, copy construction and assignment are not needed? Curious. Never thought of a class which does not need that two basic functions.
For instance a Singleton .
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
|
|
|
|
|
Hi CPallini,
I lost your context, "maybe different" is different for what? Any more descriptions?
regards,
George
|
|
|
|
|
Well, suppose, for instance, you design a rather complex class (maybe a graphic tool). The class may cache some info to speed up computations. The cached info is part of class internal data but it isn't independent info and should be skipped by assignment operator.
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
|
|
|
|
|
Thanks CPallini,
Question answered.
regards,
George
|
|
|
|
|
hi
I have one source code (it was developed visual studio .NET 2003) but i have only VS2005 but visual studio 2005 does not compiling this source code why?
how to solve this problem?
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
|
If you still have trouble after reviewing the migration documentation, please
post the errors you''re seeing - verbatim! It's much easier to help that way
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi!
I have a problem with TopMost window on Windows Vista.
In Dialog's OnInitDialog method I try to set position by the following code
<br />
<br />
int cx, cy; <br />
HDC dc = ::GetDC(NULL); <br />
cx = GetDeviceCaps(dc,HORZRES) + <br />
GetSystemMetrics(SM_CXBORDER); <br />
cy = GetDeviceCaps(dc,VERTRES) +<br />
GetSystemMetrics(SM_CYBORDER); <br />
::ReleaseDC(0,dc); <br />
<br />
SetWindowPos(&wndTopMost, <br />
-(GetSystemMetrics(SM_CXBORDER) + 2), <br />
-(GetSystemMetrics(SM_CYBORDER) + 2), <br />
cx+5,cy+5, 0); <br />
that works fine in XP - dialog is realy top most, but on Vista sometimes it is not - some active windows like Firefox can be above of my dialog. I can't understand where is the problem here and how can it be fixed?
|
|
|
|
|
hi i need some extra explains from u ..
1. What's the error u get it from Windows vista?
2. Which type of compiler u used like VS2005 r some thing..?
give the answer for above questions..
and also try install service pack for windows vista and then u compile it
i think it's may be working fine .
Actually windows vista is one of the poor OS in this world ..but we ll try our level best!!
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|