|
Could share direct link? I'm no a member of these groups?
|
|
|
|
|
hi,
I am working on a PTZ camera, and successfully accessed the pan/tilt/up/down..zoom/focus and iris features.
now i am stuckup with the query commands and response.
protocol is pelco D and i want to send the query pan position(0x51) to the camera and the camera have to respond me back with
query pan position response(0x59)... if anybody worked on these stuffs please help me...
|
|
|
|
|
Hey rajapp,
If you find any solution please share it with us because we have same problem as you....
if you contact please send mesaage to "hkaratoy@gmail.com"
|
|
|
|
|
hey ppl were any of you able to solve this problem?? i am stuck too
|
|
|
|
|
Hi All
I am gatting problem to destroy Model less dialog.
I have a Dialog A and insert dialog B(Model less dialog).I dialog A call model less dialog like this
CDialogB* m_modell (In Dialog A cpp class).Create model less dialog in Dialog A cpp class like this
m_modell= new CDialogB(this);
m_modell->Create(CDialogB::IDD,this);
Now i have a thread WorkerThreadProc.In the WorkerThreadProc i use to show model less dialog
m_modell->ShowWindow(SW_SHOW);
It's working fine but how i destory model less dialog.
plz help me
|
|
|
|
|
|
thank for reply but try to understand my problem.
I know how to create but i have a problem to destroywindow(Model less dialog).
|
|
|
|
|
MsmVc wrote: I know how to create but i have a problem to destroywindow
The link I provided shows how to properly destroy the modeless dialog. Have you tried it?
Best Wishes,
-David Delaune
|
|
|
|
|
yes i try this.
Create Model less dialog in Class Adlg.cpp
m_modell= new CDialogB(this);
m_modell->Create(CDialogB::IDD,this);
Show Model less dialog in thread
m_modell->ShowWindow(SW_SHOW);
Try to delete or destroy in Class Adlg.cpp then it's working.
m_modell->DestroyWindow();
But how to destroy in thread.It's not working in thread.
Plz help me
|
|
|
|
|
MsmVc wrote: But how to destroy in thread.It's not working in thread.
Don't do it that way. Never touch anything from the UI from within a thread, this is a recipe for disaster. Instead, post a custom message to your UI informing it that it needs to close the dialog.
Check this article[^] for more information about thread (a must read for everybody starting to work with threads).
|
|
|
|
|
If you have followed the instructions in the article then you can use PostMessage to close to your modeless dialog.
::PostMessage(m_modell->m_hWnd,WM_COMMAND,MAKEWPARAM(IDCANCEL, BN_CLICKED),0);
Make sure that you have added the WM_POSTNCDESTROY handler and override OnCancel just like in the Help and Support article.
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
We need to extract strings from a .EXE file. What are ways to do that?
|
|
|
|
|
Use LoadLibrary[^] to load the EXE.
Call LoadString[^] and pass the handle returned by LoadLibrary as the first parameter.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks for the reply.
We have tried these functions but loadstring function requires the string ID. How do we find that? Can you provide any links which have the sample code?
|
|
|
|
|
|
|
Thanks,
Stablupd.exe is already available for this but,
We want to make project that will fetch string from EXE.
Can you help us regarding this?
|
|
|
|
|
If you need to get all strings from executable, than You need dothis:
HMODULE some = LoadLibrary("mylib.dll")
and than
EnumResourceNames(some, RT_STRING, MyStringCB, NULL);
Please note that every string resource is actually a block of 16 unicode strings. So You have 2 options there:
a) interpret RT_STRING by yourself
b) compute 16 string ID's (nStringIDfirst = (nBlockID- 1) * 16; ) and call LoadString() 16 times:
BOOL CALLBACK MyStringCB(HMODULE some_library,
LPCTSTR resource_type,
LPTSTR resource_name,
LONG_PTR aux_param)
{
DWORD startId = ((DWORD)resource_name - 1) * 16;
DWORD i, endId = startId + 16;
for (i = startId ; i < endId; ++i)
{
LoadString(some_library, i, ...)
...
}
return TRUE;
}
|
|
|
|
|
Can you please explain the various parameters of MyStringCB in more detail.
Loadlibrary is working properly but, We have problem in the EnumResourceNames.
Thanks.
|
|
|
|
|
choramale_vs wrote: Can you please explain the various parameters of MyStringCB in more detail.
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Parameters of MyStringCB is obvious, refer MSDN: EnumResNameProc Function.
some_library - handle to library we load
resource_type - resource type, will always be RT_STRING in our case
resource_name - resource identifier (either string name or numerical)
aux_param - optional auxiliary parameter specified in call to EnumResourceNames , in my sample it is not used.
The first trick is with resource_name . You can check for strings it always integer (try ASSERT(IS_INTRESOURCE(resource_name)); ).
'INTRESOURCE' is not a real pointer, it's an integer (refer MSDN: IS_INTRESOURCE) and we reinterpret is a WORD (or DWORD, in all cases it have only 16 significant bits).
The second issue - is RT_STRING resource itself not a string, this is a block of 16 strings! This why we generate 16 ID's and load strings with LoadString() API
PS: Your task is to load/list all strings in string resources, not to find all strings in code of application (like Process Explorer of Mark Russinovich or other hackers tool)?
|
|
|
|
|
I have some strings in my program. Does these strings goes into string table of exe?
can i use string name as resource_name?
|
|
|
|
|
Hi,
I got crash once in GetMessage method while calling that method in message loop. I am doing some simple opertion with win32 coding and try to get the message form message queue of windows and it got crash. Can anybody help me to find out the possible reason behind this crash with fixes. The crash has been seen on XP 32 bit machine.
|
|
|
|
|
Kundan Kumar Bharti wrote: Can anybody help me to find out the possible reason behind this crash with fixes.
Without any code neither the exact error message, this will be very difficult. We still can't read mind, you know...
So, please post the code snippet where the crash occurs (make sure you read point 7 here[^] before posting). Post also the exact error message of the crash.
|
|
|
|
|
I have a dialog box popping up, which contains a updown control.
I need to set and get the values of its buddy control through my c++ program.
Basically i am automating it.
Please could some one help me.
|
|
|
|