|
Hail to you too, comrade.
The C++ standard provides something to solve this in the form of Run-Time Type Information (RTTI). For a starter you can look here[^]
|
|
|
|
|
I need to get all mountpoints of a partition (like D:\)
What i have is the physical drive id (e.g. "\\.\PhysicalDrive0") and the partition id.
The problem is that that i need to find out the unique volume name in the form "\\?\Volume{GUID}\" in order to be able to use the VolumeManagement functions. The problem is that i don't have the partition's drive name name and drives don't even have to be mounted. So what can i do to get the partition's GUID?
I could do it using DeviceIoControl with IOCTL_DISK_GET_PARTITION_INFO_EX but that's only XP and later and i need it to be working on 2k too.
If anyone has an idea, please let me know
Regards
webseek
|
|
|
|
|
Hi can u please tell me how to create ico file or what structure it has?
Thanks
|
|
|
|
|
Visual C++ 6.0 can create them, or a graphics prog like Xnview http://www.xnview.com/[^]
Try www.wotsit.org[^] for the ICO file format
"The greatest mistake you can make in life is to be continually fearing you will make one." - Elbert Hubbard
|
|
|
|
|
Thx, but i need to do this manually in my program.
|
|
|
|
|
In that case look at wotsit.org for the ICO file format and DIY or serch for a freware library.
"The greatest mistake you can make in life is to be continually fearing you will make one." - Elbert Hubbard
|
|
|
|
|
Thanks 
|
|
|
|
|
I use EnumDisplaySettingsEx in my program,but it doesn't work ,just say undefined.
I think it maybe require defining of winver 0x0500,but it is still not work after I added the definition.
please give me some suggestion or sample .
thank you!
Happy Gemini
|
|
|
|
|
What kind of OS do you have?
I created a simple win32 app and put the following code in InitInstance.
DEVMODE xDeviceInfo;
xDeviceInfo.dmSize = sizeof(DEVMODE);
EnumDisplaySettingsEx(NULL, ENUM_CURRENT_SETTINGS, &xDeviceInfo, 0);
Works without any problems, gives device name and all current vmode related info.
On W2K, VS.NET 2003
Hope it'll help.
|
|
|
|
|
My application is based on win2k + VC6.
someone suggestion me to download latest version of the SDK,but I don't know which one I should download,please give me some suggestion or link if you know.
Happy Gemini
|
|
|
|
|
Download the latest Platform SDK.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi!
I am trying to use checkboxes in a CListCtrl. To simplify handling of the control, I've written the following short code:
void CGeneratorDlg::_SetCheck(int inxItem, BOOL bEnable)
{
LV_ITEM _ms_lvi;
_ms_lvi.stateMask = LVIS_STATEIMAGEMASK;
_ms_lvi.state = (UINT)(((int)(bEnable) + 1) << 12);
m_cList.SendMessage(LVM_SETITEMSTATE, (WPARAM)inxItem,
(LPARAM)(LV_ITEM FAR *)&_ms_lvi);
}
BOOL CPwGeneratorDlg::_GetCheck(int inxItem)
{
return ((((UINT)(m_cList.SendMessage(LVM_GETITEMSTATE, (WPARAM)inxItem,
LVIS_STATEIMAGEMASK))) >> 12) - 1);
} Those 2 functions seem to work nice but unfortunately when I call them in the OnInitDialog function they do nothing:
for(int i = 0; i < m_cList.GetItemCount(); i++)
_SetCheck(i, TRUE); This should check all checkboxes in the list. I do this in OnInitDialog function but it does just plain nothing. The checkboxes remain unchecked.
Any idea how to check the checkboxes in OnInitDialog?
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
|
I tried it, set the struct to zero, and it doesn't change anything The boxes remain unchecked.
Any more idea?
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
IIRC there was a problem with list view controls SetCheck not working in OnInitDialog (and maybe in OnCreate too). Try posting yourself a message, and do the SetCheck's there.
"Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
mlog || Agile Programming | doxygen
|
|
|
|
|
peterchen wrote:
Try posting yourself a message, and do the SetCheck's there.
Err... sorry, but what do you mean with that? In my SetCheck function I send the message directly to the control using the SendMessage function...
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Sorry, a bit more detailed:
In OnInitDialog, do a PostMessage(dialog, WM_APP, 0, 0);
Add a handler for WM_APP to the dialog, and do the SetCheck's there.
"Vierteile den, der sie Hure schimpft mit einem türkischen Säbel."
mlog || Agile Programming | doxygen
|
|
|
|
|
dear all
can anyone point me how can delete directories with files, folders.
thanx and regards
rIsHaBh
|
|
|
|
|
You can either use the shell functions (like Windows Explorer) or do it like this:
http://www.codeproject.com/file/removefiles.asp[^]
Hope this helps
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
I have a problem with caption bar in my program.I load a bitmap for painting caption bar.I want to customize caption bar.My program uses SDI.But caption bar flicks and doesn't work properly.
Please,tell me the way to solve this problem.
My e_mail address is kokonovn@loveable.com.
Thanks a lot!
|
|
|
|
|
Have you taken a look at this article?
http://www.codeproject.com/gdi/customcaption.asp[^]
Roger Allen
Sonork 100.10016
Death come early, death come late,
It takes us all, there is no reason.
For every purpose under heaven,
To each a turn, to each a season.
A time to weep and a time to sigh,
A time to laugh and a time to cry,
A time to be born and a time to die.
Dust to dust and ashes to ashes,
And so I end my song.
|
|
|
|
|
I'm trying to programmatically "click" a tab on a CTabCtrl.
My understanding is that I can use SendMessage to do that by using TCN_SELCHANGE. But I am also assuming that I need *something* in the lParam and/or wParam values. It seems to me that the index of the tab "clicked" has to be included in there somewhere and somehow. My question is how (or where)?
And where do I find things like this?
For example, I happened to find here at CodeProject some info on sending a MOUSEMOVE message to a window with the coordinates of the mouse position:
SendMessage(hWndTarget, WM_MOUSEMOVE, fFlags, MAKELPARAM(x,y));
Where do I find things like the fact that the lParam is for flags and the wParam is for the coordinates?
Any info is greatly appreciated. Thanks.
|
|
|
|
|
If you're using MFC, most of the classes abstract away the idea of having to send messages. Check out the documentation for CTabCtrl::SetCurSel(int nItem)?
Or do you actually need to move the mouse?
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Sure, that selects the tab, but unfortunately it does NOT call the OnSelchange code. Therefore, simply calling SetCurSel won't activate the code that goes along with clicking on a tab. That's why I need to actually do a SendMessage -- to call the OnSelchange routine as though a tab was actually clicked.
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/tab/notifications/tcn_selchange.asp
MSDN is the answer to all your SendMessage-Questions 
modified 12-Sep-18 21:01pm.
|
|
|
|