|
Hi!
How I can get the docking location (right, left, top or bottom) of a control bar?
|
|
|
|
|
how does one hide a folder from other people?
http://www.codeproject.com/tools/FolderHide.asp[^] says it makes the folder act like a shortcut to system folders (like Recycle Bin, Control Panel, etc.), but sadly, the tool came without source code.
|
|
|
|
|
You could try and notify the article's author. Others have made posts about it, so hopefully the source code will appear shortly. I suspect the article will be deleted otherwise (at least that's the impression that I got from Chris).
Otherwise, you may just have to use SetFileAttributes() .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I am sorry that I am asking a question not relevant to this section of MessageBoard, but I hope that somebody can help me out.
I use the WriteFile function in my MFC application to write data to a File from a Buffer.
When I see open the file, I see strange characters, while my data in the Buffer contains only numbers.
What can be the problem?
Thanks in Advance,
Deepak Samuel
|
|
|
|
|
A code snippet showing how you are writing to the file would be nice. How are you viewing the file once it's been written to?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
hDataFile = CreateFile(
DataFilename,
GENERIC_WRITE,
FILE_SHARE_WRITE,
NULL,
OPEN_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL
);
pWin_Data[0] = (PWINDATA)WinBuff_1_Address;
WriteFile(
hDataFile,
pWin_Data[0],
sizeof(ULONG),
ptr,
NULL
);
CloseHandle(
hDataFile);
The File name is with the extension ".dat" and I opened it with notepad.
Deepak Samuel.
|
|
|
|
|
It looks like your code is writing a pointer address to the file. Is this the intention? If you want what the pointer is pointing to, use *(pWin_Data[0])
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
It depends on how you open the file. Do you open it as text or binary? If you open it as binary you would see strange characters because you would be seeing the ascii interpretation of what the numeric values are. For instantce if you output the number 32 as binary it would appear as a space in a text file.
|
|
|
|
|
Hi
How can i get pointer to member function
class A{
virtual bool vfun(){
void* pfun = fun;
}
virtual bool fun(){
void* pvfun = vfun;
}
}
Why this code not compiled.
Thanks.
|
|
|
|
|
real_space_monkey wrote:
Why this code not compiled.
What message is the compiler giving you?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
The error of your code is in the declaration. In the function vfun() , you do not specify a pointer to function, but a pointer to void. Pointers to function have different type of declaration. According to MSDN, a pointer to function receives the following type of specification:
return-value (*variable)(param, ...) So, according to this, the pointers pfun and pvfun should be declared as:
void (*pfun)(void) = pfun;<DIV>
...<DIV>
void (*pvfun)(void) = pvfun;
Now you can call the functions through the pointers by issuing pfun() or pvfun() , as long as you're inside the correct context (inside the function the pointers are declared)
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
Hi,
I would like to know if there is some way
how to chance modeless dialog box into modal.
I mean I already have dialog created
and I just want to show it as modal.
Something like have choice:
dlg.ShowModal(); //is modal
or
dlg.ShowWindow(SW_SHOW); //is modeless
Thanx lot
Viliam
viliam
|
|
|
|
|
You want to change the behaviour while the dialog is visible?
It is probably easier to just close and reopen the dialog programmatically.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
One solution is to derive a class from CDialog and do custom creation. Otherwise, one solution is to overrite OnClose(), etc. and keep the window from losing focus.
Kuphryn
|
|
|
|
|
|
Hi All,
Is there is any get the detail about the network devices like,
Name : HPINKJET
Type : Printer
Sub type : Laser
Make :
Model :
Serial No :
MAC Address:
If anyone of you know, can you please help me.
Thanks.
Regards,
A.Ilamparithi.
|
|
|
|
|
what network device do u mean?
a shared printer, a print server?
Don't try it, just do it!
|
|
|
|
|
Hi Alex...
Thanks for your interest.
By network device, i mean things like router, firewall, printer, etc..
Regards,
A.Ilamparithi
|
|
|
|
|
I execute a console process with the ShellExecuteEx, this process creates a file but it spends 4 o 5 seconds, my next code needs to access this file so I need to wait the end of the execution of my console process or wait 5 seconds until continue the program execution, how can i do that?
thanks
|
|
|
|
|
Add SEE_MASK_NOCLOSEPROCESS to the fMask member of your SHELLEXECUTEINFO structure. The process's handle will be returned in the hProcess member. You can then pass this to WaitForSingleObject , which will return when the process exits. You could also use one of the other XxxWaitForZzz functions.
Don't forget to call CloseHandle on the process handle once the WaitFor function returns.
An alternative is to use CreateProcess rather than ShellExecuteEx .
|
|
|
|
|
Hi ,
I wrote code in MFC , based on ActiveX component Microsoft Internet Explorer.
Purpose of that is to load images by IExplorer.
With JPEG it goes fine , but when I'm trying to load BMP , it runs by default MSPaint (defined by registry) . I'v removed entry from regestry and now any time I want to open a file , IExplorer shows dummy window "Do you want to open / save bla bla bla .. "
How can I avoid this window message ??
Thanx.
Kogi.
|
|
|
|
|
i have created a table in access database. then i tried to retrieve the table using class wizard in the application which was successful. when i am trying to get the methods and properties for this table using pDoc (document class) i am unable to get the methods and properties.
am i missing out something in the whole process????
|
|
|
|
|
Hi,
How do i disable the verticall scroll bar of the CListCtrl,
I want the user only scroll horizontally and not verticaly how do i do that?
Thanx in advance.
Regards,
Prakash
The World is getting smaller and so are the people.
|
|
|
|
|
Mr.Prakash wrote:
How do i disable the verticall scroll bar of the CListCtrl,
Don't add as many items to the control. In other words, if the control can display 9 items and you add 10, a vertical scroll bar will be displayed.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|