|
Hi,
I have tab control and two cards (dialogs) in tab control. I put my bitmap picture (from resources) in picture control on main dialog window (parent dialog) and I wanna that picture stays underneath tab control dialogs, so when I called next handler (on change tab cards) I wanna that that picture be on same place for both dialogs(child) in tab control. When I activate particular tab the next handler is called :
void Board_TabCtrl::ActivateTabDialogs()
{
int nSel = GetCurSel();
if(m_Dialog[nSel]->m_hWnd)
m_Dialog[nSel]->ShowWindow(SW_HIDE);
CRect l_rectClient;
CRect l_rectWnd;
GetClientRect(l_rectClient);
AdjustRect(FALSE,l_rectClient);
GetWindowRect(l_rectWnd);
GetParent()->ScreenToClient(l_rectWnd);
l_rectClient.OffsetRect(l_rectWnd.left,l_rectWnd.top);
for(int nCount=0; nCount < m_nPageCount; nCount++)
{
m_Dialog[nCount]->SetWindowPos(&wndTop, l_rectClient.left,l_rectClient.top,l_rectClient.Width(),l_rectClient.Height(),SWP_HIDEWINDOW);
}
m_Dialog[nSel]->SetWindowPos(&wndTop,l_rectClient.left,l_rectClient.top,l_rectClient.Width(),l_rectClient.Height(),SWP_SHOWWINDOW);
m_Dialog[nSel]->ShowWindow(SW_SHOW);
}
But when I change tab card that picture flick because I call ShowWindow(SW_SHOW) i.e ShowWindow(SW_HIDE);
. How can I prevent that picture flick. Is there way to not update part of dialog window or some trick with differernt properties (transparent ....)
PS: What I want is like there is a hole on that picture place on child dialog windows, so that there no be flickering due to calls of ShowWindow(SW_SHOW) i.e. ShowWindow(SW_HIDE) for child dialogs in tab control;
Best regards
|
|
|
|
|
First, try showing your new dialog first and then removing the old one, maybe it also does not hurt if you ensure that the new dialog is always on top of the other one in the Z-order. Another thing you can try is simply disabling repainting of the whole window using SetRedraw(FALSE)[^], performing the switch of the dialogs, re-enabling repainting with SetRedraw(TRUE) and then making your new page and maybe the tab control itself redrawn with RedrawWindow[^]. You might have to experiment a bit with it...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi all
I do appologize in advance for my question, because I couldn't find a related forum with my question!!
I'm writting a program in DDK for secure booting of windows XP.
I use NT-Native functions in kernel mode, but unfortunately there is not any reference or example of using these functions!
I want to load some kernel mode dlls there(such as "hal.dll" in system32 folder) and use of "LDRLoadDLL" function whereas there is no good example of it's usage!
I don't know how should I pass those dlls path address in the first input argument of this function? when I set NULL in it, I get error to load some kernel mode dll (Error such as "File not found" where it succeeds in loading only "ntdll.dll"!) and also I don't know how should be the dll's "path" format in first argument of function?
I've seen ntdll.dll's source code for this function, but the correct format of path is some complex for me!!
Here is the ntdll's source including "LDRLoadDll" function:
http://source.winehq.org/source/dlls/ntdll/loader.c#L2007
I extremely hope you could help me!!!!
Thanks in Advance.
|
|
|
|
|
bahareh655 wrote: Here is the ntdll's source including "LDRLoadDll" function:
http://source.winehq.org/source/dlls/ntdll/loader.c#L2007
Well....that's Wine's source, which is not necessarily going to be the same as the Microsoft original....
Looking at a quick Google search for LdrLoadDLL[^] brings up this page[^], which documents A path format. There's also this page[^], which indicates that the Wine source is definitely very different to the Microsoft source.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello and Thanks of your reply!
I saw "http://www.matcode.com/undocwin.h.txt" address, but it only declares the "LdrLoadDll" as below and doesn't use of it with providing a valid path for a dll!
DWORD __stdcall LdrLoadDll( PWSTR *szcwPath, // Optional
PDWORD pdwLdrErr, // Optional
PUNICODE_STRING pUniModuleName,
PHINSTANCE pResultInstance
);
|
|
|
|
|
Did you look in the comments? There, it says this:
szcwPath - Points to a null-terminated
So, setting szcwPath to something like L"C:\\Windows\\System32;C:\\Windows;" should be what you want?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi and thanks!
Unfortunately it doesn't work!
I have already examined this normal way of specifying a module path, but kernel mode is so sensitive and doesn't accept this format.
This comment suggests how to seperate different paths of dlls.
I think it should be in a different way to load dlls in "kernel mode(DDK)" specifically!
|
|
|
|
|
How to Write some data at a particular Sector
for example here is given a sector
4749463839610C000D00F700007587C8
BAC3E2D1D7EC13349E99A7D5193B9D1B
3EA24C69B7526FBAF3F5FA2B509A8099
CE839DCB375E994671966589A38DBB9E
86BA9288C39484BA8D9CD5A5A5D8AE86
BC8E98D4A0A3D8AB78C0807BC28489CE
918CD09581C08981BE8991D09984BB8B
87BC8D7FCC8685CD8C7EC085E8F8E904
B4074CC24E6AD66CA0DFA1ABE4AC00C6
0000C10000BD00009E0005CC050ADB09
0BE30A10AB1116E41616CB151BE61C1C
E61D19C31918A31720DD2119A1181CAD
1B19A0191BA31C20B52020B12126BC26
29B629249F242EB72D2EB92F2FB73130
B73033BB3333B93533B83434BA3534B8
3437BA393ABB3B3CC03D3BBC3C3CBC3C
37A53748C34849BF494FC25051C25252
C15251B5515AC65B5FC9606CE26C63C9
6469C6696ECC6F70CC707DD27E7FD37F
87D58880C8808CD78C99E69A90D89095
DA9698DB98B0F5B09FDE9F99D699A3DE
A3B1E4B1D6F5D6DCF2DCF3FCF3F5FCF5
FAFEFA05BD030995073DBB3C3FBC3E48
CA4644BC4346BE454CC14A4FC24D45AA
4459C5586FEB6D64CC625EBE5D71CD6F
72CD7179D07875C97490DA8F9ADC99A2
DFA1A2DDA1BDEBBCC7EBC6CBEECA87D9
83BDF4BBF5FBF3FBFEFAFAFDF9FFFFFF
FFFFFF00000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
Now i want to write following data at this Sector
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
Sir please tell me how i can do it
|
|
|
|
|
Well, I assume you're running under XP, etc - so user mode does not have normal access to the sectors on a hard drive.
Is this on a floppy?
Another question... How did you get the contents of that sector? I assume whatever read method you used, there will be a write one?
Yours in need of funrther information,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
hi
actually i have read the vale from sector by using "winhex" tools.
i dont need to read value in my project.
i just want to move a sector and want write following value in that particular sector
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
and then i want read next sector and write again the same value in that sector.
please tell me how to do it.
|
|
|
|
|
Shiv Murti Pal wrote: i dont need to read value in my project.
Shiv Murti Pal wrote: and then i want read next sector
As Iain already pointed out - you'll have to be a bit more elaborate.
|
|
|
|
|
Love your new picture! Did your better half dress you up like this?
|
|
|
|
|
Hmm, I just checked, and the only other person who has access to my account (via a PC with "remember me" *is* my better half...
But she disclaims any responsibility!
I now point my finger at a certain Australian adminstrator. J'Accuse, Mate!
I'd quite like to leave the pic alone now, but I suppose I do use the link for more serious stuff, so I;d better go back to a professional picture...
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain Clarke wrote: so I;d better go back to a professional picture

|
|
|
|
|
I've written DLL and it exports some functions.
But when I link to it given its .lib and .h files from another console project, it links to dll using ordinals but not names.
I dumped the .exe and found that it imports DllName.01, DllName.02 functions from that dll rather than original functions names.
The dumped dll has its exports as original function names
How to overcome it?
Чесноков
|
|
|
|
|
in the def file I guess you might have put ordinal number after the function name. Remove it.
See here[^] for informations.
|
|
|
|
|
Yes, I do put them in .def
Чесноков
|
|
|
|
|
Have you tried this without a .def file ? I have written dozens and dozens of DLLs for use in C and C++ code and never once used a .def file. You just have to make it clear whether the DLL exports C or C++ functions and classes in the header file.
|
|
|
|
|
But in that case the exported functions names become added with some ?@# symbols. They are not exactly the names as in the source code
Чесноков
|
|
|
|
|
Hi All,
I want to move mail to another folder.
I am getting exception in code:
_MailItemPtr mailPtr;
..
..
..
MAPIFolderPtr temp=g_pNsp->GetFolderFromID(_bstr_t(Selected_Action_Folder.szEntryID));
mailPtr->Move(temp);
|
|
|
|
|
did you debug to check if values are initialized properly and why is it crashing? If not, this may be the right time to do this activity.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
MPTP wrote: mailPtr->Move(temp);//here
What are the vakues of mailPtr and temp ?
"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
|
|
|
|
|
Please I need help on this, I'm new in C++.
Here are the details:
1. I have a base class and 3 derived classes:
Base class
class CRepositoryData
{
...
};
Derived classes
class CUser_data : public CRepositoryData
{
...
};
class CLock_data : public CRepositoryData
{
...
};
class CReferences_data : public CRepositoryData
{
...
};
2. My declaration for my classes in my function uses CList <>
main()
{
CList <CLock_data,CLock_data&> listLockDataTemp_L;
CList <CReferences_data,CReferences_data&> listLocationDataTemp_L;
CList <CUser_data,CUser_data&> listUserDataTemp_L;
if(Lock)
{
CreateBatchToSend(
dynamic_cast<CList<CRepositoryData,CRepositoryData&>*>(&listLockDataTemp_L));
}else if(CReferences)
{
CreateBatchToSend(
dynamic_cast<CList<CRepositoryData,CRepositoryData&>*>&listLocationDataDataTemp_L));
}else
CreateBatchToSend(
dynamic_cast<CList<CRepositoryData,CRepositoryData&>*>(&listUserDataTemp_L));
}
}
3. Is this code possible for my CreateBatchToSend()?
BOOL CreateBatchToSend(CList <CRepositoryData,CRepositoryData&> *pListRepData_P)
{
...
CList <CLock_data,CLock_data&> listLockDataTemp_L;
listLockDataTemp = dynamic_cast<CList<CLock_data,CLock_data&>*>pListRepData_P;
...
}
4. I am trying to create a function that can take those 3 derived classes in a list by using the base class as the argument and then use dynamic cast to revert back to their respective class.
Do I need to use other containers to implement this?
Any suggestions would be very helpful. Thanks a lot...
|
|
|
|
|
I am not sure I understood your question but what you are trying to do is not really correct. You can't cast to CList<CLock_data,CLock_data&>* from a CList <CRepositoryData,CRepositoryData&> * . These are two different types (even if the class used for template arguments are parent/child).
A better approache would be to use polymorphism: instead of manipulating a list of CRepositoryData objects, simply manipulate a list of pointers to CRepositoryData objects. This way, the pointer can point to a CRepositoryData object or to a child object.
This has also another advantage: all the lists can be manipulated the same way (and you could maybe even reduce them to one single list).
|
|
|
|
|
A ok. You're right. I need the pointer to CRepositoryData object.
My main problem is i have this 3 different functions that will call one function(Create_Batch_to_Send()) with CRepositoryData as the argument:
Function1 - calls Create_Batch_to_Send(CList<CUserdata,CUserdata&>*listUserData)
Function2 - calls Create_Batch_to_Send(CList<CLockdata,CLockdata&>*listLockData)
Function3 - calls Create_Batch_to_Send(CList<CReferencedata,CReferencedata&>*listReferenceData)
I want Create_Batch_to_Send() function to handle those 3 list. That's where my problem occurs. I dont know what argument i should use.
Sir please can you give me an example on how to make this pointer to CRepositoryData as an argument to
Create_Batch_to_Send(). Thank you very much...
|
|
|
|