|
I am not getting any error,
I craeted Tab control dialog then i called two other dialogs in tab control using Create Indirect Method.
I am able to enetered data in dialog boxe controls and I can send them in Database also, but when I try to send date to control from member variable application get hangs.
|
|
|
|
|
Now application got abort and it had breaked and in debugging it showed below code.
CStringData* GetData() const throw()<br />
{<br />
<big>---></big> return( reinterpret_cast< CStringData* >( m_pszData )-1 );<br />
}
Can you pls explain what is meant by this.
|
|
|
|
|
|
Means to find when some process is running example notepad.exe or word.exe is running in OS. How can I find if notepad.exe is running in OS.
|
|
|
|
|
<br />
HANDLE h_pro;<br />
HANDLE h_sna;<br />
PROCESSENTRY32 pe_sen = {0};<br />
<br />
int result;<br />
bool returnValue;<br />
bool counter = false;<br />
<br />
char* ProcessNames = appName;
<br />
h_sna = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);<br />
if (h_sna == INVALID_HANDLE_VALUE){<br />
returnValue = false;<br />
return (returnValue);<br />
}<br />
<br />
pe_sen.dwSize = sizeof(PROCESSENTRY32);<br />
<br />
try{<br />
if (Process32First(h_sna, &pe_sen))<br />
{<br />
do<br />
{<br />
h_pro = OpenProcess (PROCESS_ALL_ACCESS, FALSE, pe_sen.th32ProcessID); <br />
CloseHandle (h_pro);<br />
<br />
if (pe_sen.th32ProcessID != 0)<br />
{<br />
result = strcmp (pe_sen.szExeFile,ProcessNames);<br />
<br />
if(result > 0){ <br />
returnValue = false;<br />
}<br />
else if (result < 0){ <br />
returnValue = false;<br />
}<br />
else<br />
{<br />
globalVariable = pe_sen.th32ProcessID;<br />
counter = true;<br />
}<br />
}<br />
} while (Process32Next(h_sna, &pe_sen));<br />
} <br />
}<br />
catch(...)<br />
{ <br />
returnValue = false;<br />
}<br />
<br />
if (counter)<br />
return counter;<br />
return returnValue;<br />
<br />
CloseHandle (h_sna);<br />
Regards
Programm3r
|
|
|
|
|
What more can you ask for....
Regards
Programm3r
|
|
|
|
|
Thanks for ur kind help
|
|
|
|
|
Did you come right????
Regards
Programm3r
|
|
|
|
|
|
Thank u I will try this one
|
|
|
|
|
Hi,
How can i declare a global variable which can be shared between different projects.
All these projects are under one workspace.
There is one main project which starts the application.
workspce trial.
proj1
proj2
proj3
proj4
proj5
proj3 is a dialog based main application and the other projects are Activex/Dialog based
I want to declare a variable in proj3 and access this variable from other projects.
Thanks,
kk_mfc
|
|
|
|
|
You would have to make use of header files and make sure the same header is included in all of the projects.
|
|
|
|
|
kk_mfc wrote: global variable which can be shared between different projects
You can save the value in the registry location and then you can use it from any of your project. Alternatively you can write the value into a file and then access it from different projects.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
Can anybody help me to get Icon details like its name, target path, working directory whenever it is double-clicked to run the application. This is be using Windows API or in C#.
I have already used IShellLink Interface but its been hard-coded for icon name. Suppose the user changes desktop icon name then also coding should be able to change its working directory. This can be done if I can check the existence of the icon.
Regards.
|
|
|
|
|
dear friends
disturb your you! how to import my own icon in my application? thank you.
Li Zhiyuan
8/06/2006
|
|
|
|
|
li zhiyuan wrote: import my own icon in my application?
Open the resource tab.Right click on .rc file. Select Add Resource.Select icon in the resource type window and then click on the import button. Browse for your .ico file and when done click ok.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
你可以在资源里面建一个图标。然后再保存文件再用你的图标文件覆盖系统生成的那个文件。
图标文件要求是32X32大小的。
这个问题可以去www.csdn.net上面检索。
----------------------------
Jerry yu
Email: fisheryj at gmail.com
|
|
|
|
|
abruti, on parle anglais ici
|
|
|
|
|
Hello
In MFC of VC++6.0, I write a dialog application. I have created a modeless dialog from main dialog. Could you please give me specific instructions to change size of modeless dialog when I get the figures up to date from main dialog?
Infomation
|
|
|
|
|
Hi,
you can use MoveWindow function for changing the size.
Regards
Velayudhan
|
|
|
|
|
You can also use the SetWindowPos API to change the window size run time.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
If you're trying to set the size of the window based on the content, you can use AdjustWindowRect or AdjustWindowRectEx to calculate the size of the new window based on the desired client rectangle.
These functions will convert your client rectangle into a window rectangle, which takes into account title bars, borders, etc. wich you then pass to the MoveWindow or SetWindowPos functions.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
How to show the 'Privacy Report' dialog in CHtmlView Based Application?
Thank you.
tomorrow
|
|
|
|
|
hi,
i can not use these code:
Bitmap* curBitmap = new Bitmap(L"sunset.bmp");
error for this code is:
f:\visual sutido project\ImageProcessing\ImageProcessing\ImageProcessing\ImageProcessingView.cpp(73): error C2660: 'Gdiplus::GdiplusBase::operator new' : function does not take 3 arguments
is any opinion??!!!;)
|
|
|
|
|