Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

derhackler

@derhackler
About
Posts
25
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • page reloading
    D derhackler

    you could use the following page directive: <%@ OutputCache Duration="0" VaryByParam="None" %>

    Web Development tutorial question

  • outlook add-in event handler doesn't work
    D derhackler

    no event is fired any more. :mad: i don't know what to do. nothing else than problems....

    C# help

  • outlook add-in event handler doesn't work
    D derhackler

    thanks for the answer. i had the same idea but it didn't work. :-( benedikt

    C# help

  • outlook add-in event handler doesn't work
    D derhackler

    hi! i try to devolop an add-in for outlook xp which uses the SelectionChange event. If you select a contact the eventhandler adds or removes a command bar control. so far it works fine. but if you click the new button the supposed action works fine, but afterwards no event works anymore. you would have to restart the application to make it work again. any ideas what might be wrong and how i can solve the problem. (i'm using the pi's from microsoft) thanks in advance benedikt

    C# help

  • outlook add-in event handler doesn't work
    D derhackler

    hi! i tried to write a little outlook addin which gets startet when the user opens a new mail form. i tried it with the following code but it didn't work. any ideas? thx benedikt public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom) { applicationObject = application as Outlook.Application; addInInstance = addInInst; MessageBox.Show("OnConnection"); if(applicationObject!=null) MessageBox.Show("wenigstens etwas!"); // inspektor speichern applicationObject.Inspectors.NewInspector+=new Outlook.InspectorsEvents_NewInspectorEventHandler(this.Inspector_StartedHand ler); } private void Inspector_StartedHandler(Outlook.Inspector inspector) { MessageBox.Show("Juchu"); }

    C# data-structures question

  • static CArray
    D derhackler

    ah!!! i see the problem. initializing the arrays is not a want - it's a must!! now my code compiles. thank you!!! es ist wie es ist und es ist fürchterlich!

    C / C++ / MFC help question

  • static CArray
    D derhackler

    i've seen it.:cool:

    C / C++ / MFC help question

  • static CArray
    D derhackler

    ups. ther's something wrong with the forum code. it ignores the template parameters! :(( but i've specified the parameters like CArray[CString,CString&] (i use other brakets). so something else must be wrong.

    C / C++ / MFC help question

  • static CArray
    D derhackler

    this is the code of the header file: #include class CPropertyList { public: CPropertyList(); virtual ~CPropertyList(); public: static CString fnGetADsProperty(int intArg); static CString fnGetADsProperty(CString cstrArg); static int fnGetIntProperty(CString cstrArg); static CString fnGetProperty(int intArg); static CString fnGetProperty(CString cstrArg); //Statische members static CArray cstraProperty; static CArray cstraADsProperty; static CArray intaProperty; }; this ist the error i get (for each CArray) PropertyList.obj : error LNK2001: Nichtaufgeloestes externes Symbol "public: static class CArray CPropertyList::cstraProperty" (?cstraProperty@CPropertyList@@2V?$CArray@VCString@@AAV1@@@A) any ideas? derhackler es ist wie es ist und es ist und es ist fürchterlich

    C / C++ / MFC help question

  • static CArray
    D derhackler

    Bonjour! when i try to define a CArray as a static class member i get a link error. what's the problem, and how can i solve it? thx derhackler

    C / C++ / MFC help question

  • sending messages from a worker thread to cdocument
    D derhackler

    bonjour! thanks for your answer. now it works. i think there was a little problem with my PostMessage function. i used PostMessage(...) instead of ::PostMessage(...). PostMessage didn't work. I wanted to access my CDocument. Now i've moved the code for my thread in a new class. This class gets a pointer to my CDocument. The thread now launches a dialog which shows a litte progress bar. this dialog is initialized with my CDocument pointer and receives the messages of my thread. I hope the Dialog can now savely access my Cdocument data. bb benedikt

    C / C++ / MFC question

  • sending messages from a worker thread to cdocument
    D derhackler

    thanks for your detailed answer. i tried it with the first way you mentioned. I added the necessary message functions in my CMainFrame class. The message map handels the messages via ON_THREAD_MESSAGE(UWM_PROGRESSDELETE, OnProgressDelete) and ON_THREAD_MESSAGE(UWM_PROGRESSCREATE, OnProgressCreate). The CDocument function which stores the thread retrieves a window handle via m_pWnd = (HWND)AfxGetApp()->m_pMainWnd. My thread function calls the function: CString* s = new CString(cstrName); PostMessage(m_pWnd,UWM_PROGRESSDELETE,0,(LPARAM)s); but my message handlers are never called. i think i don't really understand your second solution. creating the CMyWorkerThread is clear. caching the doc ptr too. but i'd like to send a message to something where i can savely make some changes on my user interface. i think you mentioned how to send messages into the running thread and not vice versa. or do i really understand nothing...:((

    C / C++ / MFC question

  • sending messages from a worker thread to cdocument
    D derhackler

    thx for your reply. the message handler works but the spy tool doesn't receive my message. (i think)

    C / C++ / MFC question

  • sending messages from a worker thread to cdocument
    D derhackler

    thx for your answer. but it doesnt really work. CDocument don't have a HWND. here are all the relevant functions of my thread. maybe something other is wrong. //the function which starts the thread CUserManagerDoc::fnDeleteUser(CStringList &lstToDelete) { //is thread running? if(bDeleteRunning) { MessageBox(NULL,"Es wird gerade gelöscht!","Achtung",MB_OK|MB_ICONEXCLAMATION); return 1; } ..... some code .... bDeleteRunning = true; pThread = AfxBeginThread(fnThreadDeleteUser,this); return 1; } UINT CUserManagerDoc::fnThreadDeleteUser(LPVOID p) { //start the function CUserManagerDoc* me = (CUserManagerDoc*)p; me->fnThreadDeleteUser(); return 0; } //the thread function void CUserManagerDoc::fnThreadDeleteUser() { ..... some code .... CString* s = new CString("Test"); CWnd* m_pWnd = (CWnd*)AfxGetMainWnd(); PostMessage((HWND)m_pWnd,UWM_PROGRESSDELETE,0,(LPARAM)s); } //message handler for the user defined message LRESULT CUserManagerDoc::OnProgressDelete(WPARAM wParam, LPARAM lParam) { //get the text CString *s = (CString *)lParam; ........ some code ...... return NULL; }

    C / C++ / MFC question

  • sending messages from a worker thread to cdocument
    D derhackler

    thx for your reply. i tried it with the following statement but it does not work. CWnd* m_pWnd = (CWnd*)AfxGetMainWnd(); CString* s = new CString(cstrName); PostMessage((HWND)m_pWnd,UWM_PROGRESSDELETE,0,(LPARAM)s); the afx_msg function is never called. any ideas?

    C / C++ / MFC question

  • sending messages from a worker thread to cdocument
    D derhackler

    bonjour! i've got a little worker thread in my CDocument derived class. i've also defined a message and a message handler in my CDocument. i tried to post my message with PostMessage(NULL,MYMESSAGE,...) but it didn't work. i think the decleration of MYMESSAGE is ok (#define UWM_MYMESSAGE (WM_APP + 7) what's the right way to post messages to a cdocument? thx benedikt

    C / C++ / MFC question

  • ADsUser - Addresses
    D derhackler

    thanks for your answer. but the PostalAddresses property is supported on both providers (i use LDAP). you also get the E_ADS_PROPERTY_NOT_FOUND error when you try to get a value from a property which has no value yet. but i set the addresses value and so i don't know what's wrong.

    C / C++ / MFC sysadmin help question

  • Empty Property
    D derhackler

    Bonjour again! i've got another important question: how can i set a property in ADS to be empty? i tried it with an empty string, but it doesn't work. benedikt

    C / C++ / MFC question

  • ADsUser - Addresses
    D derhackler

    bonjour! i've got the following problem: i'm connected to an ADsUser Interface and try to read the adresses. but the HRESULT of the property is always E_ADS_PROPERTY_NOT_FOUND. on the win2k server the adress properties are set, but except the PostalCodes i can't read them. what's wrong? thnx

    C / C++ / MFC sysadmin help question

  • share folder
    D derhackler

    thank you for your code. i'll try it tomorrow. it's now very late at my time zone. :) benedikt

    C / C++ / MFC sysadmin windows-admin help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups