|
hph wrote:
But I have already tried it with SetDefaultCharFormat and it doesn't work properly!
So what did the code look like? Perhaps it was used incorrectly.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi,
I need to get the handle of the message box of the messenger service in windows 2000/XP. MSDN says that CBT hooks can be used for this. So i installed a CBT hook, check for HCBT_CREATEWND in the nCode parameter so that I can get the handle to the window in wParam. But this does not happen. Also I cannot check for HCBT_ACTIVATE because in Win 2K/XP, the message box from the messenger service does not have focus when it is created.
« Superman »
|
|
|
|
|
How can I create a control object at runtime dynamically and join it to the dialog.
eg. If I want to create many buttons at runtime after the user choosen some options(like no. of buttons he wants to use it).So what can I do.
Could anybody helps me please ?
Dr Abudawood
|
|
|
|
|
If using MFC: CButton::Create .
If using raw Win32: CreateWindowEx , passing "BUTTON" as the lpClassName parameter.
See also the Predefined User Controls[^].
|
|
|
|
|
Thank you very much MR\ Mike I will test it in MFC.
Dr Abudawood
|
|
|
|
|
Hi,
I have an option dialog which I want to use in several projects. To copy the dialog class files is not the problem but the dialog itself? I guess it must be somewhere in the ressource files.
Does anyone know how to do it?
|
|
|
|
|
Open the project you want to copy to, then click File->Open and open the .RC file that you want to copy from. Go to the ResourceView tab in the workspace, and then you can drag/drop between the the two to move resources. Hold Ctrl to copy instead.
(Note this is for VC 6, I don't use VC 7 so I've no idea if this will work in 7)
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Thanks for the quick help.
Unfortunately it does not work. I am using VC 7 and it is not possible to drag/drop a dialog between the two resources. The mouse pointer changes its state to "forbidden".
|
|
|
|
|
right click on the dialog and open binary data....copy the entire binary data......now in ur new project add a new dialog....and replace the binary data with the data copied......may not be the best way to do it but works fine with me
rIsHaBh
|
|
|
|
|
Yes, that works really well and fine for me as well.
Thanks a lot.
|
|
|
|
|
And there I was thinking the VC6 one could only be found by accident...
|
|
|
|
|
Hi,
what you need is to export the dialog onto an MFC extention dll then load the resouce dynamically......
it is the same as in supporting multi - language for your application....
Search this in the MSDN : HOWTO: Create Localized Resource DLLs for MFC Application.....
after reading this tutorial, you will get the idea....
hope this helps ya
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi all,
I am quite aware of the working of the thread synchronisation objects like,
event,
mutex,
Critical Section,
semaphore...etc...
I know each of it's working individually, but can anybody let me know,
1)what is the advantage ,disadvantage over other..
2)when each of the one is best to use..
I had check out various sources to find this info...But I am not convinced nor it explains me only the concepts...
Thanks a lot,
Shiva P
|
|
|
|
|
|
mutexes are only visible to the whole machine when you have specified a name, correct me if i'm wrong.
|
|
|
|
|
If you don't name them you can't look them up by name in another process, but you can still use them in another process if the handle is passed there in some other fashion. Have a look at DuplicateHandle().
--
-Blake (com/bcdev/blake)
|
|
|
|
|
|
If the sync is only for the current process then use critical-section since it's faster than mutex.
in Mutex you will always have context switch to kernel mode , whereas in critical section you stay in user mode when there is no contention.
|
|
|
|
|
how can i add tooltips to various controls in my MFC dialog based application?
rIsHaBh
|
|
|
|
|
Type 'using CToolTipCtrl' in MSDN and you will get step by step instructions.
« Superman »
|
|
|
|
|
|
I have read some articles,
knowing some infomation such as
1.Setting the time to 23:59:59 on the 29th or 30th day of a month that has less than 31 days may cause the clock to roll over incorrectly with some chipsets(What is the reason?)
2.y2k problem
and so on
Can you tell me
1.whether there exist some other situations like these problems, and what are they?
2.Should I access to the cmos RTC date or the OS date to test the date's validation?
3.How to chang and update the CMOS RTC time/ System Time
|
|
|
|
|
Hi ,
how can i get the IP adresses and machine names of other computers in my local network ?
I come from china ,so my english is very poor ?
Thank you very much !
|
|
|
|
|
Look for WNetOpenEnum() and WNetEnumResource() .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
just check the following url
http://www.codeproject.com/internet/ipaddress.asp?target=gethostname
or check out msdn at
Platform SDK: Windows Networking
Enumerating Network Resources
adi
|
|
|
|