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
K

Kamis

@Kamis
About
Posts
29
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • how to detect system's idle state?
    K Kamis

    Oh, I guess that's exactly what I need, thanks.

    C / C++ / MFC tutorial question

  • how to detect system's idle state?
    K Kamis

    Hello everyone! I want to implement one feature in my program so that it will ask to relogin after the system has been idle for a specified time interval, the same way as screen savers get activated when the system is idle for some time. Any ideas about the solution?

    C / C++ / MFC tutorial question

  • Communication between classes
    K Kamis

    Thanks

    C / C++ / MFC question tutorial announcement

  • Communication between classes
    K Kamis

    Situation is quite ordinary: I have a main window class(for example derived from CDialog) and call a modal dialog from it's method. Choosing some settings from within it affects data of the main window class. So what is the most elegant way to establish communication between these two dialogs? How is it implemented more often in practice? One solution I see is to pass a pointer of the main class as an argument to constructor or any other method of this "settings" dialog and manipulate all tha data directly. Or I can save all changes in some kind of mediums such as global variables or object with static members and then when this secondary dialog is about to be destroyed it sends message to the main window class in order to read data from these transitional variables and update it's data. Or perhaps there is another way to do it?

    C / C++ / MFC question tutorial announcement

  • Disabled menu item
    K Kamis

    Yeah, I was thinking about it but wondered if there was a simple way to implement it. Thanks anyway.

    C / C++ / MFC question

  • Disabled menu item
    K Kamis

    How can I make so that disabled menu items are not highlighted when I put cursor on them?

    C / C++ / MFC question

  • Popup inside popup
    K Kamis

    Thanks a million

    C / C++ / MFC question

  • Popup inside popup
    K Kamis

    Hello. How can I do the following: when choosing some item from a popup menu (with a right button click) another popup is shown offering some things to do with that item. I don't need it to do classic way that is to use InsertMenu method with MF_POPUP flag but so that this additional menu is shown only on mouse click.

    C / C++ / MFC question

  • Emulating clipboard copy/paste
    K Kamis

    You must have misunderstood me. The thing I want to do is for example I press Ctrl+Shift+P and text from the clipboard appears on the screen (in Edit Box, Notepad, Word, whatever has the focus). And vice versa I pick out some text with the mouse or keyboard press Ctrl+Shift+C and the text saves to clipboard. That's what I want.

    C / C++ / MFC question

  • Emulating clipboard copy/paste
    K Kamis

    How can I emulate Ctrl+Ins or Shift+Ins (Ctrl+C Ctrl+V) key combinations. I've seen it in one program where it was possible to define your own keys to work with clipboard. How is it implemented?

    C / C++ / MFC question

  • Clearing memory on windows shutdown
    K Kamis

    I'm writing a prog that works in the background all the time. So it is loaded on windows startup and unloaded on shutdown. The question is: do I have to perform all the clean up like freeing dynamically allocated memory or uninstalling the hook when windows is being restarted or shut down. If yes then what what message is sent to my application to inform that windows is going to finish it's work? I do not get WM_DESTROY or WM_CLOSE like in the case when I terminate the program myself. Thanks.

    C / C++ / MFC question performance

  • How to hide program on execution
    K Kamis

    I need the main window of my program (created by DialogBox() function) to become hidden already on the startup. If I call ::ShowWindow(hWnd,SW_HIDE) when I receive WM_CREATE or WM_INITDIALOG messages, it doesn`t work because these messages are regeived before dialog is shown. So how can I do it? I can not write consele app because I will need to show the window eventually.

    C / C++ / MFC question tutorial

  • Disable key combination
    K Kamis

    Reading all the articles about hooks I've found out how to monitor keyboard input but is there a way to disable key combinations on this level of interception? For example when windows is hooked by my program and user presses Shift+Insert I wouldn't like the text to be inserted from the clipboard but do some other actions. And vice versa how can I emulate different key combinations presses?

    C / C++ / MFC tutorial question

  • How can I put a breakpoint in DLL?
    K Kamis

    It works! Thanks

    C / C++ / MFC debugging question

  • How can I put a breakpoint in DLL?
    K Kamis

    Thanks, but why isn't it possible to use the same syntax {,,dllname}Function for my DLLS?

    C / C++ / MFC debugging question

  • How can I put a breakpoint in DLL?
    K Kamis

    Thanks I`ll try that.

    C / C++ / MFC debugging question

  • How can I put a breakpoint in DLL?
    K Kamis

    My DLL. But what's the difference if it wasn't?

    C / C++ / MFC debugging question

  • How can I put a breakpoint in DLL?
    K Kamis

    How can I set DLL as the active project? Well I don't get what you mean. Can you explain more detailed please?

    C / C++ / MFC debugging question

  • How can I put a breakpoint in DLL?
    K Kamis

    for effecient debug

    C / C++ / MFC debugging question

  • window doesn't get redrawn
    K Kamis

    It still doesn't work. Here's a scheme: // Main.cpp void CMainDialog::On_Visualize() // Create a modal dialog { ... OpenGL_Dialog my_gl; my_gl.DoModal(); ... } // OpenGL_Dialog.cpp BOOL OpenGL_Dialog::OnInitDialog() // Setting timer when creating dialog { CDialog::OnInitDialog(); ... draw_counter=0; SetTimer(1,10,NULL); } void OpenGL_Dialog::OnDestroy() // Kill timer when destroying { ... KillTimer(1); CDialog OnDestroy(); } void OpenGL_Dialog::OnPaint() { draw_counter++; // check CPaintDC dc(this); DrawGLScene2D; SwapBuffers(m_hgldc); } void OpenGL_Dialog::OnTimer(UINT nIDEvent) { switch(nIDEvent) { case 1: RedrawWindow(); break; ... } CDialog::OnTimer(nIDEvent); } void OpenGL_Dialog::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) { switch (nChar) { case 32: char buf[10]; itoa(draw_counter,buf,10); AfxMessageBox(buf); break; ... } CDialog::OnKeyDown(nChar, nRepCnt, nFlags); } Something like this. I wouldn't actually have placed drawing handling on timer but I need to respond to user input and other stuff. So striking space during the dialog's lifecycle I get the number of redrawings and this number is growing all the time. But in most cases the screen stays blank and nothing is drawn.

    C / C++ / MFC graphics help game-dev
  • Login

  • Don't have an account? Register

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