|
Alternatively, I can use InsertString() function to insert the item at whatever position I want.
Thanks & Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
rp_suman wrote: Can we avoid sorting of CComboBox programmatically?
Removing CBS_SORT style from the combo should help! Take a look at ModifyStyle and ModifyStyleEx functions.
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 Nibu Thomas, thanks for the great help!!
I thought if there should be a function to remove the style and you pointed it..
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
An alternative is to use the resource editor. Open the properties of your combo box: there is a 'Sort' property that you can disable.
|
|
|
|
|
Hi Thanks for the help!!, I thought of using "Sort" in resource, but if I do in resource I have to synchronize it with offshore development team.
If I do in code, I can just update them c++ source code and resource not needed.
Regards,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi masters!
How can I relize how many new eMailes are there in a certain inbox!
I kowe it's difficult to explain all things at this time here. But mayby you know a link or something ...
Thnx!
|
|
|
|
|
Which inbox? gmail, yahoo, outlook, outlook express, thunderbird?
-Saurabh
|
|
|
|
|
Is it relating to Outlook items? Have you looked at the Outlook Object Model?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Usef Marzbani wrote: How many new eMails are there in my inbox?
42 ?!
|
|
|
|
|
toxcct wrote: 42 ?!
it looks like someone didn't understand your joke
|
|
|
|
|
Using Visual C++ 6.0 MFC in SDI application
I created a dialog box class called CTestDialog and assocatied files TestDialog.cpp and TestDialog.h. The dialog box ID is IDD_TESTDIALOGBOX. I want to have it run as a modeless dialog, and I have a routine in MainFrm.cpp where I want to control the display of this dialog box.
When I put the header file for test dialog into MainFrm.cpp I get a compilation error.
#include "TestDialog.h"
error C2065: 'IDD_TESTDIALOGBOX' : undeclared identifier
I don't get this error when the header file is placed in any other .cpp file. I don't understand what the problem is.
Thanks
|
|
|
|
|
The dialog IDs are defined in resource.h
So add #include "resource.h" in your corresponding cpp file which shows the error.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
|
You can also edit TestDialog.h and put
#include "resource.h" at the top, before your CTestDialog declaration.
|
|
|
|
|
hi
i created an application in vc++/MFC
now iam using ado to connect to the databaase
but there is aproblem i couldnot find any solution for it ....pleeease help
the problem is this error :
error C2501: '_ConnectionPtr' : missing storage-class or type specifiers
error C2146: syntax error : missing ';' before identifier 'm_pConn'
while iam defining : in stdafx.h
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
no_namespace \
rename( "EOF", "adoEOF" )
and in the main class i define :
public:
_ConnectionPtr m_pConn;
i searched about this error and it all seemed about the # import
but i couldnot find any anything wrong about it
pleeease help me
its driving me crazy
|
|
|
|
|
I just tried this in VS 2008 and it compiles without any problem. What version of visual studio you are using and what type of MFC application you are working with?
-Saurabh
|
|
|
|
|
i use vs 6.0
and what drives me crazy is that i have another application that works FINE
but when i created anew one with the same steps
it gave me 70 errors starting with:
error C2501: '_ConnectionPtr' : missing storage-class or type specifiers
what should i do ????
i traced the two applications line by line but nothing is different....
|
|
|
|
|
I can understand your frustration but I do believe that something has to be different. If everything is same in two projects then it is not possible for one project to work and other to fail. So I will recomment that you try comparing the differences between two projects using winmerge[^]. It can compare differences between two directories as well.
-Saurabh
|
|
|
|
|
I'm trying to use Detours Library to prevent a Termination of a specific process
through the Task Manager, so I hooked a DLL in the Task Manager.
The Hooking part is fine, but the checking of which process is been terminated
not working for me.
i dont know what is wrong with this code
the if statement always returning false...
by the way the detours part is working ok.
BOOL My_TerminateProcess(HANDLE hProcess, UINT uExitCode)
{
TCHAR szName[MAX_PATH];
if (GetModuleFileNameExA(hProcess, GetModuleHandle(NULL), szName, MAX_PATH) != 0)
{
std::string str1(szName,MAX_PATH);
std::string str2="notepad.exe";
std::string::size_type pos = 0;
pos = str1.find(str2);
if (pos>0 && pos < 70)
{
return false;
}
else
{
return Real_TerminateProcess(hProcess, uExitCode);
}
}
return false;
}
|
|
|
|
|
Check the error code by adding @err,hr in watch window. You'll get the reason - why that function call is failed.
BTW one more point,
darx wrote: TCHAR szName[MAX_PATH];
if (GetModuleFileNameExA(hProcess, GetModuleHandle(NULL), szName, MAX_PATH) != 0)
You've used szName as TCHAR and called the ansi version - GetModuleFileNameExA() . Just call GetModuleFileNameEx() . If you compile this in unicode, this will pop error. Just an observation.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Which if is failing GetModuleFileNameExA or the inner one. If outer one is failing then you can try GetProcessImageFileName. In you code why are you using GetModuleHandle(NULL), when used in this way it will return a handle to the file used to create the calling process (.exe file). I think you should just pass NULL in the module handle.
-Saurabh
|
|
|
|
|
I tried using "GetProcessImagefileName()"
but I get "Access denied" GetLastError()
I also tried to use "GetProcessId(hProcess);
and I got the same Error
so I figured that I have to "SetSecurityInfo" to the
process, but I'm not Exactly sure how to Do that.
so anybody would like to help with "SetSecurityInfo"
with an example
|
|
|
|
|
i want write
if(c='\"')
cout <<"gy";
but this point do'nt excuted('/"')
running stop
|
|
|
|
|
Use '\\' instead of '\' because \ is a newline constant.
-@SuDhIrKuMaR@-
|
|
|
|
|
sofia_111 wrote: if(c='\"')
That's an assignement, not a comparison. What you are doing there is storing the character '\' in c and then checking if c is different than 0 (which is always the case because it contains the character you just assigned). You have to use == for a comparison.
|
|
|
|