|
Hi all,
lets say i have this function in a ReadWrite.cpp file:
void CReadWriteDlg::OnButton4()
{
AfxMessageBox("test");
}
how do i call this function from a function in a different file altogether, say, SystemTray.cpp:
void CSystemTray::OnMyDeviceChange(WPARAM wParam, LPARAM lParam)
{
CReadWriteDlg::OnButton4(); //whats the correct syntax for this???
.
.
.
.
}
any help is greatly appreciated!
thanks!
|
|
|
|
|
Is this code helpfuls
CMain *m_Main=(CMain*)GetParent();
m_Main->Variable for function;
|
|
|
|
|
If you work with Dialogs then have CWnd and handles. So it is right to use PostMessage with user defined messages ( ->RegisterMessage ). PostMessage is better then SendMessage because it puts the message in the internal message queue. Read the fine MSDN.
Greetings from Germany
|
|
|
|
|
i am having a button. i have loaded a bmp image to the button. if move the mouse over it i have to change the image. i need the code for this.
|
|
|
|
|
Hope I understood your question you need to CBitmapButton
|
|
|
|
|
ok how to code the mouse movement function so that i can change the image
|
|
|
|
|
I think MSDN has a good example of this class did you see it
|
|
|
|
|
Try using CBitmapButton
Regards,
Paresh.
|
|
|
|
|
See here[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think it may be done by overriding CButton class then need to draw button yourself overriding DrawItem().
|
|
|
|
|
I want to delete a folder which is have a content.
WIN32_FIND_DATA FindFileData;
HANDLE hHandle ;
int complt;
char FileName[100];
strcpy(FileName,"");
char rpath[]="C:\\bootfdr";
char Path[]="C:\\bootfdr\\";
SetCurrentDirectory(Path);
hHandle=FindFirstFile("*.*",&FindFileData);
if(hHandle == INVALID_HANDLE_VALUE)
MessageBox("Path NotFound");
else
{
while(complt)
{
strcpy(FileName,Path);
strcat(FileName,FindFileData.cFileName);
DeleteFile(FileName);
complt=FindNextFile(hHandle,&FindFileData);
}
}
FindClose(hHandle);
if(RemoveDirectory(rpath))
MessageBox("Deleted");
else
MessageBox("Sorry i cant");
am use this code but only files inside the folder is deleted.but not the folder is deleted
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
|
use SHFileOperation instead of RemoveDirectory. This function will delete the directory event if there are contents in that folder.
nave
|
|
|
|
|
I like to Delete folder in any case even if other applications or other users are accessing the same folder. Forcefully i like to delete the Folder. I receive Error 32 when the function SHFileOperation(). Can any one tell me how can i acheive this.
|
|
|
|
|
yeah. if any process has kept any files opened from that folder. you will not be able to delete it.
refer this article Listing Used Files[^]
|
|
|
|
|
Mr. deeps_cute,
you've been asking question over this board for long time now...
will you once comply to the posting guidelines[^] ???
I especially talk about the <pre></pre> tags, but some other points apply to you too
|
|
|
|
|
I have created a new project and put all the copies of existing project in this new project everything is running fine but output file gives the following information.
What does the mean of the following ?
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\wininet.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\avifil32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msvfw32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'D:\Projects\debug\EncoderPlugin.dll', Symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', Symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\urlmon.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded.
The program '[1164] DRMclientEXWorking.exe: Native' has exited with code 0 (0x0).
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
This means that the dll does not have the debugging info.
Regards,
Paresh.
|
|
|
|
|
Score: 5.0 (1 vote)
|
|
|
|
|
It looks like all the dlls that get loaded when your app starts to me.
I see all that and more in the output window every time I run an app in the debugger.
What's the question?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
|
Did you copy the 'stdafx.h' file to the new project folder?
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
ya I have made my all possible efforts.when i used written in msdn. Used quoated "stdafx.h".
its working but give me a linking error.
following.
>Linking...
Creating library D:\Projects\DRM\Debug\DRMClientEx.lib and object D:\Projects\DRM\Debug\DRMClientEx.exp
1>LINK : warning LNK4199: /DELAYLOAD:OleAcc.dll ignored; no imports found from OleAcc.dll
1>ContentUploadManager.obj : error LNK2019: unresolved external symbol __imp__InternetCloseHandle@4 referenced in function "public: void __thiscall ContentUpload::UploadFile(wchar_t const *,wchar_t const *,unsigned short,wchar_t const *,wchar_t const *,struct HWND__ *)" (?UploadFile@ContentUpload@@QAEXPB_W0G00PAUHWND__@@@Z)
1>HttpManager.obj : error LNK2001: unresolved external symbol __imp__InternetCloseHandle@4
1>ContentUploadManager.obj : error LNK2019: unresolved external symbol __imp__FtpPutFileW@20 referenced in function "public: void __thiscall ContentUpload::UploadFile(wchar_t const *,wchar_t const *,unsigned short,wchar_t const *,wchar_t const *,struct HWND__ *)" (?UploadFile@ContentUpload@@QAEXPB_W0G00PAUHWND__@@@Z)
1>ContentUploadManager.obj : error LNK2019: unresolved external symbol __imp__InternetConnectW@32 referenced in function "public: void __thiscall ContentUpload::UploadFile(wchar_t const *,wchar_t const *,unsigned short,wchar_t const *,wchar_t const *,struct HWND__ *)" (?UploadFile@ContentUpload@@QAEXPB_W0G00PAUHWND__@@@Z)
1>HttpManager.obj : error LNK2001: unresolved external symbol __imp__InternetConnectW@32
1>ContentUploadManager.obj : error LNK2019: unresolved external symbol __imp__InternetOpenW@20 referenced in function "public: void __thiscall ContentUpload::UploadFile(wchar_t const *,wchar_t const *,unsigned short,wchar_t const *,wchar_t const *,struct HWND__ *)" (?UploadFile@ContentUpload@@QAEXPB_W0G00PAUHWND__@@@Z)
1>HttpManager.obj : error LNK2001: unresolved external symbol __imp__InternetOpenW@20
1>ContentUploadManager.obj : error LNK2019: unresolved external symbol __imp__InternetAttemptConnect@4 referenced in function "public: void __thiscall ContentUpload::UploadFile(wchar_t const *,wchar_t const *,unsigned short,wchar_t const *,wchar_t const *,struct HWND__ *)" (?UploadFile@ContentUpload@@QAEXPB_W0G00PAUHWND__@@@Z)
1>ConversionManager.obj : error LNK2019: unresolved external symbol _AVIStreamRelease@4 referenced in function "public: void __thiscall CWMInput::Cleanup(void)" (?Cleanup@CWMInput@@QAEXXZ)
1>ConversionManager.obj : error LNK2019: unresolved external symbol _AVIStreamInfoW@12 referenced in function "public: long __thiscall Convert::InitAVISource(wchar_t *)" (?InitAVISource@Convert@@QAEJPA_W@Z)
1>ConversionManager.obj : error LNK2019: unresolved external symbol _AVIStreamReadFormat@16 referenced in function "public: long __thiscall Convert::InitAVISource(wchar_t *)" (?InitAVISource@Convert@@QAEJPA_W@Z)
1>ConversionManager.obj : error LNK2019: unresolved external symbol _AVIStreamLength@4 referenced in function "public: long __thiscall Convert::InitAVISource(wchar_t *)" (?InitAVISource@Convert@@QAEJPA_W@Z)
1>ConversionManager.obj : error LNK2019: unresolved external symbol _AVIStreamStart@4 referenced in function "public: long __thiscall Convert::InitAVISource(wchar_t *)" (?InitAVISource@Convert@@QAEJPA_W@Z)
1>ConversionManager.obj : error LNK2019: unresolved external symbol _AVIFileGetStream@16 referenced in function "public: long __thiscall Convert::InitAVISource(wchar_t *)" (?InitAVISource@Convert@@QAEJPA_W@Z)
1>ConversionManager.obj : error LNK2019: unresolved external symbol _AVIFileOpenW@16 referenced in function "public: long __thiscall Convert::InitAVISource(wchar_t *)" (?InitAVISource@Convert@@QAEJPA_W@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__ImageList_ReplaceIcon@12 referenced in function "long __stdcall GlobaListProc(struct HWND__ *,unsigned int,unsigned int,long)" (?GlobaListProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__ImageList_Create@20 referenced in function "long __stdcall GlobaListProc(struct HWND__ *,unsigned int,unsigned int,long)" (?GlobaListProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__DeleteObject@4 referenced in function "long __stdcall HeaderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?HeaderProc@@YGJPAUHWND__@@IIJ@Z)
1>Link.obj : error LNK2001: unresolved external symbol __imp__DeleteObject@4
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__DeleteDC@4 referenced in function "long __stdcall HeaderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?HeaderProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__BitBlt@36 referenced in function "long __stdcall HeaderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?HeaderProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__SelectObject@8 referenced in function "long __stdcall HeaderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?HeaderProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__CreateCompatibleDC@4 referenced in function "long __stdcall HeaderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?HeaderProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__CreateSolidBrush@4 referenced in function "long __stdcall HeaderProc(struct HWND__ *,unsigned int,unsigned int,long)" (?HeaderProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__SetBkMode@8 referenced in function "long __stdcall NavigatorProc(struct HWND__ *,unsigned int,unsigned int,long)" (?NavigatorProc@@YGJPAUHWND__@@IIJ@Z)
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__SetTextColor@8 referenced in function "long __stdcall NavigatorProc(struct HWND__ *,unsigned int,unsigned int,long)" (?NavigatorProc@@YGJPAUHWND__@@IIJ@Z)
1>Link.obj : error LNK2001: unresolved external symbol __imp__SetTextColor@8
1>DRMClient.obj : error LNK2019: unresolved external symbol __imp__CreateFontIndirectW@4 referenced in function "long __stdcall NavigatorProc(struct HWND__ *,unsigned int,unsigned int,long)" (?NavigatorProc@@YGJPAUHWND__@@IIJ@Z)
1>Link.obj : error LNK2001: unresolved external symbol __imp__CreateFontIndirectW@4
1>DRMClient.obj : error LNK2019: unresolved external symbol "public: static long __fastcall Encoder::ListSystemProfile(struct HWND__ *)" (?ListSystemProfile@Encoder@@SIJPAUHWND__@@@Z) referenced in function "long __stdcall EncodeProc(struct HWND__ *,unsigned int,unsigned int,long)" (?EncodeProc@@YGJPAUHWND__@@IIJ@Z)
1>HttpManager.obj : error LNK2019: unresolved external symbol __imp__InternetOpenUrlW@24 referenced in function "public: void __thiscall openutils::WebForm::sendRequest(void)" (?sendRequest@WebForm@openutils@@QAEXXZ)
1>HttpManager.obj : error LNK2019: unresolved external symbol __imp__HttpSendRequestW@20 referenced in function "public: bool __thiscall openutils::WebForm::postRequest(void)" (?postRequest@WebForm@openutils@@QAE_NXZ)
1>HttpManager.obj : error LNK2019: unresolved external symbol __imp__HttpAddRequestHeadersW@16 referenced in function "public: bool __thiscall openutils::WebForm::postRequest(void)" (?postRequest@WebForm@openutils@@QAE_NXZ)
1>HttpManager.obj : error LNK2019: unresolved external symbol __imp__HttpOpenRequestW@32 referenced in function "public: bool __thiscall openutils::WebForm::postRequest(void)" (?postRequest@WebForm@openutils@@QAE_NXZ)
1>HttpManager.obj : error LNK2019: unresolved external symbol __imp__InternetCheckConnectionW@12 referenced in function "public: bool __thiscall openutils::WebForm::postRequest(void)" (?postRequest@WebForm@openutils@@QAE_NXZ)
1>HttpManager.obj : error LNK2019: unresolved external symbol __imp__InternetReadFile@16 referenced in function "public: bool __thiscall openutils::WebForm::getResponse(char *,int)" (?getResponse@WebForm@openutils@@QAE_NPADH@Z)
1>Link.obj : error LNK2019: unresolved external symbol __imp__GetObjectW@12 referenced in function "int __fastcall ConvertStaticToHyperlink(struct HWND__ *)" (?ConvertStaticToHyperlink@@YIHPAUHWND__@@@Z)
1>Package.obj : error LNK2019: unresolved external symbol "public: static wchar_t * __fastcall Encoder::GenerateKeyID(void)" (?GenerateKeyID@Encoder@@SIPA_WXZ) referenced in function "public: long __thiscall Package::EncodeMediaContent(wchar_t *,wchar_t *,struct HWND__ *,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,unsigned short,struct HWND__ *,class TagEditor *,struct HWND__ *,struct HWND__ *)" (?EncodeMediaContent@Package@@QAEJPA_W0PAUHWND__@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@222G1PAVTagEditor@@11@Z)
1>Package.obj : error LNK2019: unresolved external symbol "public: static long __fastcall Encoder::LoadSystemProfile(unsigned long,struct IWMProfile * *)" (?LoadSystemProfile@Encoder@@SIJKPAPAUIWMProfile@@@Z) referenced in function "public: long __thiscall Package::EncodeMediaContent(wchar_t *,wchar_t *,struct HWND__ *,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >,unsigned short,struct HWND__ *,class TagEditor *,struct HWND__ *,struct HWND__ *)" (?EncodeMediaContent@Package@@QAEJPA_W0PAUHWND__@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@222G1PAVTagEditor@@11@Z)
1>Utils.obj : error LNK2019: unresolved external symbol __imp__GetOpenFileNameW@4 referenced in function "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > __thiscall Utility::GetFile(struct HWND__ *)" (?GetFile@Utility@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAUHWND__@@@Z)
1>D:\Projects\DRM\Debug\DRMClientEx.exe : fatal error LNK1120: 34 unresolved externals
1>Build log was saved at "file://d:\Projects\DRM\DRMClientEx\Debug\BuildLog.htm"
1>DRMClientEx - 41 error(s), 93 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|
You're missing a bunch of link libraries.
At least these...
Wininet.lib
Vfw32.lib
Gdi32.lib
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
I have solved some of them but the system libs are still missing.How Can I load ? I have seen that in my debug folder the exe is built but the following is unable to load with exe. actually the old exe is present their because I have given both path same for creating exe.
But my original project 'D:\Projects\debug\DRMclient.exe' created proper way and run the exe, but my new 'D:\Projects\debug\DRMclientEXWorking.exe' its given the following error.
<br />
'DRMclientEXWorking.exe': Loaded 'D:\Projects\debug\DRMclientEXWorking.exe', Symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\wininet.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\crypt32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msasn1.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\avifil32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msacm32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\msvfw32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', No symbols loaded.
<br />
'DRMclientEXWorking.exe': Loaded 'D:\Projects\debug\EncoderPlugin.dll', Symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\comdlg32.dll', No symbols loaded.
<br />
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcp80d.dll', Symbols loaded.<br />
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.42_x-ww_f75eb16c\msvcr80d.dll', Symbols loaded.<br />
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\urlmon.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'DRMclientEXWorking.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', No symbols loaded.
The program '[1152] DRMclientEXWorking.exe: Native' has exited with code 0 (0x0).
Amit Mistry - petlad -Gujarat-India
|
|
|
|
|