|
|
Just as an aside through boredom theres also encoding of IP addresses. Its pretty stupid but quirky in a bored sort of way. Its basically turning each decimal octet into a hex string or octal string.
You can find out about that here -
http://www.pc-help.org/obscure.htm#hexip
boredom is a bad thing on a board like this
|
|
|
|
|
Use the InternetCanonicalizeUrl() function
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Where should I do this...?
I was hoping to use OnCreate() but it appears its child controls aren't created yet and the app asserts.
I'm currently initializing controls in DoDataExchange() using the following little hack to prevent multiple inits for each control.
static BOOL bFirstPass=TRUE;
if(bFirstPass){
.. Do init
bFirstPass=FALSE;
}
Any other betters ways of accomplishing this task...?
Thanx!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
You need to override OnInitialUpdate.
Pavel
Sonork 100.15206
|
|
|
|
|
Hi, All.
This is a strange problem I am having and I can't seem to figure it out. I have in the past got SetLayeredWindowAttributes() to work by defineding _WIN32_WINNT 0x0500 , but I can't seem to get it to show itself this time. I am getting errors saying it's undefined or unidentified along with WS_EX_LAYERED & LWA_ALPHA . Am I missing something?! I feel like I am but I just haven't been able to figure it out? I have tried it out on two different compilers (Dev-C++ (open source) & VC++ 6.0 SP 5), but same thing arises.
Thank for any comments/suggestions,
Kevin Power, Jr.
|
|
|
|
|
Make sure you have installed the latest Platform SDK and set up the paths in your VC IDE.
regards
Greg
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Oi, that fixed it! Thanks a million.
|
|
|
|
|
How difficult would this be and are they're any tutorials floatiing around which I could use as a guide...???
I thinking of deriving my already derived class from CDragListBox
The only catch is this...
I need to be able to drag items to new locations and items over top of other CWnd derived windows...???
Will using CDragListBox allow me to accomplish this...?
Thanx !!!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
|
Something is wrong with the link, make copy and paste it in your browser!
Sunny
|
|
|
|
|
I realize this is a pretty vague discription of a problem, but thought it might ring a bell with some of you...
I created an MDI application, serialized the data, and everything was going well. Then I tried some hostile testing by incrementing the schema version number, and instead of the CArchive object catching the difference, and presenting me with the "document out of date" dialog box (or words to that effect), the document loaded an older version of the data, and proceded to crash. Having just returned to Windows development, I thought this might be symptomatic of a setup problem of the serialized objects. It's obvious that the schema is being saved, since I can successfully load the saved document if I change the schema back to the original value. I even tried to catch a CArchiveException, but to no avail... Anything come to mind? I verified that the methods used paralled those in Scribble, but for all I know, I might be missing a vital ingredient.
Thanks.
If more information is needed, I can provide it, but thought this might be symptomatic of an obvious setup problem. Obvious to everyone but me!
|
|
|
|
|
There's a flaw, in that if you have a base class and there are derived classes, retrieving the schema in the base and derived class serialize methods will cause a problem.
I typically code around this by not using the MFC concept of schemas, and in each call to serialize, emitting a version byte. It sounds like overkill (and with a lot of objects, can inflate the amount of disk required), but it's not failed me yet.
This lets me always write using the latest version, but read any with code like;
if (ar.IsLoading())
{
BYTE version;
ar >> version;
// Do stuff that hasn't changed...
...
if (version > MAXOBJVERSION)
{
// throw a CArchive exception here!
}
if (version > 0x01)
{
// Do version 2 and later stuff...
}
}
Steve S
[This signature space available for rent]
|
|
|
|
|
how to uninstall a software programatically ?
r00d0034@yahoo.com
|
|
|
|
|
if the software appears in add/remove program then you can go to registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
and look for uninstallString key. That is the command line when you uninstall the software
hope this helps
Abdullah R
|
|
|
|
|
how to creat a setup project that will install an application through a wizerd ?
how to creat DNS programatically (driver name that we manually make in DB projects)?
how to logoff and login programatically ?
r00d0034@yahoo.com
|
|
|
|
|
imran_rafique wrote:
how to creat a setup project that will install an application through a wizerd ?
Use a setup creation software like InstallShield, Wise or a free Inno Setup[^].
Pavel
Sonork 100.15206
|
|
|
|
|
Hello @all!
How can I program a if-queries, whether a dialog still exists?
Lucky
|
|
|
|
|
You could use function IsWindowVisible() to determine if the dialog box is visible and in general can check its status. Otherwise, you coud set a boolean variable the parent class could call to get the status of the dialog box class.
Kuphryn
|
|
|
|
|
Thanks....the idea with the boolean variable is perfekt.
Lucky
|
|
|
|
|
[Sorry for my english]
Hi, i don't know if this question has been posted before.
I'm trying to make a simple calculator in Visual C (typical exercise of visual basic).
The problem is I would like to use only one function to all of the numerical buttons (those that simply adds a number to the display).
This is a problem more common that it seems, many controls and only one function for handling them.
How the function could know what button has called it?
thanks!
|
|
|
|
|
It all depends on how you are implementing your calculator.
If you are using MFC or WTL, you can make the click event for each button on your calculator call the same handler function and test the ID of the button in order to know which button was pressed.
If you are using plain Win32 API, in your wndproc function, you can have each click event call the same function, and the function would also pass in the ID of the button that was clicked.
{By the way, your english is fine)
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
If you want an example, just mail me back, and I will send it to you
LPCTSTR Dutch = TEXT("Double Dutch ");
|
|
|
|
|
Hello,
I have a quick question regarding CFileDialog..
I have a SDI type app with a "Settings" dialog box.. I allow the user to click a browse button with in the settings dialog box and select a .wav file as a sound/alert setting (using CFileDialog). The problem is that when the user selects the .wav file my current working directory changes to the path of the .wav file, so, if I do a "save" behind the scenes it saves my document to the same directory as the wav file not the directory of my .exe.
How can I prevent the current working directory (my .exe dir) from being set to the CFileDialog directory??
Thanks,
Rob
|
|
|
|
|
How can I get the directory that the .exe sits in on startup?? GetCurrentDirectory will not work. Is there another way?
|
|
|
|