|
Thanks Mark, Though original problem persists but your way of attaching bitmaps difinately is better than mine, thanks. I have to solve this issue one way or another either programistic way(accomodate 32x32 bit icons in 16x16 place) or artistic way(work on my drawing skills to draw 16x16 icons that look really good).
|
|
|
|
|
Electronic75 wrote: work on my drawing skills to draw 16x16 icons that look really good)
Yeah....I'm not good at it....I just steal them right out of microsoft exe/dlls
Just kidding Microsoft!
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Mark Salsbery wrote: I just steal them right out of microsoft exe/dlls
Don't ever look at the issue this way! every program that you write for MS-Windows platform causes many users of that program are being forced to use MS-Windows, so in fact you are a microsoft employee working for free for them. if something is being stealed it is from the other side!;)
|
|
|
|
|
Of course! That was just my public comments about the subject
*edit* Oh, and if anybody asks, I was never here...
"Go that way, really fast. If something gets in your way, turn."
|
|
|
|
|
Hi all,
I have this sample data in a .txt file,
-- Ne doit pas faire
-- é
select PARC.CONTYP
, PARC.CONSTA
, count(*)
from ParcNonCede PARC
, PLAN P
and PARC.CONSTA not in ('Stock', 'Détourné')
group by CONTYP, CONSTA
;
I am saving this in UTF-8 (not necessarily using Notepad).
Now I have this sample code to detect the Codepage of a buffer as below..
void
ExamineData(String &codepage, String &buffer)
{
IMultiLanguage2 *mlang;
DetectEncodingInfo info = {0};
MIMECPINFO codepageinfo;
int length = 0, cnt = 1;
String codepagestr; // String Datatype is my class
unsigned int len =1;
if(buffer.GetString())
length = buffer.GetLength();
HRESULT hr = S_OK;
SUCCEEDED(CoInitialize(NULL)); // init COM
hr = CoCreateInstance(CLSID_CMultiLanguage, NULL, CLSCTX_INPROC_SERVER, IID_IMultiLanguage2,(void **)&mlang);
hr = mlang->DetectInputCodepage(0,0, (wyChar *)buffer.GetString(), &length, &info, &cnt);
if(SUCCEEDED(hr))
{
hr = mlang->GetCodePageInfo(info.nCodePage, info.nLangID, &codepageinfo);
if(SUCCEEDED(hr))
codepage.SetAs(codepageinfo.wszDescription);
}
mlang->Release();
CoUninitialize();
}
Now this Function Detects the Codepage for the Buffer as "Western European (Windows)" even though it is an UTF-8. But Notepad is able to correctly detect it as UTF-8.
I am Not able to come to a conclusion whether it is a problem with the code or with the API.
Please Help me.
Thanks in Advance,
Manohar.S
|
|
|
|
|
anybody?
I need some help over here..
Regards
Manohar.S
|
|
|
|
|
There has a Client connected with the Server.
How should the Server could test the Client's net-speed?
GOOD LUCK
|
|
|
|
|
kcynic wrote: How should the Server could test the Client's net-speed?
I dont know a reliable method. However, monitor the maximum transfer rate or let the user on the client end enter his connection speed (client needs to communicate that to the server). In any case the average network transfer rate depends on many factors and won't be a fixed value over time.
kcynic wrote: GOOD LUCK
?
|
|
|
|
|
I have a project complied using shared dll of MFC.I should release it now.
How but the .exe could not run on other PC with no VC.
I know I should release all the .dll files with the .exe file.But how should I find witch .dll files I should copy it?
Thanks
|
|
|
|
|
Run the Microsoft Tools->Dependency walker and put the dll in it. It will show all dependency.
|
|
|
|
|
I find there has no such tool in VS2005. I use vc6's Dependency Walker to view the dll it need.I add all the dlls.
But when I make a install project and using the result setup file to install it in another PC,it could not run but terminated with the message that the configuration is wrong.
How to resolve it?
Thanks
|
|
|
|
|
I have a project complied using shared dll of MFC.
Try with make changes in project settings.
Compile using static library.
May be u'll get the result
|
|
|
|
|
the problem is that,if i compiled it using static library,the program would crash at runtime.
But the debug version works well.Why?
|
|
|
|
|
Hi All,
Our programmes use a generic thread creation and destruction so it makes it easy to create and control threads in the system without everybody having to re-implement the creation code. The problem however is that in debug mode we get:
The thread '___thread_callback' (0x8ec) has exited with code 0 (0x0).
___thread_callback is repeated a number of times equivilant to the number of threads created. Is there any way of changing this debug output in VS2005 to indicate which thread exited?
thanks,
Rich
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
I think so, you could give your thread a meaningful name.
Use the following code snippit.
{
typedef struct tagTHREADNAME_INFO
{
DWORD dwType;
LPCSTR szName;
DWORD dwThreadID;
DWORD dwFlags;
} THREADNAME_INFO;
const DWORD MS_VC_EXCEPTION = 0x406D1388;
THREADNAME_INFO thrdInfo;
thrdInfo.dwType = 0x1000;
thrdInfo.szName = "The Name";
thrdInfo.dwThreadID = 0xffffffff;
thrdInfo.dwFlags = 0;
__try
{
RaiseException( MS_VC_EXCEPTION, 0, sizeof(thrdInfo)/sizeof(DWORD), (DWORD*)&thrdInfo );
}
__except(EXCEPTION_CONTINUE_EXECUTION)
{
}
}
I use this technique to simplify the debugging for My CWinThread derived, but i'm confident that it
should work for Worker threads as well. At low lever there isn't a difference.
Hope that this helps.
codito ergo sum
|
|
|
|
|
That is an interresting way round the problem
Thanks.
"Programming today is a race between software engineers striving to build bigger and
better idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far the Universe is winning." -- Rich Cook
|
|
|
|
|
That's good but you could have just given him the link[^] to the documentation you got that from.
|
|
|
|
|
I' guess I could have done that but then I would be forced to google for it. Since I didn't remember the link where I first found it.
So I thought that whilst i'm in my project containing this little piece of code, maybe i could just could copy/paste it.
Don't worry won't happen again ...
codito ergo sum
|
|
|
|
|
Hi together,
I put a ListView in my Dialog and wand to catch the LVN_BEGINDRAG Notify-Message.
The ListView has his Notify-property to TRUE.
I tried a ON_NOTIFY_RECENT(LVN_BEGINDRAG,OnDrag) but i never step into it.
A tutorial says that the LVN_BEGINDRAG Notify message is catchable with adding a
new handler via the class wizard.
I tried a lot of things, but i don't find it
Does anyone knows where to add it?
Big thanks ![Smile | :)](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Resource view -> mark the listctrl
Right click -> Context menu "Add event handler..."
proceed...
It is not so easy to find I still miss the VC6 (CTRL+W) wizard
Greetings from Germany
|
|
|
|
|
Danke für deine Antwort
I only have SetFocus, KillFocus, ThemeChanged, ...
No one likely "BeginDrag" or Notify ![Unsure | :~](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_squeamish.gif)
|
|
|
|
|
First you must open the Resource view (open the *r.rc file) of your dialog then click at the Treeview. Now right click ...
Greetings from Germany
|
|
|
|
|
Muss ich die Liste zuerst noch als Klasse ableiten?
Denn ich bin im Ressourcen-Modus, sehe den Dialog mit ner Textbox & dem Listen-Control.
Dann wähle ich die Liste aus und gehe auf "Ereignishandler wird hinzugefügt"
Dort drin habe ich jedoch nur Doppelklick, Focus Ereignisse
Nicht was mit Drag&Drog zu tun hat.
Irgendwo ist da der Wurm drin LOL
|
|
|
|
|
I cannot seem to find a message that will give my code a call after the user marks the checkbox on a standard CTreeCtrl. I can trap on the NM_CLICK but that calls me before the checkbox is marked, however, I want to be called after the state of the node is set. Thanks
|
|
|
|
|
I thought this was going to be a trivial question, but I can't see a nice elegant method either.
What you can do is....
1/ Get NM_CLICK
2/ Get the cursor position with GetMessagePos, and translate it to tree window coords.
3/ Use TVM_HITTEST to get the item number, and where the click was (does it return TVHT_ONITEMBUTTON ?)
4/ Get the current check state.
5/ Either get on and handle the fact that the state will change, or post yourself a message to deal with it shortly.
Iain.
|
|
|
|